Changeset 9363 for branches/OaaS/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation
- Timestamp:
- 04/16/13 13:13:41 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting (added) merged: 8231,8246,8346,8455,8497,8600,8649,8651-8653,8720,8763,8894,8899,8905,8922,9010,9321
- Property svn:mergeinfo changed
-
branches/OaaS/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/Capacitated/CapacityRelaxationVRPAnalyzer.cs
r8053 r9363 60 60 get { return (IValueParameter<DoubleValue>)Parameters["MinPenaltyFactor"]; } 61 61 } 62 public IValueParameter<DoubleValue> MaxPenaltyFactorParameter { 63 get { return (IValueParameter<DoubleValue>)Parameters["MaxPenaltyFactor"]; } 64 } 62 65 63 66 public ValueLookupParameter<ResultCollection> ResultsParameter { … … 80 83 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Overload", "The overloads of the VRP solutions which should be analyzed.")); 81 84 82 Parameters.Add(new ValueParameter<DoubleValue>("Sigma", "The sigma applied to the penalty factor.", new DoubleValue(0. 04)));83 Parameters.Add(new ValueParameter<DoubleValue>("Phi", "The phi applied to the penalty factor.", new DoubleValue(0. 01)));85 Parameters.Add(new ValueParameter<DoubleValue>("Sigma", "The sigma applied to the penalty factor.", new DoubleValue(0.5))); 86 Parameters.Add(new ValueParameter<DoubleValue>("Phi", "The phi applied to the penalty factor.", new DoubleValue(0.5))); 84 87 Parameters.Add(new ValueParameter<DoubleValue>("MinPenaltyFactor", "The minimum penalty factor.", new DoubleValue(0.01))); 88 Parameters.Add(new ValueParameter<DoubleValue>("MaxPenaltyFactor", "The maximum penalty factor.", new DoubleValue(100000))); 85 89 86 90 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best VRP solution should be stored.")); … … 95 99 } 96 100 101 [StorableHook(HookType.AfterDeserialization)] 102 private void AfterDeserialization() { 103 // BackwardsCompatibility3.3 104 #region Backwards compatible code, remove with 3.4 105 if (!Parameters.ContainsKey("MaxPenaltyFactor")) { 106 Parameters.Add(new ValueParameter<DoubleValue>("MaxPenaltyFactor", "The maximum penalty factor.", new DoubleValue(100000))); 107 } 108 #endregion 109 } 110 97 111 public override IOperation Apply() { 98 112 ICapacitatedProblemInstance cvrp = ProblemInstanceParameter.ActualValue as ICapacitatedProblemInstance; … … 105 119 double phi = PhiParameter.Value.Value; 106 120 double minPenalty = MinPenaltyFactorParameter.Value.Value; 121 double maxPenalty = MaxPenaltyFactorParameter.Value.Value; 107 122 108 123 for (int j = 0; j < qualities.Length; j++) { … … 124 139 if (cvrp.OverloadPenalty.Value < minPenalty) 125 140 cvrp.OverloadPenalty.Value = minPenalty; 141 if (cvrp.OverloadPenalty.Value > maxPenalty) 142 cvrp.OverloadPenalty.Value = maxPenalty; 126 143 127 144 for (int j = 0; j < qualities.Length; j++) { -
branches/OaaS/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/PickupAndDelivery/PickupViolationsRelaxationVRPAnalyzer.cs
r8053 r9363 60 60 get { return (IValueParameter<DoubleValue>)Parameters["MinPenaltyFactor"]; } 61 61 } 62 public IValueParameter<DoubleValue> MaxPenaltyFactorParameter { 63 get { return (IValueParameter<DoubleValue>)Parameters["MaxPenaltyFactor"]; } 64 } 62 65 63 66 public ValueLookupParameter<ResultCollection> ResultsParameter { … … 80 83 Parameters.Add(new ScopeTreeLookupParameter<IntValue>("PickupViolations", "The pickup violation of the VRP solutions which should be analyzed.")); 81 84 82 Parameters.Add(new ValueParameter<DoubleValue>("Sigma", "The sigma applied to the penalty factor.", new DoubleValue(0. 04)));83 Parameters.Add(new ValueParameter<DoubleValue>("Phi", "The phi applied to the penalty factor.", new DoubleValue(0. 01)));85 Parameters.Add(new ValueParameter<DoubleValue>("Sigma", "The sigma applied to the penalty factor.", new DoubleValue(0.5))); 86 Parameters.Add(new ValueParameter<DoubleValue>("Phi", "The phi applied to the penalty factor.", new DoubleValue(0.5))); 84 87 Parameters.Add(new ValueParameter<DoubleValue>("MinPenaltyFactor", "The minimum penalty factor.", new DoubleValue(0.01))); 88 Parameters.Add(new ValueParameter<DoubleValue>("MaxPenaltyFactor", "The maximum penalty factor.", new DoubleValue(100000))); 85 89 86 90 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best VRP solution should be stored.")); … … 95 99 } 96 100 101 [StorableHook(HookType.AfterDeserialization)] 102 private void AfterDeserialization() { 103 // BackwardsCompatibility3.3 104 #region Backwards compatible code, remove with 3.4 105 if (!Parameters.ContainsKey("MaxPenaltyFactor")) { 106 Parameters.Add(new ValueParameter<DoubleValue>("MaxPenaltyFactor", "The maximum penalty factor.", new DoubleValue(100000))); 107 } 108 #endregion 109 } 110 97 111 public override IOperation Apply() { 98 112 IPickupAndDeliveryProblemInstance pdp = ProblemInstanceParameter.ActualValue as IPickupAndDeliveryProblemInstance; … … 105 119 double phi = PhiParameter.Value.Value; 106 120 double minPenalty = MinPenaltyFactorParameter.Value.Value; 121 double maxPenalty = MaxPenaltyFactorParameter.Value.Value; 107 122 108 123 for (int j = 0; j < qualities.Length; j++) { … … 124 139 if (pdp.PickupViolationPenalty.Value < minPenalty) 125 140 pdp.PickupViolationPenalty.Value = minPenalty; 141 if (pdp.PickupViolationPenalty.Value > maxPenalty) 142 pdp.PickupViolationPenalty.Value = maxPenalty; 126 143 127 144 for (int j = 0; j < qualities.Length; j++) { -
branches/OaaS/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/TimeWindowed/TimeWindowRelaxationVRPAnalyzer.cs
r8053 r9363 60 60 get { return (IValueParameter<DoubleValue>)Parameters["MinPenaltyFactor"]; } 61 61 } 62 public IValueParameter<DoubleValue> MaxPenaltyFactorParameter { 63 get { return (IValueParameter<DoubleValue>)Parameters["MaxPenaltyFactor"]; } 64 } 62 65 63 66 public ValueLookupParameter<ResultCollection> ResultsParameter { … … 80 83 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Tardiness", "The tardiness of the VRP solutions which should be analyzed.")); 81 84 82 Parameters.Add(new ValueParameter<DoubleValue>("Sigma", "The sigma applied to the penalty factor.", new DoubleValue(0. 04)));83 Parameters.Add(new ValueParameter<DoubleValue>("Phi", "The phi applied to the penalty factor.", new DoubleValue(0. 01)));85 Parameters.Add(new ValueParameter<DoubleValue>("Sigma", "The sigma applied to the penalty factor.", new DoubleValue(0.5))); 86 Parameters.Add(new ValueParameter<DoubleValue>("Phi", "The phi applied to the penalty factor.", new DoubleValue(0.5))); 84 87 Parameters.Add(new ValueParameter<DoubleValue>("MinPenaltyFactor", "The minimum penalty factor.", new DoubleValue(0.01))); 88 Parameters.Add(new ValueParameter<DoubleValue>("MaxPenaltyFactor", "The maximum penalty factor.", new DoubleValue(100000))); 85 89 86 90 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best VRP solution should be stored.")); … … 95 99 } 96 100 101 [StorableHook(HookType.AfterDeserialization)] 102 private void AfterDeserialization() { 103 // BackwardsCompatibility3.3 104 #region Backwards compatible code, remove with 3.4 105 if (!Parameters.ContainsKey("MaxPenaltyFactor")) { 106 Parameters.Add(new ValueParameter<DoubleValue>("MaxPenaltyFactor", "The maximum penalty factor.", new DoubleValue(100000))); 107 } 108 #endregion 109 } 110 97 111 public override IOperation Apply() { 98 112 ITimeWindowedProblemInstance vrptw = ProblemInstanceParameter.ActualValue as ITimeWindowedProblemInstance; … … 105 119 double phi = PhiParameter.Value.Value; 106 120 double minPenalty = MinPenaltyFactorParameter.Value.Value; 121 double maxPenalty = MaxPenaltyFactorParameter.Value.Value; 107 122 108 123 for (int j = 0; j < qualities.Length; j++) { … … 124 139 if (vrptw.TardinessPenalty.Value < minPenalty) 125 140 vrptw.TardinessPenalty.Value = minPenalty; 141 if (vrptw.TardinessPenalty.Value > maxPenalty) 142 vrptw.TardinessPenalty.Value = maxPenalty; 126 143 127 144 for (int j = 0; j < qualities.Length; j++) {
Note: See TracChangeset
for help on using the changeset viewer.