Changeset 8775
- Timestamp:
- 10/10/12 11:45:31 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
r8600 r8775 125 125 <EmbeddedResource Include="Documents\PSO_Schwefel.hl" /> 126 126 <EmbeddedResource Include="Documents\TS_VRP.hl" /> 127 <EmbeddedResource Include="Documents\SS_VRP.hl" /> 127 128 <None Include="Plugin.cs.frame" /> 128 129 <Compile Include="DefineArithmeticProgressionDialog.cs"> … … 340 341 --> 341 342 <PropertyGroup> 342 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)343 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 343 344 set ProjectDir=$(ProjectDir) 344 345 set SolutionDir=$(SolutionDir) … … 347 348 call PreBuildEvent.cmd 348 349 </PreBuildEvent> 349 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">350 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 350 351 export ProjectDir=$(ProjectDir) 351 352 export SolutionDir=$(SolutionDir) -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
r8740 r8775 28 28 using HeuristicLab.Algorithms.LocalSearch; 29 29 using HeuristicLab.Algorithms.ParticleSwarmOptimization; 30 using HeuristicLab.Algorithms.ScatterSearch; 30 31 using HeuristicLab.Algorithms.SimulatedAnnealing; 31 32 using HeuristicLab.Algorithms.TabuSearch; … … 57 58 using HeuristicLab.Problems.VehicleRouting.ProblemInstances; 58 59 using HeuristicLab.Selection; 60 using HeuristicLab.SequentialEngine; 59 61 using Microsoft.VisualStudio.TestTools.UnitTesting; 60 62 … … 950 952 #endregion 951 953 954 #region Scatter Search 955 #region VRP 956 [TestMethod] 957 public void CreateScatterSearchVRPSampleTest() { 958 var ss = CreateScatterSearchVRPSample(); 959 XmlGenerator.Serialize(ss, "../../SS_VRP.hl"); 960 } 961 962 [TestMethod] 963 public void RunScatterSearchVRPSampleTest() { 964 var ss = CreateScatterSearchVRPSample(); 965 ss.SetSeedRandomly.Value = false; 966 RunAlgorithm(ss); 967 Assert.AreEqual(749, GetDoubleResult(ss, "BestQuality")); 968 Assert.AreEqual(766.95, GetDoubleResult(ss, "CurrentAverageQuality")); 969 Assert.AreEqual(789, GetDoubleResult(ss, "CurrentWorstQuality")); 970 Assert.AreEqual(27400, GetIntResult(ss, "EvaluatedSolutions")); 971 } 972 973 private ScatterSearch CreateScatterSearchVRPSample() { 974 #region Problem Configuration 975 var provider = new AugeratInstanceProvider(); 976 var instance = provider.GetDataDescriptors().Where(x => x.Name == "A-n38-k5").Single(); 977 VehicleRoutingProblem vrpProblem = new VehicleRoutingProblem(); 978 vrpProblem.Load(provider.LoadData(instance)); 979 #endregion 980 981 #region Algorithm Configuration 982 ScatterSearch ss = new ScatterSearch(); 983 ss.Engine = new SequentialEngine(); 984 ss.Name = "Scatter Search - VRP"; 985 ss.Description = "A Scatter Search algorithm which solves the \"A-n38-k5\" vehicle routing problem (imported from Augerat)"; 986 ss.Problem = vrpProblem; 987 988 var improver = ss.Problem.Operators.OfType<VRPImprovementOperator>().First(); 989 improver.ImprovementAttemptsParameter.Value.Value = 5; 990 improver.SampleSizeParameter.Value.Value = 5; 991 ss.Improver = improver; 992 993 var pathRelinker = ss.Problem.Operators.OfType<VRPPathRelinker>().First(); 994 pathRelinker.IterationsParameter.Value.Value = 15; 995 ss.PathRelinker = pathRelinker; 996 997 var qualitySimCalc = ss.SimilarityCalculatorParameter.ValidValues.OfType<QualitySimilarityCalculator>().First(); 998 ss.SimilarityCalculator = qualitySimCalc; 999 1000 ss.MaximumIterations.Value = 5; 1001 ss.Seed.Value = 0; 1002 return ss; 1003 #endregion 1004 } 1005 #endregion 1006 #endregion 1007 952 1008 #region Helpers 953 1009 private void ConfigureEvolutionStrategyParameters<R, M, SC, SR, SM>(EvolutionStrategy es, int popSize, int children, int parentsPerChild, int maxGens, bool plusSelection) -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r8757 r8775 119 119 <Reference Include="HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 120 120 <HintPath>..\bin\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.dll</HintPath> 121 </Reference> 122 <Reference Include="HeuristicLab.Algorithms.RAPGA-3.3"> 123 <HintPath>..\bin\HeuristicLab.Algorithms.RAPGA-3.3.dll</HintPath> 124 </Reference> 125 <Reference Include="HeuristicLab.Algorithms.ScatterSearch-3.3"> 126 <HintPath>..\bin\HeuristicLab.Algorithms.ScatterSearch-3.3.dll</HintPath> 121 127 </Reference> 122 128 <Reference Include="HeuristicLab.Algorithms.SimulatedAnnealing-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
Note: See TracChangeset
for help on using the changeset viewer.