Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/04/10 16:11:59 (14 years ago)
Author:
svonolfe
Message:

Refactored VRP, added Potvin encoding (WIP) (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs

    r4068 r4150  
    2323using HeuristicLab.Encodings.PermutationEncoding;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Data;
     26using HeuristicLab.Parameters;
    2527
    2628namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    2830  [StorableClass]
    2931  public abstract class AlbaMoveOperator : VRPMoveOperator {
     32    public ILookupParameter<IntValue> VehiclesParameter {
     33      get { return (ILookupParameter<IntValue>)Parameters["Vehicles"]; }
     34    }
     35
     36    public AlbaMoveOperator()
     37      : base() {
     38      Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The vehicles count."));
     39    }
     40   
    3041    [Storable]
    3142    protected abstract IPermutationMoveOperator PermutationMoveOperatorParameter { get; set; }
     
    3445      IVRPEncoding solution = VRPSolutionParameter.ActualValue;
    3546      if (!(solution is AlbaEncoding)) {
    36         VRPSolutionParameter.ActualValue = AlbaEncoding.ConvertFrom(solution);
     47        VRPSolutionParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value);
    3748      }
    3849
Note: See TracChangeset for help on using the changeset viewer.