Changeset 4241


Ignore:
Timestamp:
08/17/10 11:36:17 (3 years ago)
Author:
svonolfe
Message:

Added MultiVRPCreator (#1039)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/PushForwardInsertionCreator.cs

    r4183 r4241  
    225225      int customer = -1; 
    226226      int subTourCount = 1; 
    227       List<int> route = new List<int>(CitiesParameter.ActualValue.Value + VehiclesParameter.ActualValue.Value - 1); 
     227      List<int> route = new List<int>(Cities + VehiclesParameter.ActualValue.Value - 1); 
    228228      minimumCost = double.MaxValue; 
    229229      indexOfMinimumCost = -1; 
     
    271271        customer = -1; 
    272272      } while (unroutedList.Count > 0); 
    273       while (route.Count < CitiesParameter.ActualValue.Value + VehiclesParameter.ActualValue.Value - 1) 
     273      while (route.Count < Cities + VehiclesParameter.ActualValue.Value - 1) 
    274274        route.Add(0); 
    275275 
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs

    r4179 r4241  
    3939    } 
    4040     
    41     public IValueLookupParameter<IntValue> CitiesParameter { 
    42       get { return (IValueLookupParameter<IntValue>)Parameters["Cities"]; } 
    43     } 
    44  
    4541    [StorableConstructor] 
    4642    protected VRPCreator(bool deserializing) : base(deserializing) { } 
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj

    r4232 r4241  
    131131    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\IntraRouteInversionMoveMaker.cs" /> 
    132132    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\IntraRouteInversionMove.cs" /> 
     133    <Compile Include="Encodings\General\Creators\MultiVRPCreator.cs" /> 
    133134    <Compile Include="Encodings\General\Crossovers\MultiVRPManipulator.cs" /> 
    134135    <Compile Include="Encodings\General\Crossovers\MultiVRPCrossover.cs" /> 
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCreator.cs

    r4179 r4241  
    2626namespace HeuristicLab.Problems.VehicleRouting { 
    2727  public interface IVRPCreator : IVRPOperator, ISolutionCreator { 
    28     IValueLookupParameter<IntValue> CitiesParameter { get; } 
    2928    ILookupParameter<IVRPEncoding> VRPToursParameter { get; } 
    3029  } 
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPOperator.cs

    r4230 r4241  
    113113    public VRPOperator() 
    114114      : base() { 
    115       Parameters.Add(new ValueLookupParameter<IntValue>("Cities", "The city count.")); 
    116115      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates of the cities.")); 
    117116      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities.")); 
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs

    r4232 r4241  
    333333    } 
    334334    private void ParameterizeSolutionCreator() { 
    335       SolutionCreator.CitiesParameter.Value = new IntValue(Coordinates.Rows - 1); 
    336335      SolutionCreator.VehiclesParameter.ActualName = VehiclesParameter.Name; 
    337336      SolutionCreator.CoordinatesParameter.ActualName = CoordinatesParameter.Name; 
Note: See TracChangeset for help on using the changeset viewer.