Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/07/10 17:24:00 (14 years ago)
Author:
svonolfe
Message:

Added move operators (WIP) (#1177)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba
Files:
9 added
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/AlbaCreator.cs

    r4362 r4369  
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727using HeuristicLab.Problems.VehicleRouting.Interfaces;
     28using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3031  [Item("AlbaCreator", "A VRP creator.")]
    3132  [StorableClass]
    32   public abstract class AlbaCreator : AlbaOperator, IVRPCreator {
     33  public abstract class AlbaCreator : VRPCreator, IAlbaOperator, IVRPCreator {
    3334    public override bool CanChangeName {
    3435      get { return false; }
    35     }
    36 
    37     #region IVRPCreator Members
    38     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    39       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
    4036    }
    4137   
     
    4541    public AlbaCreator()
    4642      : base() {
    47       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The new VRP tours."));
    4843    }
    49 
    50     #endregion
    5144  }
    5245}
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaCrossover.cs

    r4365 r4369  
    2727using HeuristicLab.Optimization;
    2828using HeuristicLab.Problems.VehicleRouting.Interfaces;
     29using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3132  [Item("AlbaCrossover", "An operator which crosses two VRP representations.")]
    3233  [StorableClass]
    33   public abstract class AlbaCrossover : AlbaOperator, IVRPCrossover, IStochasticOperator {
     34  public abstract class AlbaCrossover : VRPCrossover, IAlbaOperator, IVRPCrossover, IStochasticOperator {
    3435    public ILookupParameter<IRandom> RandomParameter {
    3536      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    36     }
    37 
    38     public ILookupParameter<ItemArray<IVRPEncoding>> ParentsParameter {
    39       get { return (ScopeTreeLookupParameter<IVRPEncoding>)Parameters["Parents"]; }
    40     }
    41 
    42     public ILookupParameter<IVRPEncoding> ChildParameter {
    43       get { return (ILookupParameter<IVRPEncoding>)Parameters["Child"]; }
    4437    }
    4538   
     
    5144      : base() {
    5245      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    53 
    54       Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("Parents", "The parent permutations which should be crossed."));
    55       ParentsParameter.ActualName = "VRPTours";
    56       Parameters.Add(new LookupParameter<IVRPEncoding>("Child", "The child permutation resulting from the crossover."));
    57       ChildParameter.ActualName = "VRPTours";
    5846    }
    5947
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/IAlbaOperator.cs

    r4365 r4369  
    3232
    3333namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    34   [Item("AlbaOperator", "Represents a VRP operator.")]
    35   [StorableClass]
    36   public abstract class AlbaOperator : VRPOperator,
     34  public interface IAlbaOperator:
    3735    ISingleDepotOperator, IHeterogenousCapacitatedOperator, ITimeWindowedOperator {   
    38     [StorableConstructor]
    39     protected AlbaOperator(bool deserializing) : base(deserializing) { }
    40 
    41     public AlbaOperator()
    42       : base() {
    43     }
    4436  }
    4537}
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaManipulator.cs

    r4365 r4369  
    2727using HeuristicLab.Optimization;
    2828using HeuristicLab.Problems.VehicleRouting.Interfaces;
     29using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3132  [Item("AlbaManipulator", "An operator which manipulates a VRP representation.")]
    3233  [StorableClass]
    33   public abstract class AlbaManipulator : AlbaOperator, IVRPManipulator, IStochasticOperator {
     34  public abstract class AlbaManipulator : VRPManipulator, IAlbaOperator, IVRPManipulator, IStochasticOperator {
    3435    public ILookupParameter<IRandom> RandomParameter {
    3536      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    36     }
    37 
    38     public ILookupParameter<IVRPEncoding> VRPToursParameter {
    39       get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
    4037    }
    4138
     
    4643      : base() {
    4744        Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    48         Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be manipulated."));
    4945    }
    5046
Note: See TracChangeset for help on using the changeset viewer.