Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/11 16:32:43 (13 years ago)
Author:
svonolfe
Message:

Added support for multiple moves in tabu search (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs

    r4752 r6772  
    3939  [StorableClass]
    4040  public class MultiVRPMoveGenerator : CheckedMultiOperator<IMultiVRPMoveGenerator>, IMultiVRPMoveOperator,
    41     IStochasticOperator, IMultiMoveGenerator, IGeneralVRPOperator, IMultiVRPOperator {
     41    IStochasticOperator, IMoveGenerator, IGeneralVRPOperator, IMultiVRPOperator {
    4242    public override bool CanChangeName {
    4343      get { return false; }
    4444    }
    4545
    46     public IValueLookupParameter<IntValue> SampleSizeParameter {
    47       get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
     46    public IValueLookupParameter<IntValue> SelectedOperatorsParameter {
     47      get { return (IValueLookupParameter<IntValue>)Parameters["SelectedOperators"]; }
    4848    }
    4949
     
    8080    public MultiVRPMoveGenerator()
    8181      : base() {
    82       Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
     82      Parameters.Add(new ValueLookupParameter<IntValue>("SelectedOperators", "The number of selected operators.", new IntValue(1)));
    8383      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    8484      Parameters.Add(new ValueLookupParameter<DoubleArray>("Probabilities", "The array of relative probabilities for each operator.", new DoubleArray()));
     
    158158      OperationCollection next = new OperationCollection(base.Apply());
    159159
    160       for (int i = 0; i < SampleSizeParameter.ActualValue.Value; i++) {
     160      for (int i = 0; i < SelectedOperatorsParameter.ActualValue.Value; i++) {
    161161        IRandom random = RandomParameter.ActualValue;
    162162        DoubleArray probabilities = ProbabilitiesParameter.ActualValue;
Note: See TracChangeset for help on using the changeset viewer.