Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/15/12 15:17:52 (12 years ago)
Author:
svonolfe
Message:

Added symbolic tree dispatching and metaoptimization (#1955)

Location:
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Operators
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Operators/PriorityDispatchingMetaOptEvaluator.cs

    r8783 r8808  
    1919  [Item("PriorityDispatchingMetaOptEvaluator", "Metaoptimization of the priority dispatching parameters for the PDP simulation.")]
    2020  [StorableClass]
    21   public class PriorityDispatchingMetaOptEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator {
     21  public abstract class PriorityDispatchingMetaOptEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator {
    2222    public ILookupParameter<DoubleValue> QualityParameter {
    2323      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
    24     }
    25 
    26     public IValueLookupParameter<DoubleArray> VectorParameter {
    27       get { return (IValueLookupParameter<DoubleArray>)Parameters["Vector"]; }
    2824    }
    2925
     
    3834    public PriorityDispatchingMetaOptEvaluator() {
    3935      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "Result of the evaluation of a solution."));
    40       Parameters.Add(new ValueLookupParameter<DoubleArray>("Vector", "The priority dispatching parameters."));
    4136      Parameters.Add(new ValueParameter<ItemList<PickupDeliverySimulation>>("Simulation", "The PDP simulation"));
    4237      Parameters.Add(new ValueParameter<IntValue>("Repetitions", "The number of repetitions", new IntValue(1)));
     
    4742    protected PriorityDispatchingMetaOptEvaluator(PriorityDispatchingMetaOptEvaluator original, Cloner cloner) : base(original, cloner) { }
    4843
    49     public override IDeepCloneable Clone(Cloner cloner) {
    50       return new PriorityDispatchingMetaOptEvaluator(this, cloner);
    51     }
     44    protected abstract void Parameterize(PriorityDispatching dispatching);
    5245
    5346    public override IOperation Apply() {
     
    5649      ItemList<PickupDeliverySimulation> simulations = SimulationParameter.Value;
    5750      int repetitions = 0;
    58 
    59       DoubleArray vector = VectorParameter.ActualValue;
    6051
    6152      object locker = new object();
     
    6758        PickupDeliverySimulation simulation = originalSimulation.Clone() as PickupDeliverySimulation;
    6859        PriorityDispatching dispatching = simulation.OptimizationParameter.Value as PriorityDispatching;
    69         dispatching.WeightsParameter.Value = new RealVector(vector.ToArray());
     60        Parameterize(dispatching);
    7061       
    7162        EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.ManualReset);
Note: See TracChangeset for help on using the changeset viewer.