Changeset 12097
- Timestamp:
- 02/27/15 13:55:24 (10 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj
r12092 r12097 145 145 <Compile Include="LayerUpdator.cs" /> 146 146 <Compile Include="MatingPoolCreator.cs" /> 147 <Compile Include="NumberOfSelectedSubScopesCalculator.cs" />148 <Compile Include="OpenNewLayerCalculator.cs" />149 147 <Compile Include="Plugin.cs" /> 150 148 <Compile Include="Properties\AssemblyInfo.cs" /> -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/LayerUpdator.cs
r12071 r12097 53 53 var genSlrEqAgeGap = new Comparator() { Name = "GenerationsSinceLastRefresh >= AgeGap" }; 54 54 var updateLayersBranch = new ConditionalBranch() { Name = "UpdateLayers?" }; 55 // TODO: if expression calculator supports array indexing, use expression calculator56 //var openNewLayerCalculator = new ExpressionCalculator();57 var openNewLayerCalculator = new OpenNewLayerCalculator();55 var maxLayerReached = new Comparator() { Name = "MaxLayersReached = OpenLayers >= NumberOfLayers" }; 56 var maxLayerReachedBranch = new ConditionalBranch() { Name = "MaxLayersReached?" }; 57 var openNewLayerCalculator = new ExpressionCalculator() { Name = "OpenNewLayer = Generations >= AgeLimits[OpenLayers - 1]" }; 58 58 var openNewLayerBranch = new ConditionalBranch() { Name = "OpenNewLayer?" }; 59 //var layerCloner = new LastSubScopeCloner() { Name = "Copy Lower Layer" };60 59 var layerCreator = new LayerCreator() { Name = "Create new Layer" }; 61 60 var incrOpenLayers = new IntCounter() { Name = "Incr. OpenLayers" }; 62 61 var newLayerResultsCollector = new ResultsCollector() { Name = "Collect new Layer Results" }; 63 62 var newLayerSelector = new RightSelector(); 64 var newLayerProsessor = new SubScopesProcessor() ;63 var newLayerProsessor = new SubScopesProcessor() { Name = "NewLayerProcessor" }; 65 64 var newLayerLayerProcessor = new LayerUniformSubScopesProcessor(); 66 65 var newLayerReducer = new MergingReducer(); … … 71 70 var newResultCollectionAssigner = new Assigner() { Name = "Empty Results" }; 72 71 var regenerateLayerZeroSelector = new LeftSelector(); 73 var regenerateLayerZeroProsessor = new SubScopesProcessor() ;72 var regenerateLayerZeroProsessor = new SubScopesProcessor() { Name = "LayerZeroProcessor" }; 74 73 var regenerateLayerZeroLayerProsessor = new LayerUniformSubScopesProcessor(); 75 74 var regenerateLayerZeroReducer = new MergingReducer(); … … 95 94 96 95 updateLayersBranch.ConditionParameter.ActualName = "UpdateLayers"; 97 updateLayersBranch.TrueBranch = openNewLayerCalculator;96 updateLayersBranch.TrueBranch = maxLayerReached; 98 97 99 //openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntValue>("Generations")); 100 //openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntValue>("AgeGap")); 101 //openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntValue>("OpenLayers")); 102 //openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntValue>("NumberOfLayers")); 103 //openNewLayerCalculator.ExpressionParameter.Value = new StringValue("Generations AgeLimits [] OpenedLayers 1 - 1 + = false OpenLayers NumberOfLayers < if"); 104 //openNewLayerCalculator.ExpressionResultParameter.ActualName = "OpenNewLayer"; 98 maxLayerReached.LeftSideParameter.ActualName = "OpenLayers"; 99 maxLayerReached.RightSideParameter.ActualName = "NumberOfLayers"; 100 maxLayerReached.ResultParameter.ActualName = "MaxLayerReached"; 101 maxLayerReached.Comparison = new Comparison(ComparisonType.GreaterOrEqual); 102 maxLayerReached.Successor = maxLayerReachedBranch; 103 104 maxLayerReachedBranch.ConditionParameter.ActualName = "MaxLayerReached"; 105 maxLayerReachedBranch.FalseBranch = openNewLayerCalculator; 106 maxLayerReachedBranch.Successor = regenerateLayerZeroSelector; 107 108 openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntArray>("AgeLimits")); 109 openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntValue>("Generations")); 110 openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntValue>("NumberOfLayers")); 111 openNewLayerCalculator.CollectedValues.Add(new LookupParameter<IntValue>("OpenLayers")); 112 openNewLayerCalculator.ExpressionResultParameter.ActualName = "OpenNewLayer"; 113 openNewLayerCalculator.ExpressionParameter.Value = new StringValue("Generations 1 + AgeLimits OpenLayers 1 - [] >"); 105 114 openNewLayerCalculator.Successor = openNewLayerBranch; 106 115 107 116 openNewLayerBranch.ConditionParameter.ActualName = "OpenNewLayer"; 108 117 openNewLayerBranch.TrueBranch = layerCreator; 109 openNewLayerBranch.Successor = regenerateLayerZeroSelector;110 118 111 119 layerCreator.Successor = newLayerSelector; … … 135 143 incrEvaluatedSolutionsForNewLayer.ValueParameter.ActualName = "EvaluatedSolutions"; 136 144 incrEvaluatedSolutionsForNewLayer.AccumulateParameter.Value = new BoolValue(true); 137 //incrEvaluatedSolutionsForNewLayer.Successor = newResultCollectionAssigner;138 145 incrEvaluatedSolutionsForNewLayer.Successor = mainOperator; 139 146
Note: See TracChangeset
for help on using the changeset viewer.