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
Files:
55 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationExhaustiveMoveGenerator.cs

    r17226 r17698  
    4646    }
    4747
    48     protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     48    protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    4949      List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>();
    5050
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMove.cs

    r17226 r17698  
    3232  public class PotvinCustomerRelocationMove : Item, IVRPMove {
    3333    [Storable]
    34     public IVRPEncoding Individual { get; protected set; }
     34    public IVRPEncodedSolution Individual { get; protected set; }
    3535
    3636    [Storable]
     
    5151    }
    5252
    53     public PotvinCustomerRelocationMove(int city, int oldTour, int tour, PotvinEncoding individual) {
     53    public PotvinCustomerRelocationMove(int city, int oldTour, int tour, PotvinEncodedSolution individual) {
    5454      City = city;
    5555      OldTour = oldTour;
    5656      Tour = tour;
    5757
    58       this.Individual = individual.Clone() as PotvinEncoding;
     58      this.Individual = individual.Clone() as PotvinEncodedSolution;
    5959    }
    6060
     
    6969      this.Tour = original.Tour;
    7070
    71       this.Individual = cloner.Clone(Individual) as PotvinEncoding;
     71      this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution;
    7272    }
    7373
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveEvaluator.cs

    r17226 r17698  
    7373      PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue;
    7474
    75       PotvinEncoding newSolution = CustomerRelocationMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;
     75      PotvinEncodedSolution newSolution = CustomerRelocationMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution;
    7676      PotvinCustomerRelocationMoveMaker.Apply(newSolution, move, ProblemInstance);
    7777
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveGenerator.cs

    r17226 r17698  
    5555    }
    5656
    57     protected abstract PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
     57    protected abstract PotvinCustomerRelocationMove[] 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      PotvinCustomerRelocationMove[] moves = GenerateMoves(individual, ProblemInstance);
    6464      Scope[] moveScopes = new Scope[moves.Length];
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveMaker.cs

    r17226 r17698  
    6868    }
    6969
    70     public static void Apply(PotvinEncoding solution, PotvinCustomerRelocationMove move, IVRPProblemInstance problemInstance) {
     70    public static void Apply(PotvinEncodedSolution solution, PotvinCustomerRelocationMove move, IVRPProblemInstance problemInstance) {
    7171      if (move.Tour >= solution.Tours.Count)
    7272        solution.Tours.Add(new Tour());
     
    8787      PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue;
    8888
    89       PotvinEncoding newSolution = move.Individual.Clone() as PotvinEncoding;
     89      PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution;
    9090      Apply(newSolution, move, ProblemInstance);
    9191      newSolution.Repair();
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs

    r17226 r17698  
    4444      get { return CustomerRelocationMoveParameter; }
    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 {
     
    7878      : base() {
    7979      Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be made."));
    80       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
     80      Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move."));
    8181      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
    8282
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuMaker.cs

    r17226 r17698  
    3737      get { return CustomerRelocationMoveParameter; }
    3838    }
    39     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    40       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
     39    public ILookupParameter<IVRPEncodedSolution> VRPToursParameter {
     40      get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; }
    4141    }
    4242    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
     
    5050      : base() {
    5151      Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be made."));
    52       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
     52      Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move."));
    5353      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
    5454    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMultiMoveGenerator.cs

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

    r17226 r17698  
    6161    }
    6262
    63     public static PotvinCustomerRelocationMove Apply(PotvinEncoding individual, IVRPProblemInstance problemInstance, IRandom rand) {
     63    public static PotvinCustomerRelocationMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) {
    6464      int city = 1 + rand.Next(individual.Cities);
    6565      Tour oldTour = individual.Tours.Find(t => t.Stops.Contains(city));
     
    7777    }
    7878
    79     protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     79    protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    8080      List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>();
    8181
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeExhaustiveMoveGenerator.cs

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

    r17226 r17698  
    3333  public class PotvinPDExchangeMove : Item, IVRPMove {
    3434    [Storable]
    35     public IVRPEncoding Individual { get; protected set; }
     35    public IVRPEncodedSolution Individual { get; protected set; }
    3636
    3737    [Storable]
     
    5555    }
    5656
    57     public PotvinPDExchangeMove(int city, int oldTour, int tour, int replaced, PotvinEncoding individual) {
     57    public PotvinPDExchangeMove(int city, int oldTour, int tour, int replaced, PotvinEncodedSolution individual) {
    5858      City = city;
    5959      OldTour = oldTour;
     
    6161      Replaced = replaced;
    6262
    63       this.Individual = individual.Clone() as PotvinEncoding;
     63      this.Individual = individual.Clone() as PotvinEncodedSolution;
    6464    }
    6565
     
    7878      this.Replaced = original.Replaced;
    7979
    80       this.Individual = cloner.Clone(Individual) as PotvinEncoding;
     80      this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution;
    8181    }
    8282
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveEvaluator.cs

    r17226 r17698  
    7373      PotvinPDExchangeMove move = PDExchangeMoveParameter.ActualValue;
    7474
    75       PotvinEncoding newSolution = PDExchangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;
     75      PotvinEncodedSolution newSolution = PDExchangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution;
    7676      PotvinPDExchangeMoveMaker.Apply(newSolution, move, ProblemInstance);
    7777
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveGenerator.cs

    r17226 r17698  
    5555    }
    5656
    57     protected abstract PotvinPDExchangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
     57    protected abstract PotvinPDExchangeMove[] 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      PotvinPDExchangeMove[] moves = GenerateMoves(individual, ProblemInstance);
    6464      Scope[] moveScopes = new Scope[moves.Length];
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveMaker.cs

    r17226 r17698  
    5656    }
    5757
    58     public static void Apply(PotvinEncoding solution, PotvinPDExchangeMove move, IVRPProblemInstance problemInstance) {
     58    public static void Apply(PotvinEncodedSolution solution, PotvinPDExchangeMove move, IVRPProblemInstance problemInstance) {
    5959      if (move.Tour >= solution.Tours.Count)
    6060        solution.Tours.Add(new Tour());
     
    9595      PotvinPDExchangeMove move = PDExchangeMoveParameter.ActualValue;
    9696
    97       PotvinEncoding newSolution = move.Individual.Clone() as PotvinEncoding;
     97      PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution;
    9898      Apply(newSolution, move, ProblemInstance);
    9999      VRPToursParameter.ActualValue = newSolution;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuCriterion.cs

    r17226 r17698  
    4444      get { return PDExchangeMoveParameter; }
    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<PotvinPDExchangeMove>("PotvinPDExchangeMove", "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/PDExchange/PotvinPDExchangeMoveTabuMaker.cs

    r17226 r17698  
    5656      get { return PDExchangeMoveParameter; }
    5757    }
    58     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    59       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
     58    public ILookupParameter<IVRPEncodedSolution> VRPToursParameter {
     59      get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; }
    6060    }
    6161    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
     
    8888
    8989      Parameters.Add(new LookupParameter<PotvinPDExchangeMove>("PotvinPDExchangeMove", "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/PDExchange/PotvinPDExchangeMultiMoveGenerator.cs

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

    r17226 r17698  
    5454    }
    5555
    56     public static PotvinPDExchangeMove Apply(PotvinEncoding individual, IVRPProblemInstance problemInstance, IRandom rand) {
     56    public static PotvinPDExchangeMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) {
    5757      List<int> cities = new List<int>();
    5858
     
    9999    }
    100100
    101     protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     101    protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    102102      List<PotvinPDExchangeMove> result = new List<PotvinPDExchangeMove>();
    103103
  • 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
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftExhaustiveMoveGenerator.cs

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

    r17226 r17698  
    3333  public class PotvinPDShiftMove : Item, IVRPMove {
    3434    [Storable]
    35     public IVRPEncoding Individual { get; protected set; }
     35    public IVRPEncodedSolution Individual { get; protected set; }
    3636
    3737    [Storable]
     
    5252    }
    5353
    54     public PotvinPDShiftMove(int city, int oldTour, int tour, PotvinEncoding individual) {
     54    public PotvinPDShiftMove(int city, int oldTour, int tour, PotvinEncodedSolution individual) {
    5555      City = city;
    5656      OldTour = oldTour;
    5757      Tour = tour;
    5858
    59       this.Individual = individual.Clone() as PotvinEncoding;
     59      this.Individual = individual.Clone() as PotvinEncodedSolution;
    6060    }
    6161
     
    7070      this.Tour = original.Tour;
    7171
    72       this.Individual = cloner.Clone(Individual) as PotvinEncoding;
     72      this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution;
    7373    }
    7474
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveEvaluator.cs

    r17226 r17698  
    7373      PotvinPDShiftMove move = PDShiftMoveParameter.ActualValue;
    7474
    75       PotvinEncoding newSolution = PDShiftMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;
     75      PotvinEncodedSolution newSolution = PDShiftMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution;
    7676      PotvinPDShiftMoveMaker.Apply(newSolution, move, ProblemInstance);
    7777
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveGenerator.cs

    r17226 r17698  
    5555    }
    5656
    57     protected abstract PotvinPDShiftMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
     57    protected abstract PotvinPDShiftMove[] 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      PotvinPDShiftMove[] moves = GenerateMoves(individual, ProblemInstance);
    6464      Scope[] moveScopes = new Scope[moves.Length];
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveMaker.cs

    r17226 r17698  
    5757    }
    5858
    59     public static void Apply(PotvinEncoding solution, PotvinPDShiftMove move, IVRPProblemInstance problemInstance) {
     59    public static void Apply(PotvinEncodedSolution solution, PotvinPDShiftMove move, IVRPProblemInstance problemInstance) {
    6060      bool newTour = false;
    6161
     
    121121      PotvinPDShiftMove move = PDShiftMoveParameter.ActualValue;
    122122
    123       PotvinEncoding newSolution = move.Individual.Clone() as PotvinEncoding;
     123      PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution;
    124124      Apply(newSolution, move, ProblemInstance);
    125125      VRPToursParameter.ActualValue = newSolution;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuCriterion.cs

    r17226 r17698  
    4444      get { return PDShiftMoveParameter; }
    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<PotvinPDShiftMove>("PotvinPDShiftMove", "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/PDShift/PotvinPDShiftMoveTabuMaker.cs

    r17226 r17698  
    3838      get { return PDShiftMoveParameter; }
    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<PotvinPDShiftMove>("PotvinPDShiftMove", "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/PDShift/PotvinPDShiftMultiMoveGenerator.cs

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

    r17226 r17698  
    5454    }
    5555
    56     public static PotvinPDShiftMove Apply(PotvinEncoding individual, IVRPProblemInstance problemInstance, IRandom rand) {
     56    public static PotvinPDShiftMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) {
    5757      List<int> cities = new List<int>();
    5858
     
    8282    }
    8383
    84     protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     84    protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    8585      List<PotvinPDShiftMove> result = new List<PotvinPDShiftMove>();
    8686
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveGenerator.cs

    r17226 r17698  
    4242
    4343    public override IOperation InstrumentedApply() {
    44       IVRPEncoding solution = VRPToursParameter.ActualValue;
    45       if (!(solution is PotvinEncoding)) {
    46         VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(solution, ProblemInstance);
     44      IVRPEncodedSolution solution = VRPToursParameter.ActualValue;
     45      if (!(solution is PotvinEncodedSolution)) {
     46        VRPToursParameter.ActualValue = PotvinEncodedSolution.ConvertFrom(solution, ProblemInstance);
    4747      }
    4848
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarExhaustiveMoveGenerator.cs

    r17226 r17698  
    4646    }
    4747
    48     protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     48    protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    4949      List<PotvinTwoOptStarMove> result = new List<PotvinTwoOptStarMove>();
    5050
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMove.cs

    r17226 r17698  
    3232  public class PotvinTwoOptStarMove : Item, IVRPMove {
    3333    [Storable]
    34     public IVRPEncoding Individual { get; protected set; }
     34    public IVRPEncodedSolution Individual { get; protected set; }
    3535
    3636    [Storable]
     
    5656    }
    5757
    58     public PotvinTwoOptStarMove(int tour1, int x1, int tour2, int x2, PotvinEncoding individual) {
     58    public PotvinTwoOptStarMove(int tour1, int x1, int tour2, int x2, PotvinEncodedSolution individual) {
    5959      Tour1 = tour1;
    6060      X1 = x1;
     
    6262      X2 = x2;
    6363
    64       this.Individual = individual.Clone() as PotvinEncoding;
     64      this.Individual = individual.Clone() as PotvinEncodedSolution;
    6565    }
    6666
     
    7676      this.X2 = original.X2;
    7777
    78       this.Individual = cloner.Clone(Individual) as PotvinEncoding;
     78      this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution;
    7979    }
    8080
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveEvaluator.cs

    r17226 r17698  
    5555      PotvinTwoOptStarMove move = TwoOptStarMoveParameter.ActualValue;
    5656
    57       PotvinEncoding newSolution = TwoOptStarMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;
     57      PotvinEncodedSolution newSolution = TwoOptStarMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution;
    5858      PotvinTwoOptStarMoveMaker.Apply(newSolution, move, ProblemInstance);
    5959
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveGenerator.cs

    r17226 r17698  
    5555    }
    5656
    57     protected abstract PotvinTwoOptStarMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
     57    protected abstract PotvinTwoOptStarMove[] 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      PotvinTwoOptStarMove[] moves = GenerateMoves(individual, ProblemInstance);
    6464      Scope[] moveScopes = new Scope[moves.Length];
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveMaker.cs

    r17226 r17698  
    5757
    5858    public static void GetSegments(PotvinTwoOptStarMove move, out List<int> segmentX1, out List<int> segmentX2) {
    59       PotvinEncoding solution = move.Individual as PotvinEncoding;
     59      PotvinEncodedSolution solution = move.Individual as PotvinEncodedSolution;
    6060
    6161      Tour route1 = solution.Tours[move.Tour1];
     
    7878    }
    7979
    80     public static void Apply(PotvinEncoding solution, PotvinTwoOptStarMove move, IVRPProblemInstance problemInstance) {
     80    public static void Apply(PotvinEncodedSolution solution, PotvinTwoOptStarMove move, IVRPProblemInstance problemInstance) {
    8181      List<int> segmentX1;
    8282      List<int> segmentX2;
     
    9898      PotvinTwoOptStarMove move = TwoOptStarMoveParameter.ActualValue;
    9999
    100       PotvinEncoding newSolution = move.Individual.Clone() as PotvinEncoding;
     100      PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution;
    101101      Apply(newSolution, move, ProblemInstance);
    102102      newSolution.Repair();
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveTabuCriterion.cs

    r17226 r17698  
    4545      get { return TwoOptStarMoveParameter; }
    4646    }
    47     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    48       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
     47    public ILookupParameter<IVRPEncodedSolution> VRPToursParameter {
     48      get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; }
    4949    }
    5050    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
     
    8989      : base() {
    9090      Parameters.Add(new LookupParameter<PotvinTwoOptStarMove>("PotvinTwoOptStarMove", "The moves that should be made."));
    91       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
     91      Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move."));
    9292      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
    9393
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveTabuMaker.cs

    r17226 r17698  
    5757      get { return TwoOptStarMoveParameter; }
    5858    }
    59     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    60       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
     59    public ILookupParameter<IVRPEncodedSolution> VRPToursParameter {
     60      get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; }
    6161    }
    6262    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
     
    8686
    8787      Parameters.Add(new LookupParameter<PotvinTwoOptStarMove>("PotvinTwoOptStarMove", "The moves that should be made."));
    88       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
     88      Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move."));
    8989      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
    9090
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMultiMoveGenerator.cs

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

    r17226 r17698  
    6161    }
    6262
    63     public static PotvinTwoOptStarMove Apply(PotvinEncoding individual, IVRPProblemInstance problemInstance, IRandom rand) {
     63    public static PotvinTwoOptStarMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) {
    6464      int route1Idx = rand.Next(individual.Tours.Count);
    6565      int route2Idx = rand.Next(individual.Tours.Count - 1);
     
    7676    }
    7777
    78     protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     78    protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    7979      List<PotvinTwoOptStarMove> result = new List<PotvinTwoOptStarMove>();
    8080
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentExhaustiveMoveGenerator.cs

    r17226 r17698  
    4646    }
    4747
    48     protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     48    protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    4949      List<PotvinVehicleAssignmentMove> result = new List<PotvinVehicleAssignmentMove>();
    5050
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMove.cs

    r17226 r17698  
    3232  public class PotvinVehicleAssignmentMove : Item, IVRPMove {
    3333    [Storable]
    34     public IVRPEncoding Individual { get; protected set; }
     34    public IVRPEncodedSolution Individual { get; protected set; }
    3535
    3636    [Storable]
     
    4949    }
    5050
    51     public PotvinVehicleAssignmentMove(int tour1, int tour2, PotvinEncoding individual) {
     51    public PotvinVehicleAssignmentMove(int tour1, int tour2, PotvinEncodedSolution individual) {
    5252      Tour1 = tour1;
    5353      Tour2 = tour2;
    5454
    55       this.Individual = individual.Clone() as PotvinEncoding;
     55      this.Individual = individual.Clone() as PotvinEncodedSolution;
    5656    }
    5757
     
    6565      this.Tour2 = original.Tour2;
    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/VehicleAssignment/PotvinVehicleAssignmentMoveEvaluator.cs

    r17226 r17698  
    5656      PotvinVehicleAssignmentMove move = VehicleAssignmentMoveParameter.ActualValue;
    5757
    58       PotvinEncoding newSolution = VehicleAssignmentMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;
     58      PotvinEncodedSolution newSolution = VehicleAssignmentMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution;
    5959      PotvinVehicleAssignmentMoveMaker.Apply(newSolution, move, ProblemInstance);
    6060
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveGenerator.cs

    r17226 r17698  
    5555    }
    5656
    57     protected abstract PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
     57    protected abstract PotvinVehicleAssignmentMove[] 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      PotvinVehicleAssignmentMove[] moves = GenerateMoves(individual, ProblemInstance);
    6464      Scope[] moveScopes = new Scope[moves.Length];
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveMaker.cs

    r17226 r17698  
    6767    }
    6868
    69     public static void Apply(PotvinEncoding solution, PotvinVehicleAssignmentMove move, IVRPProblemInstance problemInstance) {
     69    public static void Apply(PotvinEncodedSolution solution, PotvinVehicleAssignmentMove move, IVRPProblemInstance problemInstance) {
    7070      int vehicle1 = solution.VehicleAssignment[move.Tour1];
    7171      int vehicle2 = solution.VehicleAssignment[move.Tour2];
     
    7878      PotvinVehicleAssignmentMove move = VehicleAssignmentMoveParameter.ActualValue;
    7979
    80       PotvinEncoding newSolution = move.Individual.Clone() as PotvinEncoding;
     80      PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution;
    8181      Apply(newSolution, move, ProblemInstance);
    8282      newSolution.Repair();
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveTabuCriterion.cs

    r17226 r17698  
    4444      get { return VehicleAssignmentMoveParameter; }
    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<PotvinVehicleAssignmentMove>("PotvinVehicleAssignmentMove", "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/VehicleAssignment/PotvinVehicleAssignmentMoveTabuMaker.cs

    r17226 r17698  
    5656      get { return VehicleAssignmentMoveParameter; }
    5757    }
    58     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    59       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
     58    public ILookupParameter<IVRPEncodedSolution> VRPToursParameter {
     59      get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; }
    6060    }
    6161    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
     
    8585
    8686      Parameters.Add(new LookupParameter<PotvinVehicleAssignmentMove>("PotvinVehicleAssignmentMove", "The moves that should be made."));
    87       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
     87      Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move."));
    8888      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
    8989
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMultiMoveGenerator.cs

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

    r17226 r17698  
    6161    }
    6262
    63     public static PotvinVehicleAssignmentMove Apply(PotvinEncoding individual, IVRPProblemInstance problemInstance, IRandom rand) {
     63    public static PotvinVehicleAssignmentMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) {
    6464      if (individual.Tours.Count > 1) {
    6565        int tour1 = rand.Next(individual.Tours.Count);
     
    7575    }
    7676
    77     protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
     77    protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) {
    7878      List<PotvinVehicleAssignmentMove> result = new List<PotvinVehicleAssignmentMove>();
    7979
Note: See TracChangeset for help on using the changeset viewer.