Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/10 15:01:48 (15 years ago)
Author:
svonolfe
Message:

Fixed some problems in the VRP implementation (#1039)

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves
Files:
3 edited

Legend:

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

    r3938 r3947  
    4343
    4444      PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPSolutionParameter.ActualName;
    45       IAtomicOperation op = this.ExecutionContext.CreateOperation(PermutationMoveOperatorParameter);
     45      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter);
    4646      op.Operator.Execute((IExecutionContext)op);
    4747
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs

    r3938 r3947  
    5454        newSolution,
    5555        DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
    56         DemandParameter.ActualValue, CapacityParameter.ActualValue, 
    57         FleetUsageFactor.Value, TimeFactor.Value, DistanceFactor.Value, OverloadPenalty.Value, TardinessPenalty.Value,
     56        DemandParameter.ActualValue, CapacityParameter.ActualValue,
     57        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue,
    5858        CoordinatesParameter.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
    5959    }
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs

    r3938 r3947  
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030using HeuristicLab.Parameters;
     31using HeuristicLab.Data;
    3132
    3233namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3334  [Item("AlbaTranslocationMoveGenerator", "An operator which generates translocation moves for the alba representation.")]
    3435  [StorableClass]
    35   public sealed class AlbaTranslocationMoveGenerator : AlbaMoveOperator, IPermutationTranslocationMoveOperator, IMoveGenerator {
     36  public sealed class AlbaTranslocationMoveGenerator : AlbaMoveOperator, IPermutationTranslocationMoveOperator, IMultiMoveGenerator {
    3637    public IValueLookupParameter<TranslocationMoveGenerator> TranslocationMoveGeneratorParameter {
    3738      get { return (IValueLookupParameter<TranslocationMoveGenerator>)Parameters["TranslocationMoveGenerator"]; }
     
    4041    protected override IPermutationMoveOperator PermutationMoveOperatorParameter {
    4142      get { return TranslocationMoveGeneratorParameter.Value; }
    42       set { TranslocationMoveGeneratorParameter.Value = value as TranslocationMoveGenerator; }
     43      set {
     44        TranslocationMoveGeneratorParameter.Value = value as TranslocationMoveGenerator;
     45        if (TranslocationMoveGeneratorParameter.Value is IMultiMoveGenerator) {
     46          ((IMultiMoveGenerator)TranslocationMoveGeneratorParameter.Value).SampleSizeParameter.ActualName = SampleSizeParameter.Name;
     47        }
     48      }
    4349    }
    4450
     
    6167    }
    6268
     69    public IValueLookupParameter<IntValue> SampleSizeParameter {
     70      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
     71    }
     72
    6373    public AlbaTranslocationMoveGenerator(): base() {
    6474      Parameters.Add(new ValueLookupParameter<TranslocationMoveGenerator>("TranslocationMoveGenerator", "The move generator.",
    6575        new StochasticTranslocationMultiMoveGenerator()));
     76      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
     77
     78      ((IMultiMoveGenerator)TranslocationMoveGeneratorParameter.Value).SampleSizeParameter.ActualName = SampleSizeParameter.Name;
    6679    }
    6780
Note: See TracChangeset for help on using the changeset viewer.