- Timestamp:
- 10/15/12 15:17:52 (12 years ago)
- 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 19 19 [Item("PriorityDispatchingMetaOptEvaluator", "Metaoptimization of the priority dispatching parameters for the PDP simulation.")] 20 20 [StorableClass] 21 public class PriorityDispatchingMetaOptEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator {21 public abstract class PriorityDispatchingMetaOptEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator { 22 22 public ILookupParameter<DoubleValue> QualityParameter { 23 23 get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; } 24 }25 26 public IValueLookupParameter<DoubleArray> VectorParameter {27 get { return (IValueLookupParameter<DoubleArray>)Parameters["Vector"]; }28 24 } 29 25 … … 38 34 public PriorityDispatchingMetaOptEvaluator() { 39 35 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "Result of the evaluation of a solution.")); 40 Parameters.Add(new ValueLookupParameter<DoubleArray>("Vector", "The priority dispatching parameters."));41 36 Parameters.Add(new ValueParameter<ItemList<PickupDeliverySimulation>>("Simulation", "The PDP simulation")); 42 37 Parameters.Add(new ValueParameter<IntValue>("Repetitions", "The number of repetitions", new IntValue(1))); … … 47 42 protected PriorityDispatchingMetaOptEvaluator(PriorityDispatchingMetaOptEvaluator original, Cloner cloner) : base(original, cloner) { } 48 43 49 public override IDeepCloneable Clone(Cloner cloner) { 50 return new PriorityDispatchingMetaOptEvaluator(this, cloner); 51 } 44 protected abstract void Parameterize(PriorityDispatching dispatching); 52 45 53 46 public override IOperation Apply() { … … 56 49 ItemList<PickupDeliverySimulation> simulations = SimulationParameter.Value; 57 50 int repetitions = 0; 58 59 DoubleArray vector = VectorParameter.ActualValue;60 51 61 52 object locker = new object(); … … 67 58 PickupDeliverySimulation simulation = originalSimulation.Clone() as PickupDeliverySimulation; 68 59 PriorityDispatching dispatching = simulation.OptimizationParameter.Value as PriorityDispatching; 69 dispatching.WeightsParameter.Value = new RealVector(vector.ToArray());60 Parameterize(dispatching); 70 61 71 62 EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.ManualReset);
Note: See TracChangeset
for help on using the changeset viewer.