Changeset 6459 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs
- Timestamp:
- 06/21/11 10:27:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs
r6449 r6459 35 35 } 36 36 37 public IValueParameter<BoolValue> AllowInfeasibleSolutions { 38 get { return (IValueParameter<BoolValue>)Parameters["AllowInfeasibleSolutions"]; } 39 } 40 41 [StorableHook(HookType.AfterDeserialization)] 42 private void AfterDeserialization() { 43 // BackwardsCompatibility3.3 44 #region Backwards compatible code (remove with 3.4) 45 if (!Parameters.ContainsKey("AllowInfeasibleSolutions")) { 46 Parameters.Add(new ValueParameter<BoolValue>("AllowInfeasibleSolutions", "Indicates if infeasible solutions should be allowed.", new BoolValue(false))); 47 } 48 #endregion 49 } 50 37 51 [StorableConstructor] 38 52 protected PotvinManipulator(bool deserializing) : base(deserializing) { } … … 42 56 public PotvinManipulator() { 43 57 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 58 Parameters.Add(new ValueParameter<BoolValue>("AllowInfeasibleSolutions", "Indicates if infeasible solutions should be allowed.", new BoolValue(false))); 44 59 } 45 60 … … 75 90 protected static bool FindInsertionPlace(PotvinEncoding individual, int city, int routeToAvoid, 76 91 DoubleArray dueTime, DoubleArray serviceTime, DoubleArray readyTime, DoubleArray demand, 77 DoubleValue capacity, DistanceMatrix distMatrix, 92 DoubleValue capacity, DistanceMatrix distMatrix, bool allowInfeasible, 78 93 out int route, out int place) { 79 94 return individual.FindInsertionPlace( 80 95 dueTime, serviceTime, readyTime, 81 96 demand, capacity, distMatrix, 82 city, routeToAvoid, out route, out place); 97 city, routeToAvoid, allowInfeasible, 98 out route, out place); 83 99 } 84 100
Note: See TracChangeset
for help on using the changeset viewer.