Changeset 7958 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs
- Timestamp:
- 06/05/12 08:34:36 (12 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4 merged: 7923,7934
- Property svn:mergeinfo changed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs
r7864 r7958 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Text; 26 using HeuristicLab.Problems.VehicleRouting.Interfaces; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using HeuristicLab.Common; 28 26 using HeuristicLab.Core; 29 using HeuristicLab.Parameters;30 27 using HeuristicLab.Data; 31 28 using HeuristicLab.Optimization; 29 using HeuristicLab.Parameters; 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 31 using HeuristicLab.PluginInfrastructure; 32 using HeuristicLab.Problems.VehicleRouting.Interfaces; 33 33 using HeuristicLab.Problems.VehicleRouting.Variants; 34 using HeuristicLab.Common;35 34 36 35 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { 37 36 [Item("CVRPProblemInstance", "Represents a single depot CVRP instance.")] 38 37 [StorableClass] 39 public class CVRPProblemInstance : SingleDepotVRPProblemInstance, IHomogenousCapacitatedProblemInstance {38 public class CVRPProblemInstance : SingleDepotVRPProblemInstance, IHomogenousCapacitatedProblemInstance { 40 39 protected IValueParameter<DoubleValue> CapacityParameter { 41 40 get { return (IValueParameter<DoubleValue>)Parameters["Capacity"]; } … … 60 59 return currentOverloadPenalty; 61 60 else 62 return OverloadPenaltyParameter.Value; } 61 return OverloadPenaltyParameter.Value; 62 } 63 63 set { CurrentOverloadPenaltyParameter.Value = value; } 64 64 } 65 65 66 66 protected override IEnumerable<IOperator> GetOperators() { 67 68 67 return base.GetOperators() 68 .Where(o => o is IHomogenousCapacitatedOperator).Cast<IOperator>(); 69 69 } 70 70 … … 80 80 } 81 81 } 82 82 83 83 [StorableConstructor] 84 84 protected CVRPProblemInstance(bool deserializing) : base(deserializing) { } … … 98 98 protected CVRPProblemInstance(CVRPProblemInstance original, Cloner cloner) 99 99 : base(original, cloner) { 100 100 AttachEventHandlers(); 101 101 } 102 102 103 103 [StorableHook(HookType.AfterDeserialization)] 104 private void AfterDeserialization Hook() {104 private void AfterDeserialization() { 105 105 AttachEventHandlers(); 106 106 }
Note: See TracChangeset
for help on using the changeset viewer.