using System; using System.Collections.Generic; using System.Linq; using System.Text; using HeuristicLab.Core; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; using HeuristicLab.Common; using HeuristicLab.PDPSimulation.Operators; using HeuristicLab.Problems.VehicleRouting; using HeuristicLab.Problems.VehicleRouting.Interfaces; namespace HeuristicLab.PDPSimulation { [Item("Waiting strategy", "A pickup and delivery waiting strategy.")] [StorableClass] public abstract class WaitingStrategy : ParameterizedNamedItem { [Storable] protected PickupDeliveryScenario scenario; public WaitingStrategy() : base() { } [StorableConstructor] protected WaitingStrategy(bool deserializing) : base(deserializing) { } protected WaitingStrategy(WaitingStrategy original, Cloner cloner) : base(original, cloner) { this.scenario = cloner.Clone(original.scenario); } public virtual void SetScenario(PickupDeliveryScenario scenario) { if (scenario != null) { this.scenario = scenario; } } public abstract double GetWaitingTime(double time, DynPDPProblemInstance instance, IVRPEncoding solution, Tour tour, int stop); public virtual double GetBufferTime(double time, DynPDPProblemInstance instance, IVRPEncoding solution, Tour tour, int stop) { return 0; } } }