Changeset 13206
- Timestamp:
- 11/17/15 12:15:00 (9 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3
- Files:
-
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs
r13128 r13206 280 280 281 281 Parameters.Add(new ValueParameter<IntValue>("NumberOfLayers", "The number of layers.", new IntValue(10))); 282 Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions each layer.", new IntValue(100)));282 Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions in each layer.", new IntValue(100))); 283 283 284 284 Parameters.Add(new ConstrainedValueParameter<ISelector>("Selector", "The operator used to select solutions for reproduction.")); … … 293 293 Parameters.Add(new ValueParameter<IntValue>("AgeGap", "The frequency of reseeding the lowest layer and scaling factor for the age-limits for the layers.", new IntValue(20))); 294 294 Parameters.Add(new ValueParameter<DoubleValue>("AgeInheritance", "A weight that determines the age of a child after crossover based on the older (1.0) and younger (0.0) parent.", new DoubleValue(1.0)) { Hidden = true }); 295 Parameters.Add(new ValueParameter<IntArray>("AgeLimits", "The maximum age s for the Layers.", new IntArray(new int[0])) { Hidden = true });295 Parameters.Add(new ValueParameter<IntArray>("AgeLimits", "The maximum age an individual is allowed to reach in a certain layer.", new IntArray(new int[0])) { Hidden = true }); 296 296 297 297 Parameters.Add(new ValueParameter<IntValue>("MatingPoolRange", "The range of layers used for creating a mating pool. (1 = current + previous layer)", new IntValue(1)) { Hidden = true }); … … 309 309 var initializeAgeProcessor = new UniformSubScopesProcessor(); 310 310 var initializeAge = new VariableCreator() { Name = "Initialize Age" }; 311 var initializeCurrentPopulationSize = new SubScopesCounter() { Name = "Init CurrentPopulationCounter" };311 var initializeCurrentPopulationSize = new SubScopesCounter() { Name = "Initialize CurrentPopulationCounter" }; 312 312 var initializeLocalEvaluatedSolutions = new Assigner() { Name = "Initialize LayerEvaluatedSolutions" }; 313 313 var initializeGlobalEvaluatedSolutions = new DataReducer() { Name = "Initialize EvaluatedSolutions" }; -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs
r13128 r13206 142 142 143 143 Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfLayers", "The number of layers.")); 144 Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population ."));144 Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population of solutions in each layer.")); 145 145 Parameters.Add(new LookupParameter<IntValue>("CurrentPopulationSize", "The current size of the population.")); 146 146 … … 156 156 Parameters.Add(new ValueLookupParameter<IntValue>("AgeGap", "The frequency of reseeding the lowest layer and scaling factor for the age-limits for the layers.")); 157 157 Parameters.Add(new ValueLookupParameter<DoubleValue>("AgeInheritance", "A weight that determines the age of a child after crossover based on the older (1.0) and younger (0.0) parent.")); 158 Parameters.Add(new ValueLookupParameter<IntArray>("AgeLimits", "The maximum age s for the Layers."));158 Parameters.Add(new ValueLookupParameter<IntArray>("AgeLimits", "The maximum age an individual is allowed to reach in a certain layer.")); 159 159 160 160 Parameters.Add(new ValueLookupParameter<IntValue>("MatingPoolRange", "The range of sub - populations used for creating a mating pool. (1 = current + previous sub-population)")); … … 271 271 var selectorProsessor = new UniformSubScopesProcessor(); 272 272 var eldersSelector = new EldersSelector(); 273 var shiftToRightMigrator = new UnidirectionalRingMigrator() { Name = "Shift elders to next Layer" };273 var shiftToRightMigrator = new UnidirectionalRingMigrator() { Name = "Shift elders to next layer" }; 274 274 var mergingProsessor = new UniformSubScopesProcessor(); 275 275 var mergingReducer = new MergingReducer(); … … 324 324 var openNewLayerCalculator = new ExpressionCalculator() { Name = "OpenNewLayer = Generations >= AgeLimits[OpenLayers - 1]" }; 325 325 var openNewLayerBranch = new ConditionalBranch() { Name = "OpenNewLayer?" }; 326 var layerCreator = new Last ScopeCloner() { Name = "Create Layer" };326 var layerCreator = new LastLayerCloner() { Name = "Create Layer" }; 327 327 var updateLayerNumber = new Assigner() { Name = "Layer = OpenLayers" }; 328 328 var historyWiper = new ResultsHistoryWiper() { Name = "Clear History in Results" }; … … 354 354 openNewLayerBranch.TrueBranch = layerCreator; 355 355 356 layerCreator.New ScopeOperator = updateLayerNumber;356 layerCreator.NewLayerOperator = updateLayerNumber; 357 357 layerCreator.Successor = incrOpenLayers; 358 358 -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainOperator.cs
r13125 r13206 104 104 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false.")); 105 105 106 Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population ."));106 Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population of solutions in each layer.")); 107 107 Parameters.Add(new ValueLookupParameter<IOperator>("Selector", "The operator used to select solutions for reproduction.")); 108 108 Parameters.Add(new ValueLookupParameter<IOperator>("Crossover", "The operator used to cross solutions.")); -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/EldersSelector.cs
r13127 r13206 31 31 namespace HeuristicLab.Algorithms.ALPS { 32 32 33 [Item("EldersSelector", "Select all individuals which are to old for their current layer.")]33 [Item("EldersSelector", "Select all individuals which are too old for their current layer.")] 34 34 [StorableClass] 35 35 public sealed class EldersSelector : Selector { … … 58 58 : base() { 59 59 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Age", "The age of individuals.")); 60 Parameters.Add(new LookupParameter<IntArray>("AgeLimits", "The maximum age s for the Layers."));60 Parameters.Add(new LookupParameter<IntArray>("AgeLimits", "The maximum age an individual is allowed to reach in a certain layer.")); 61 61 Parameters.Add(new LookupParameter<IntValue>("NumberOfLayers", "The number of layers.")); 62 Parameters.Add(new LookupParameter<IntValue>("Layer", "The number of the current Layer."));62 Parameters.Add(new LookupParameter<IntValue>("Layer", "The number of the current layer.")); 63 63 } 64 64 -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj
r13129 r13206 137 137 <Compile Include="Analyzers\OldestAverageYoungestAgeCalculator.cs" /> 138 138 <Compile Include="EldersSelector.cs" /> 139 <Compile Include="Last ScopeCloner.cs" />139 <Compile Include="LastLayerCloner.cs" /> 140 140 <Compile Include="MatingPoolCreator.cs" /> 141 141 <Compile Include="Plugin.cs" /> … … 148 148 </ItemGroup> 149 149 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 150 <PropertyGroup>151 <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)152 set ProjectDir=$(ProjectDir)153 set SolutionDir=$(SolutionDir)154 set Outdir=$(Outdir)155 156 call PreBuildEvent.cmd</PreBuildEvent>157 </PropertyGroup>158 150 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 159 151 Other similar extension points exist, see Microsoft.Common.targets. … … 163 155 </Target> 164 156 --> 157 <PropertyGroup> 158 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 159 set ProjectDir=$(ProjectDir) 160 set SolutionDir=$(SolutionDir) 161 set Outdir=$(Outdir) 162 163 call PreBuildEvent.cmd 164 </PreBuildEvent> 165 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 166 export ProjectDir=$(ProjectDir) 167 export SolutionDir=$(SolutionDir) 168 169 $SolutionDir/PreBuildEvent.sh 170 </PreBuildEvent> 171 </PropertyGroup> 165 172 </Project> -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/LastLayerCloner.cs
r13203 r13206 29 29 30 30 namespace HeuristicLab.Algorithms.ALPS { 31 [Item("Last ScopeCloner", "An operator that creates a new scopeby cloning the current last one.")]31 [Item("LastLayerCloner", "An operator that creates a new layer by cloning the current last one.")] 32 32 [StorableClass] 33 public sealed class Last ScopeCloner : SingleSuccessorOperator {34 public OperatorParameter New ScopeOperatorParameter {35 get { return (OperatorParameter)Parameters["New ScopeOperator"]; }33 public sealed class LastLayerCloner : SingleSuccessorOperator { 34 public OperatorParameter NewLayerOperatorParameter { 35 get { return (OperatorParameter)Parameters["NewLayerOperator"]; } 36 36 } 37 37 38 public IOperator New ScopeOperator {39 get { return New ScopeOperatorParameter.Value; }40 set { New ScopeOperatorParameter.Value = value; }38 public IOperator NewLayerOperator { 39 get { return NewLayerOperatorParameter.Value; } 40 set { NewLayerOperatorParameter.Value = value; } 41 41 } 42 42 43 43 [StorableConstructor] 44 private Last ScopeCloner(bool deserializing) : base(deserializing) { }44 private LastLayerCloner(bool deserializing) : base(deserializing) { } 45 45 46 private Last ScopeCloner(LastScopeCloner original, Cloner cloner)46 private LastLayerCloner(LastLayerCloner original, Cloner cloner) 47 47 : base(original, cloner) { 48 48 } 49 49 public override IDeepCloneable Clone(Cloner cloner) { 50 return new Last ScopeCloner(this, cloner);50 return new LastLayerCloner(this, cloner); 51 51 } 52 52 53 public Last ScopeCloner()53 public LastLayerCloner() 54 54 : base() { 55 Parameters.Add(new OperatorParameter("New ScopeOperator", "An Operator that is performed on the new scope."));55 Parameters.Add(new OperatorParameter("NewLayerOperator", "An operator that is performed on the new layer.")); 56 56 } 57 57 … … 70 70 71 71 var next = new OperationCollection(base.Apply()); 72 if (New ScopeOperator != null)73 next.Insert(0, ExecutionContext.CreateOperation(New ScopeOperator, newScope));72 if (NewLayerOperator != null) 73 next.Insert(0, ExecutionContext.CreateOperation(NewLayerOperator, newScope)); 74 74 return next; 75 75 } -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/MatingPoolCreator.cs
r13128 r13206 28 28 29 29 namespace HeuristicLab.Algorithms.ALPS { 30 [Item("MatingPoolCreator", "An operator which creat ingmating pools based on a set of sub-populations. For each sub-population, the individuals from the previous sub-population are copied into the current sub-population.")]30 [Item("MatingPoolCreator", "An operator which creates mating pools based on a set of sub-populations. For each sub-population, the individuals from the previous sub-population are copied into the current sub-population.")] 31 31 [StorableClass] 32 32 public sealed class MatingPoolCreator : SingleSuccessorOperator { … … 45 45 public MatingPoolCreator() 46 46 : base() { 47 Parameters.Add(new ValueLookupParameter<IntValue>("MatingPoolRange", "The range of sub-populations used for creating a mating pool. (1 = current + previous sub-population ", new IntValue(1)));47 Parameters.Add(new ValueLookupParameter<IntValue>("MatingPoolRange", "The range of sub-populations used for creating a mating pool. (1 = current + previous sub-population)", new IntValue(1))); 48 48 } 49 49 50 50 /// <summary> 51 /// Copies the subscopes of the n previous scope into the current scope. (default n = 1)51 /// Copies the subscopes of the n previous scopes into the current scope. (default n = 1) 52 52 /// <pre> 53 53 /// __ scope __ __ scope __ -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/Properties/AssemblyInfo.cs.frame
r12018 r13206 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.3.0.0")] 55 [assembly: AssemblyFileVersion("3.3.1 1.$WCREV$")]55 [assembly: AssemblyFileVersion("3.3.12.$WCREV$")] -
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/ReseedingController.cs
r13127 r13206 61 61 Parameters.Add(new LookupParameter<IntValue>("Generations", "The current number of generations.")); 62 62 Parameters.Add(new ValueLookupParameter<IntValue>("AgeGap", "The frequency of reseeding the lowest layer and scaling factor for the age-limits for the layers.")); 63 Parameters.Add(new OperatorParameter("FirstLayerOperator", "The Operator that is performed on the first layer if reseeding is required."));63 Parameters.Add(new OperatorParameter("FirstLayerOperator", "The operator that is performed on the first layer if reseeding is required.")); 64 64 } 65 65
Note: See TracChangeset
for help on using the changeset viewer.