Changeset 7864 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP
- Timestamp:
- 05/22/12 09:38:54 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs
r7852 r7864 50 50 } 51 51 52 [Storable] 53 private DoubleValue currentOverloadPenalty; 52 protected IValueParameter<DoubleValue> CurrentOverloadPenaltyParameter { 53 get { return (IValueParameter<DoubleValue>)Parameters["CurrentOverloadPenalty"]; } 54 } 54 55 55 56 public DoubleValue OverloadPenalty { 56 57 get { 58 DoubleValue currentOverloadPenalty = CurrentOverloadPenaltyParameter.Value; 57 59 if (currentOverloadPenalty != null) 58 60 return currentOverloadPenalty; 59 61 else 60 62 return OverloadPenaltyParameter.Value; } 61 set { currentOverloadPenalty= value; }63 set { CurrentOverloadPenaltyParameter.Value = value; } 62 64 } 63 65 … … 85 87 Parameters.Add(new ValueParameter<DoubleValue>("Capacity", "The capacity of each vehicle.", new DoubleValue(0))); 86 88 Parameters.Add(new ValueParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(100))); 89 Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentOverloadPenalty", "The current overload penalty considered in the evaluation.")); 87 90 88 91 AttachEventHandlers(); … … 95 98 protected CVRPProblemInstance(CVRPProblemInstance original, Cloner cloner) 96 99 : base(original, cloner) { 97 currentOverloadPenalty = cloner.Clone(original.currentOverloadPenalty) as DoubleValue;98 99 100 AttachEventHandlers(); 100 101 } … … 115 116 base.InitializeState(); 116 117 117 currentOverloadPenalty= null;118 CurrentOverloadPenaltyParameter.Value = null; 118 119 } 119 120 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWProblemInstance.cs
r6856 r7864 50 50 } 51 51 52 [Storable] 53 private DoubleValue currentPickupViolationPenalty; 52 protected IValueParameter<DoubleValue> CurrentPickupViolationPenaltyParameter { 53 get { return (IValueParameter<DoubleValue>)Parameters["CurrentPickupViolationPenalty"]; } 54 } 54 55 55 56 public DoubleValue PickupViolationPenalty { 56 57 get { 58 DoubleValue currentPickupViolationPenalty = CurrentPickupViolationPenaltyParameter.Value; 57 59 if (currentPickupViolationPenalty != null) 58 60 return currentPickupViolationPenalty; … … 60 62 return PickupViolationPenaltyParameter.Value; 61 63 } 62 set { currentPickupViolationPenalty= value; }64 set { CurrentPickupViolationPenaltyParameter.Value = value; } 63 65 } 64 66 … … 93 95 94 96 Parameters.Add(new ValueParameter<DoubleValue>("EvalPickupViolationPenalty", "The pickup violation penalty considered in the evaluation.", new DoubleValue(100))); 97 Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentPickupViolationPenalty", "The current pickup violation penalty considered in the evaluation.")); 95 98 96 99 AttachEventHandlers(); … … 103 106 protected CVRPPDTWProblemInstance(CVRPPDTWProblemInstance original, Cloner cloner) 104 107 : base(original, cloner) { 105 currentPickupViolationPenalty = cloner.Clone(original.currentPickupViolationPenalty) as DoubleValue;106 107 108 AttachEventHandlers(); 108 109 } … … 120 121 base.InitializeState(); 121 122 122 currentPickupViolationPenalty= null;123 CurrentPickupViolationPenaltyParameter.Value = null; 123 124 } 124 125 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs
r6711 r7864 72 72 } 73 73 74 [Storable] 75 private DoubleValue currentTardinessPenalty; 74 protected IValueParameter<DoubleValue> CurrentTardinessPenaltyParameter { 75 get { return (IValueParameter<DoubleValue>)Parameters["CurrentTardinessPenalty"]; } 76 } 76 77 77 78 public DoubleValue TardinessPenalty { 78 79 get { 80 DoubleValue currentTardinessPenalty = CurrentTardinessPenaltyParameter.Value; 79 81 if (currentTardinessPenalty != null) 80 82 return currentTardinessPenalty; … … 82 84 return TardinessPenaltyParameter.Value; 83 85 } 84 set { currentTardinessPenalty= value; }86 set { CurrentTardinessPenaltyParameter.Value = value; } 85 87 } 86 88 … … 112 114 Parameters.Add(new ValueParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0))); 113 115 Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(100))); 116 Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentTardinessPenalty", "The current tardiness penalty considered in the evaluation.")); 114 117 115 118 AttachEventHandlers(); … … 122 125 protected CVRPTWProblemInstance(CVRPTWProblemInstance original, Cloner cloner) 123 126 : base(original, cloner) { 124 currentTardinessPenalty = cloner.Clone(original.currentTardinessPenalty) as DoubleValue;125 126 127 AttachEventHandlers(); 127 128 } … … 142 143 base.InitializeState(); 143 144 144 currentTardinessPenalty= null;145 CurrentTardinessPenaltyParameter.Value = null; 145 146 } 146 147
Note: See TracChangeset
for help on using the changeset viewer.