Changeset 4374 for branches/VRP/HeuristicLab.Problems.VehicleRouting
- Timestamp:
- 09/08/10 17:26:26 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4
- Files:
-
- 20 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj
r4370 r4374 106 106 </ItemGroup> 107 107 <ItemGroup> 108 <Compile Include="Analyzer\BestAverageWorstTours\BestAverageWorstVRPToursAnalyzer.cs" /> 109 <Compile Include="Analyzer\BestAverageWorstTours\BestAverageWorstVRPToursCalculator.cs" /> 110 <Compile Include="Analyzer\BestAverageWorstTours\BestVRPToursMemorizer.cs" /> 111 <Compile Include="Analyzer\BestAverageWorstTours\Capacitated\BestAverageWorstCapacitatedVRPToursAnalyzer.cs" /> 112 <Compile Include="Analyzer\BestAverageWorstTours\Capacitated\BestAverageWorstCapacitatedVRPToursCalculator.cs" /> 113 <Compile Include="Analyzer\BestAverageWorstTours\Capacitated\BestCapacitatedVRPToursMemorizer.cs" /> 114 <Compile Include="Analyzer\BestAverageWorstTours\TimeWindowed\BestAverageWorstTimeWindowedVRPToursAnalyzer.cs" /> 115 <Compile Include="Analyzer\BestAverageWorstTours\TimeWindowed\BestAverageWorstTimeWindowedVRPToursCalculator.cs" /> 116 <Compile Include="Analyzer\BestAverageWorstTours\TimeWindowed\BestTimeWindowedVRPToursMemorizer.cs" /> 117 <Compile Include="Analyzer\BestSolution\BestVRPSolutionAnalyzer.cs" /> 118 <Compile Include="Analyzer\BestSolution\Capacitated\BestCapacitatedVRPSolutionAnalyzer.cs" /> 119 <Compile Include="Analyzer\BestSolution\TimeWindowed\BestTimeWindowedVRPSolutionAnalyzer.cs" /> 120 <Compile Include="Analyzer\VRPSolution.cs" /> 108 121 <Compile Include="Encodings\Alba\AlbaEncoding.cs" /> 109 122 <Compile Include="Encodings\Alba\Creators\DefaultRepresentationCreator.cs" /> -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs
r4363 r4374 52 52 set { OverloadPenaltyParameter.Value = value; } 53 53 } 54 55 public override IEnumerable<IOperator> Operators { 56 get { 57 return base.Operators 54 55 protected override IEnumerable<IOperator> GetOperators() { 56 return base.GetOperators() 58 57 .Where(o => o is ICapacitatedOperator).Cast<IOperator>(); 59 } 58 } 59 60 protected override IEnumerable<IOperator> GetAnalyzers() { 61 return ApplicationManager.Manager.GetInstances<ICapacitatedOperator>() 62 .Where(o => o is IAnalyzer) 63 .Cast<IOperator>().Union(base.GetAnalyzers()); 60 64 } 61 65 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluator.cs
r4363 r4374 40 40 public ILookupParameter<DoubleValue> TardinessParameter { 41 41 get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; } 42 } 43 44 public ILookupParameter<DoubleValue> TravelTimeParameter { 45 get { return (ILookupParameter<DoubleValue>)Parameters["TravelTime"]; } 42 46 } 43 47 … … 87 91 88 92 (eval as CVRPTWEvaluation).Tardiness = tardiness; 93 (eval as CVRPTWEvaluation).TravelTime = time; 94 89 95 double penalty = tardiness * vrptw.TardinessPenalty.Value; 90 96 eval.Penalty += penalty; … … 97 103 98 104 TardinessParameter.ActualValue = new DoubleValue(0); 105 TravelTimeParameter.ActualValue = new DoubleValue(0); 99 106 } 100 107 … … 103 110 104 111 TardinessParameter.ActualValue.Value += (tourEvaluation as CVRPTWEvaluation).Tardiness; 112 TravelTimeParameter.ActualValue.Value += (tourEvaluation as CVRPTWEvaluation).TravelTime; 105 113 } 106 114 … … 110 118 public CVRPTWEvaluator() { 111 119 Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness.")); 120 Parameters.Add(new LookupParameter<DoubleValue>("TravelTime", "The travel time.")); 112 121 } 113 122 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs
r4363 r4374 74 74 set { TardinessPenaltyParameter.Value = value; } 75 75 } 76 77 public override IEnumerable<IOperator> Operators { 78 get { 79 return base.Operators 80 .Where(o => o is ITimeWindowedOperator).Cast<IOperator>(); 81 } 76 77 protected override IEnumerable<IOperator> GetOperators() { 78 return base.GetOperators() 79 .Where(o => o is ITimeWindowedOperator).Cast<IOperator>(); 82 80 } 83 81 82 protected override IEnumerable<IOperator> GetAnalyzers() { 83 return ApplicationManager.Manager.GetInstances<ITimeWindowedOperator>() 84 .Where(o => o is IAnalyzer) 85 .Cast<IOperator>().Union(base.GetAnalyzers()); 86 } 87 84 88 protected override IVRPEvaluator Evaluator { 85 89 get { -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/SingleDepotVRPProblemInstance.cs
r4365 r4374 37 37 [StorableClass] 38 38 public class SingleDepotVRPProblemInstance: VRPProblemInstance, ISingleDepotProblemInstance { 39 public override IEnumerable<IOperator> Operators { 40 get { 41 return ApplicationManager.Manager.GetInstances<ISingleDepotOperator>().Cast<IOperator>(); 42 } 39 protected override IEnumerable<IOperator> GetOperators() { 40 return ApplicationManager.Manager.GetInstances<ISingleDepotOperator>().Cast<IOperator>(); 41 } 42 43 protected override IEnumerable<IOperator> GetAnalyzers() { 44 return ApplicationManager.Manager.GetInstances<ISingleDepotOperator>() 45 .Where(o => o is IAnalyzer) 46 .Cast<IOperator>(); 43 47 } 44 48 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs
r4365 r4374 44 44 } 45 45 46 public abstract IEnumerable<IOperator> Operators { get; } 46 protected abstract IEnumerable<IOperator> GetOperators(); 47 protected abstract IEnumerable<IOperator> GetAnalyzers(); 48 49 public IEnumerable<IOperator> Operators { 50 get { 51 return GetOperators().Union(GetAnalyzers()); 52 } 53 } 47 54 48 55 protected ValueParameter<DoubleMatrix> CoordinatesParameter {
Note: See TracChangeset
for help on using the changeset viewer.