Last change
on this file since 11813 was
8670,
checked in by svonolfe, 12 years ago
|
Added first version of the dynamic vehicle routing addon (#1955)
|
File size:
1.4 KB
|
Rev | Line | |
---|
[8670] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using HeuristicLab.Core;
|
---|
| 6 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 7 | using HeuristicLab.Common;
|
---|
| 8 | using HeuristicLab.PDPSimulation.Operators;
|
---|
| 9 | using HeuristicLab.Problems.VehicleRouting;
|
---|
| 10 | using HeuristicLab.Problems.VehicleRouting.Interfaces;
|
---|
| 11 |
|
---|
| 12 | namespace HeuristicLab.PDPSimulation {
|
---|
| 13 | [Item("Waiting strategy", "A pickup and delivery waiting strategy.")]
|
---|
| 14 | [StorableClass]
|
---|
| 15 | public abstract class WaitingStrategy : ParameterizedNamedItem {
|
---|
| 16 | [Storable]
|
---|
| 17 | protected PickupDeliveryScenario scenario;
|
---|
| 18 |
|
---|
| 19 | public WaitingStrategy()
|
---|
| 20 | : base() {
|
---|
| 21 | }
|
---|
| 22 | [StorableConstructor]
|
---|
| 23 | protected WaitingStrategy(bool deserializing) : base(deserializing) { }
|
---|
| 24 | protected WaitingStrategy(WaitingStrategy original, Cloner cloner)
|
---|
| 25 | : base(original, cloner) {
|
---|
| 26 | this.scenario = cloner.Clone<PickupDeliveryScenario>(original.scenario);
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | public virtual void SetScenario(PickupDeliveryScenario scenario) {
|
---|
| 30 | if (scenario != null) {
|
---|
| 31 | this.scenario = scenario;
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | public abstract double GetWaitingTime(double time, DynPDPProblemInstance instance, IVRPEncoding solution, Tour tour, int stop);
|
---|
| 36 |
|
---|
| 37 | public virtual double GetBufferTime(double time, DynPDPProblemInstance instance, IVRPEncoding solution, Tour tour, int stop) {
|
---|
| 38 | return 0;
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.