- Timestamp:
- 10/10/12 14:31:22 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
r8775 r8780 126 126 <EmbeddedResource Include="Documents\TS_VRP.hl" /> 127 127 <EmbeddedResource Include="Documents\SS_VRP.hl" /> 128 <EmbeddedResource Include="Documents\RAPGA_JSSP.hl" /> 128 129 <None Include="Plugin.cs.frame" /> 129 130 <Compile Include="DefineArithmeticProgressionDialog.cs"> -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
r8775 r8780 28 28 using HeuristicLab.Algorithms.LocalSearch; 29 29 using HeuristicLab.Algorithms.ParticleSwarmOptimization; 30 using HeuristicLab.Algorithms.RAPGA; 30 31 using HeuristicLab.Algorithms.ScatterSearch; 31 32 using HeuristicLab.Algorithms.SimulatedAnnealing; … … 36 37 using HeuristicLab.Encodings.PermutationEncoding; 37 38 using HeuristicLab.Encodings.RealVectorEncoding; 39 using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix; 38 40 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 39 41 using HeuristicLab.Optimization; … … 51 53 using HeuristicLab.Problems.Instances.VehicleRouting; 52 54 using HeuristicLab.Problems.Knapsack; 55 using HeuristicLab.Problems.Scheduling; 53 56 using HeuristicLab.Problems.TestFunctions; 54 57 using HeuristicLab.Problems.TravelingSalesman; … … 1006 1009 #endregion 1007 1010 1011 #region RAPGA 1012 #region Scheduling 1013 [TestMethod] 1014 public void CreateRAPGASchedulingSampleTest() { 1015 var ss = CreateRAPGASchedulingSample(); 1016 XmlGenerator.Serialize(ss, "../../RAPGA_JSSP.hl"); 1017 } 1018 1019 [TestMethod] 1020 public void RunRAPGASchedulingSampleTest() { 1021 var rapga = CreateRAPGASchedulingSample(); 1022 rapga.SetSeedRandomly.Value = false; 1023 RunAlgorithm(rapga); 1024 Assert.AreEqual(982.00, GetDoubleResult(rapga, "BestQuality")); 1025 Assert.AreEqual(982.00, GetDoubleResult(rapga, "CurrentAverageQuality")); 1026 Assert.AreEqual(982.00, GetDoubleResult(rapga, "CurrentWorstQuality")); 1027 Assert.AreEqual(29100, GetIntResult(rapga, "EvaluatedSolutions")); 1028 } 1029 1030 private RAPGA CreateRAPGASchedulingSample() { 1031 #region Problem Configuration 1032 JobShopSchedulingProblem problem = new JobShopSchedulingProblem(); 1033 #endregion 1034 1035 #region Algorithm Configuration 1036 RAPGA rapga = new RAPGA(); 1037 rapga.Engine = new SequentialEngine(); 1038 rapga.Name = "RAPGA - Job Shop Scheduling"; 1039 rapga.Description = "A relevant alleles preserving genetic algorithm which solves a job shop scheduling problem"; 1040 rapga.Problem = problem; 1041 rapga.Mutator = rapga.MutatorParameter.ValidValues.OfType<JSMSwapManipulator>().First(); 1042 rapga.Seed.Value = 0; 1043 return rapga; 1044 #endregion 1045 } 1046 #endregion 1047 #endregion 1048 1008 1049 #region Helpers 1009 1050 private void ConfigureEvolutionStrategyParameters<R, M, SC, SR, SM>(EvolutionStrategy es, int popSize, int children, int parentsPerChild, int maxGens, bool plusSelection)
Note: See TracChangeset
for help on using the changeset viewer.