Changeset 7864 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP
- Timestamp:
- 05/22/12 09:38:54 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPProblemInstance.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 return OverloadPenaltyParameter.Value; } 61 set { currentOverloadPenalty = value; } 62 return OverloadPenaltyParameter.Value; 63 } 64 set { CurrentOverloadPenaltyParameter.Value = value; } 62 65 } 63 66 … … 85 88 Parameters.Add(new ValueParameter<DoubleArray>("Capacity", "The capacity of each vehicle.", new DoubleArray())); 86 89 Parameters.Add(new ValueParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(100))); 90 Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentOverloadPenalty", "The current overload penalty considered in the evaluation.")); 87 91 88 92 AttachEventHandlers(); … … 95 99 protected MDCVRPProblemInstance(MDCVRPProblemInstance original, Cloner cloner) 96 100 : base(original, cloner) { 97 currentOverloadPenalty = cloner.Clone(original.currentOverloadPenalty) as DoubleValue;98 99 101 AttachEventHandlers(); 100 102 } … … 114 116 base.InitializeState(); 115 117 116 currentOverloadPenalty= null;118 CurrentOverloadPenaltyParameter.Value = null; 117 119 } 118 120 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPPDTW/MDCVRPPDTWProblemInstance.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 MDCVRPPDTWProblemInstance(MDCVRPPDTWProblemInstance 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/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWProblemInstance.cs
r6854 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 MDCVRPTWProblemInstance(MDCVRPTWProblemInstance 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.