Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/24/20 00:58:42 (4 years ago)
Author:
abeham
Message:

#2521: working on VRP (WIP)

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeExhaustiveMoveGenerator.cs

    r17226 r17698  
    4747    }
    4848
    49     protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     49    protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    5050      List<PotvinPDRearrangeMove> result = new List<PotvinPDRearrangeMove>();
    5151      IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMove.cs

    r17226 r17698  
    3333  public class PotvinPDRearrangeMove : Item, IVRPMove {
    3434    [Storable]
    35     public IVRPEncoding Individual { get; protected set; }
     35    public IVRPEncodedSolution Individual { get; protected set; }
    3636
    3737    [Storable]
     
    4949    }
    5050
    51     public PotvinPDRearrangeMove(int city, int tour, PotvinEncoding individual) {
     51    public PotvinPDRearrangeMove(int city, int tour, PotvinEncodedSolution individual) {
    5252      City = city;
    5353      Tour = tour;
    5454
    55       this.Individual = individual.Clone() as PotvinEncoding;
     55      this.Individual = individual.Clone() as PotvinEncodedSolution;
    5656    }
    5757
     
    6565      this.Tour = original.Tour;
    6666
    67       this.Individual = cloner.Clone(Individual) as PotvinEncoding;
     67      this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution;
    6868    }
    6969
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveEvaluator.cs

    r17226 r17698  
    7373      PotvinPDRearrangeMove move = PDRearrangeMoveParameter.ActualValue;
    7474
    75       PotvinEncoding newSolution = PDRearrangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;
     75      PotvinEncodedSolution newSolution = PDRearrangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution;
    7676      PotvinPDRearrangeMoveMaker.Apply(newSolution, move, ProblemInstance);
    7777
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveGenerator.cs

    r17226 r17698  
    5555    }
    5656
    57     protected abstract PotvinPDRearrangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
     57    protected abstract PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance);
    5858
    5959    public override IOperation InstrumentedApply() {
    6060      IOperation next = base.InstrumentedApply();
    6161
    62       PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
     62      PotvinEncodedSolution individual = VRPToursParameter.ActualValue as PotvinEncodedSolution;
    6363      PotvinPDRearrangeMove[] moves = GenerateMoves(individual, ProblemInstance);
    6464      Scope[] moveScopes = new Scope[moves.Length];
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveMaker.cs

    r17226 r17698  
    5656    }
    5757
    58     public static void Apply(PotvinEncoding solution, PotvinPDRearrangeMove move, IVRPProblemInstance problemInstance) {
     58    public static void Apply(PotvinEncodedSolution solution, PotvinPDRearrangeMove move, IVRPProblemInstance problemInstance) {
    5959      Tour tour = solution.Tours[move.Tour];
    6060      int position = tour.Stops.IndexOf(move.City);
     
    8282      PotvinPDRearrangeMove move = PDRearrangeMoveParameter.ActualValue;
    8383
    84       PotvinEncoding newSolution = move.Individual.Clone() as PotvinEncoding;
     84      PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution;
    8585      Apply(newSolution, move, ProblemInstance);
    8686      VRPToursParameter.ActualValue = newSolution;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuCriterion.cs

    r17226 r17698  
    4444      get { return PDRearrangeMoveParameter; }
    4545    }
    46     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    47       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
     46    public ILookupParameter<IVRPEncodedSolution> VRPToursParameter {
     47      get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; }
    4848    }
    4949    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
     
    8888      : base() {
    8989      Parameters.Add(new LookupParameter<PotvinPDRearrangeMove>("PotvinPDRearrangeMove", "The moves that should be made."));
    90       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
     90      Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move."));
    9191      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
    9292
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuMaker.cs

    r17226 r17698  
    3838      get { return PDRearrangeMoveParameter; }
    3939    }
    40     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    41       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
     40    public ILookupParameter<IVRPEncodedSolution> VRPToursParameter {
     41      get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; }
    4242    }
    4343    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
     
    6464      : base() {
    6565      Parameters.Add(new LookupParameter<PotvinPDRearrangeMove>("PotvinPDRearrangeMove", "The moves that should be made."));
    66       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
     66      Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move."));
    6767      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
    6868
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMultiMoveGenerator.cs

    r17226 r17698  
    5959    }
    6060
    61     protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     61    protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    6262      List<PotvinPDRearrangeMove> result = new List<PotvinPDRearrangeMove>();
    6363
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeSingleMoveGenerator.cs

    r17226 r17698  
    5454    }
    5555
    56     public static PotvinPDRearrangeMove Apply(PotvinEncoding individual, IVRPProblemInstance problemInstance, IRandom rand) {
     56    public static PotvinPDRearrangeMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) {
    5757      List<int> cities = new List<int>();
    5858
     
    7272    }
    7373
    74     protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     74    protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    7575      List<PotvinPDRearrangeMove> result = new List<PotvinPDRearrangeMove>();
    7676
Note: See TracChangeset for help on using the changeset viewer.