Changeset 9363 for branches/OaaS/HeuristicLab.Algorithms.GeneticAlgorithm
- Timestamp:
- 04/16/13 13:13:41 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
r8121 r9363 255 255 } 256 256 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 257 foreach (IOperator op in Problem.Operators ) ParameterizeStochasticOperator(op);257 foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op); 258 258 ParameterizeIterationBasedOperators(); 259 259 UpdateCrossovers(); -
branches/OaaS/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj
r6866 r9363 214 214 --> 215 215 <PropertyGroup> 216 <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)216 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 217 217 set ProjectDir=$(ProjectDir) 218 218 set SolutionDir=$(SolutionDir) … … 221 221 call PreBuildEvent.cmd 222 222 </PreBuildEvent> 223 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 224 export ProjectDir=$(ProjectDir) 225 export SolutionDir=$(SolutionDir) 226 227 $SolutionDir/PreBuildEvent.sh 228 </PreBuildEvent> 223 229 </PropertyGroup> 224 230 </Project> -
branches/OaaS/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
r8121 r9363 181 181 } 182 182 private UniformSubScopesProcessor IslandProcessor { 183 get { return ((RandomCreator.Successor as SubScopesCreator).Successor as UniformSubScopesProcessor); }183 get { return OperatorGraph.Iterate().OfType<UniformSubScopesProcessor>().First(x => x.Operator is SolutionsCreator); } 184 184 } 185 185 private SolutionsCreator SolutionsCreator { … … 232 232 233 233 RandomCreator randomCreator = new RandomCreator(); 234 UniformSubScopesProcessor ussp0 = new UniformSubScopesProcessor(); 235 LocalRandomCreator localRandomCreator = new LocalRandomCreator(); 236 RandomCreator globalRandomResetter = new RandomCreator(); 234 237 SubScopesCreator populationCreator = new SubScopesCreator(); 235 238 UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor(); … … 250 253 251 254 populationCreator.NumberOfSubScopesParameter.ActualName = NumberOfIslandsParameter.Name; 252 populationCreator.Successor = ussp1; 255 populationCreator.Successor = ussp0; 256 257 ussp0.Operator = localRandomCreator; 258 ussp0.Successor = globalRandomResetter; 259 260 // BackwardsCompatibility3.3 261 // the global random is resetted to ensure the same algorithm results 262 #region Backwards compatible code, remove global random resetter with 3.4 and rewire the operator graph 263 globalRandomResetter.RandomParameter.ActualName = "GlobalRandom"; 264 globalRandomResetter.SeedParameter.ActualName = SeedParameter.Name; 265 globalRandomResetter.SeedParameter.Value = null; 266 globalRandomResetter.SetSeedRandomlyParameter.Value = new BoolValue(false); 267 globalRandomResetter.Successor = ussp1; 268 #endregion 253 269 254 270 ussp1.Operator = solutionsCreator; … … 325 341 protected override void OnProblemChanged() { 326 342 ParameterizeStochasticOperator(Problem.SolutionCreator); 327 ParameterizeStochasticOperator (Problem.Evaluator);343 ParameterizeStochasticOperatorForIsland(Problem.Evaluator); 328 344 foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op); 329 345 ParameterizeSolutionsCreator(); … … 345 361 } 346 362 protected override void Problem_EvaluatorChanged(object sender, EventArgs e) { 347 ParameterizeStochasticOperator (Problem.Evaluator);363 ParameterizeStochasticOperatorForIsland(Problem.Evaluator); 348 364 ParameterizeSolutionsCreator(); 349 365 ParameterizeMainLoop(); -
branches/OaaS/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs
r7395 r9363 313 313 uniformSubScopesProcessor0.Successor = analyzer1; 314 314 islandVariableCreator.Successor = islandAnalyzer1; 315 // BackwardsCompatibility3.3 316 //the local randoms are created by the island GA itself and are only here to ensure same algorithm results 317 #region Backwards compatible code, remove local random creator with 3.4 and rewire the operator graph 315 318 islandAnalyzer1.Successor = localRandomCreator; 316 319 localRandomCreator.Successor = null; 320 #endregion 317 321 analyzer1.Successor = resultsCollector1; 318 322 resultsCollector1.Successor = uniformSubScopesProcessor1; -
branches/OaaS/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Plugin.cs.frame
r7259 r9363 26 26 /// Plugin class for HeuristicLab.Algorithms.GeneticAlgorithm plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Algorithms.GeneticAlgorithm", "3.3. 6.$WCREV$")]28 [Plugin("HeuristicLab.Algorithms.GeneticAlgorithm", "3.3.7.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/OaaS/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Properties/AssemblyInfo.cs.frame
r7259 r9363 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.3.0.0")] 55 [assembly: AssemblyFileVersion("3.3. 6.$WCREV$")]55 [assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.