Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/13/10 10:28:15 (14 years ago)
Author:
svonolfe
Message:

Updated naming and description of the VRP operators (#1039)

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion
Files:
1 added
1 copied

Legend:

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

    r4204 r4206  
    2929
    3030namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    31   [Item("SimpleLocalSearchMoveGenerator", "Generates local search moves from a given Alba VRP encoding.")]
     31  [Item("IntraRouteInversionMoveGenerator", "Generates intra route inversion moves from a given VRP encoding.")]
    3232  [StorableClass]
    33   public abstract class SimpleLocalSearchMoveGenerator : AlbaMoveOperator, IExhaustiveMoveGenerator, IAlbaSimpleLocalSearchMoveOperator {
    34     #region IAlbaSimpleLocalSearchMoveOperator Members
    35 
    36     public ILookupParameter<SimpleLocalSearchMove> SimpleLocalSearchMoveParameter {
    37       get { return (ILookupParameter<SimpleLocalSearchMove>)Parameters["SimpleLocalSearchMove"]; }
     33  public abstract class IntraRouteInversionMoveGenerator : AlbaMoveOperator, IExhaustiveMoveGenerator, IAlbaIntraRouteInversionMoveOperator {
     34    public ILookupParameter<IntraRouteInversionMove> IntraRouteInversionMoveParameter {
     35      get { return (ILookupParameter<IntraRouteInversionMove>)Parameters["IntraRouteInversionMove"]; }
    3836    }
    3937
     
    4240    }
    4341
    44     #endregion
     42    [StorableConstructor]
     43    protected IntraRouteInversionMoveGenerator(bool deserializing) : base(deserializing) { }
    4544
    46     [StorableConstructor]
    47     protected SimpleLocalSearchMoveGenerator(bool deserializing) : base(deserializing) { }
    48 
    49     public SimpleLocalSearchMoveGenerator()
     45    public IntraRouteInversionMoveGenerator()
    5046      : base() {
    51         Parameters.Add(new LookupParameter<SimpleLocalSearchMove>("SimpleLocalSearchMove", "The moves that should be generated in subscopes."));
     47        Parameters.Add(new LookupParameter<IntraRouteInversionMove>("IntraRouteInversionMove", "The moves that should be generated in subscopes."));
    5248        Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    5349    }
    5450
    55     protected abstract SimpleLocalSearchMove[] GenerateMoves(AlbaEncoding individual);
     51    protected abstract IntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual);
    5652
    5753    public override IOperation Apply() {
     
    5955
    6056      AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding;
    61       SimpleLocalSearchMove[] moves = GenerateMoves(individual);
     57      IntraRouteInversionMove[] moves = GenerateMoves(individual);
    6258      Scope[] moveScopes = new Scope[moves.Length];
    6359      for (int i = 0; i < moveScopes.Length; i++) {
    6460        moveScopes[i] = new Scope(i.ToString());
    65         moveScopes[i].Variables.Add(new Variable(SimpleLocalSearchMoveParameter.ActualName, moves[i]));
     61        moveScopes[i].Variables.Add(new Variable(IntraRouteInversionMoveParameter.ActualName, moves[i]));
    6662      }
    6763      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
Note: See TracChangeset for help on using the changeset viewer.