Changeset 8086 for branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPEvaluator.cs
- Timestamp:
- 06/22/12 11:11:38 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 2 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 20 20 bin 21 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting (added) merged: 7895,7900,7904,7906,7923,7934,7999,8006,8053
- Property svn:mergeinfo changed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPEvaluator.cs
r8052 r8086 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Common; 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Parameters; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HeuristicLab.Core;29 using HeuristicLab.Parameters;30 using HeuristicLab.Data;31 using HeuristicLab.Optimization;32 using HeuristicLab.PluginInfrastructure;33 28 using HeuristicLab.Problems.VehicleRouting.Variants; 34 using HeuristicLab.Problems.VehicleRouting.Encodings;35 using HeuristicLab.Common;36 29 37 30 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { 38 31 [Item("MDCVRPEvaluator", "Represents a multi depot CVRP evaluator.")] 39 32 [StorableClass] 40 public class MDCVRPEvaluator : VRPEvaluator {33 public class MDCVRPEvaluator : VRPEvaluator { 41 34 public ILookupParameter<DoubleValue> OverloadParameter { 42 35 get { return (ILookupParameter<DoubleValue>)Parameters["Overload"]; } … … 103 96 } 104 97 105 protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer, 98 protected override double GetTourInsertionCosts(IVRPProblemInstance instance, IVRPEncoding solution, TourInsertionInfo tourInsertionInfo, int index, int customer, 106 99 out bool feasible) { 107 100 CVRPInsertionInfo insertionInfo = tourInsertionInfo.GetStopInsertionInfo(index) as CVRPInsertionInfo; 108 101 109 102 double costs = 0; 110 103 feasible = tourInsertionInfo.Penalty < double.Epsilon; … … 120 113 feasible = false; 121 114 122 if (insertionInfo.SpareCapacity >= 0)115 if (insertionInfo.SpareCapacity >= 0) 123 116 costs += (demand - insertionInfo.SpareCapacity) * overloadPenalty; 124 117 else 125 118 costs += demand * overloadPenalty; 126 119 } 127 120 128 121 return costs; 129 122 } … … 140 133 OverloadParameter.ActualValue.Value = (tourEvaluation as CVRPEvaluation).Overload; 141 134 } 142 135 143 136 [StorableConstructor] 144 137 protected MDCVRPEvaluator(bool deserializing) : base(deserializing) { }
Note: See TracChangeset
for help on using the changeset viewer.