- Timestamp:
- 03/31/15 16:57:05 (10 years ago)
- Location:
- branches/PTSP
- Files:
-
- 13 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PTSP/HeuristicLab.Problems.PTSP.Tests-3.3/PTSPMoveEvaluatorTest.cs
r12269 r12272 88 88 double afterMatrix = ePTSP.EvaluateWithParams(distances, ProbabilityMatrix, realizations, tour)[0]; 89 89 90 Assert.IsTrue( moveMatrix.IsAlmost(Math.Abs(afterMatrix - beforeMatrix)), string.Format(failureString, (Math.Abs(afterMatrix - beforeMatrix)).ToString()));90 Assert.IsTrue(Math.Abs(moveMatrix).IsAlmost(Math.Abs(afterMatrix - beforeMatrix)), string.Format(failureString, (Math.Abs(afterMatrix - beforeMatrix)).ToString())); 91 91 92 92 beforeMatrix = afterMatrix; … … 115 115 double afterMatrix = ePTSP.EvaluateWithParams(distances, ProbabilityMatrix, realizations, tour)[0]; 116 116 117 Assert.IsTrue( moveMatrix.IsAlmost(Math.Abs(afterMatrix - beforeMatrix)), string.Format(failureString, (Math.Abs(afterMatrix - beforeMatrix)).ToString()));117 Assert.IsTrue(Math.Abs(moveMatrix).IsAlmost(Math.Abs(afterMatrix - beforeMatrix)), string.Format(failureString, (Math.Abs(afterMatrix - beforeMatrix)).ToString())); 118 118 119 119 beforeMatrix = afterMatrix; -
branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs
r12269 r12272 95 95 Operators.Add(new PTSPExhaustiveInversionLocalImprovement()); 96 96 Operators.Add(new PTSPExhaustiveInsertionLocalImprovement()); 97 98 Operators.Add(new Exhaustive25MoveGenerator()); 99 Operators.Add(new Stochastic25MultiMoveGenerator()); 100 Operators.Add(new Stochastic25SingleMoveGenerator()); 101 Operators.Add(new TwoPointFiveMoveMaker()); 102 Operators.Add(new PTSP25MoveEvaluator()); 103 97 104 Encoding.ConfigureOperators(Operators.OfType<IOperator>()); 105 foreach (var twopointfiveMoveOperator in Operators.OfType<I25MoveOperator>()) { 106 twopointfiveMoveOperator.TwoPointFiveMoveParameter.ActualName = "Permutation.TwoPointFiveMove"; 107 } 98 108 } 99 109 … … 156 166 op.RealizationsParameter.Value = realizations; 157 167 } 168 foreach (var op in Operators.OfType<PTSP25MoveEvaluator>()) { 169 op.RealizationsParameter.Value = realizations; 170 } 171 158 172 } 159 173 } -
branches/PTSP/HeuristicLab.Problems.PTSP/3.3/HeuristicLab.Problems.PTSP-3.3.csproj
r12261 r12272 119 119 <Compile Include="Improvers\PTSPExhaustiveInsertionLocalImprovement.cs" /> 120 120 <Compile Include="Improvers\PTSPExhaustiveInversionLocalImprovement.cs" /> 121 <Compile Include="Interfaces\I25MoveOperator.cs" /> 121 122 <Compile Include="Interfaces\IPTSPPathMoveEvaluator.cs" /> 122 123 <Compile Include="Interfaces\IPTSPMoveEvaluator.cs" /> … … 126 127 <Compile Include="MoveEvaluators\TwoOpt\PTSPAnalyticalInversionMovePathEvaluator.cs" /> 127 128 <Compile Include="MoveEvaluators\TwoOpt\PTSPEstimatedInversionMovePathEvaluator.cs" /> 129 <Compile Include="MoveEvaluators\TwoPointFiveOpt\PTSP25MoveEvaluator.cs" /> 130 <Compile Include="MoveGenerators\Exhaustive25MoveGenerator.cs" /> 131 <Compile Include="MoveGenerators\Stochastic25MultiMoveGenerator.cs" /> 132 <Compile Include="MoveGenerators\Stochastic25SingleMoveGenerator.cs" /> 133 <Compile Include="MoveGenerators\TwoPointFiveMoveGenerator.cs" /> 134 <Compile Include="MoveMakers\TwoPointFiveMoveMaker.cs" /> 135 <Compile Include="Moves\TwoPointFiveOpt\TwoPointFiveMove.cs" /> 128 136 <Compile Include="PathPTSPTour.cs" /> 129 137 <Compile Include="PTSP.cs" /> -
branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/OneShift/PTSPEstimatedInsertionEvaluator.cs
r12261 r12272 157 157 } 158 158 // return average of cost differences 159 return Math.Abs(moveQuality)/ realizations.Capacity;159 return moveQuality / realizations.Capacity; 160 160 } 161 161 -
branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoOpt/PTSPEstimatedInversionMovePathEvaluator.cs
r12261 r12272 119 119 } 120 120 // return average of cost differences 121 return Math.Abs(moveQuality)/ realizations.Capacity;121 return moveQuality / realizations.Capacity; 122 122 } 123 123
Note: See TracChangeset
for help on using the changeset viewer.