- Timestamp:
- 07/12/17 21:07:36 (7 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 15072,15083,15168
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting merged: 15168
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs
r15217 r15219 194 194 195 195 private void EvalBestKnownSolution() { 196 if (BestKnownSolution != null) { 196 if (BestKnownSolution == null) return; 197 try { 197 198 //call evaluator 198 199 BestKnownQuality = new DoubleValue(ProblemInstance.Evaluate(BestKnownSolution.Solution).Quality); 199 200 BestKnownSolution.Quality = BestKnownQuality; 201 } catch { 202 BestKnownQuality = null; 203 BestKnownSolution = null; 200 204 } 201 205 } … … 207 211 void ProblemInstance_EvaluationChanged(object sender, EventArgs e) { 208 212 BestKnownQuality = null; 209 EvalBestKnownSolution(); 213 if (BestKnownSolution != null) { 214 // the tour is not valid if there are more vehicles in it than allowed 215 if (ProblemInstance.Vehicles.Value < BestKnownSolution.Solution.GetTours().Count) { 216 BestKnownSolution = null; 217 } else EvalBestKnownSolution(); 218 } 210 219 } 211 220
Note: See TracChangeset
for help on using the changeset viewer.