Free cookie consent management tool by TermsFeed Policy Generator

source: branches/1955_DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/DomainModel/Order.cs

Last change on this file was 8670, checked in by svonolfe, 12 years ago

Added first version of the dynamic vehicle routing addon (#1955)

File size: 3.7 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using System.Linq;
25using System.Text;
26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
27using HeuristicLab.Common;
28
29namespace HeuristicLab.PDPSimulation.DomainModel {
30  public enum OrderState { Waiting, PickingUp, PickedUp, Delivering, Delivered, Cancelled }
31
32  [StorableClass]
33  public class Order: BaseObject {
34    //State
35    [Storable]
36    public OrderState OrderState { get; set; }
37    [Storable]
38    public double Tardiness { get; set; }
39    [Storable]
40    public double PickupTime { get; set; }
41    [Storable]
42    public double DeliveryTime { get; set; }
43    [Storable]
44    public Guid Vehicle { get; set; }
45    [Storable]
46    public Guid AssignedVehicle { get; set; }
47
48    //Data
49    [Storable]
50    public int Index { get; set; }
51    [Storable]
52    public bool ServiceRequest { get; set; }
53    [Storable]
54    public double PickupXCoord { get; set; }
55    [Storable]
56    public double PickupYCoord { get; set; }
57    [Storable]
58    public double DeliveryXCoord { get; set; }
59    [Storable]
60    public double DeliveryYCoord { get; set; }
61    [Storable]
62    public double Demand { get; set; }
63    [Storable]
64    public double PickupServiceTime { get; set; }
65    [Storable]
66    public double PickupReadyTime { get; set; }
67    [Storable]
68    public double PickupDueTime { get; set; }
69    [Storable]
70    public double DeliveryServiceTime { get; set; }
71    [Storable]
72    public double DeliveryReadyTime { get; set; }
73    [Storable]
74    public double DeliveryDueTime { get; set; }
75    [Storable]
76    public string Name { get; set; }
77
78    public Order()
79      : base() {
80    }
81    [StorableConstructor]
82    private Order(bool deserializing) : base(deserializing) {
83    }
84    private Order(Order original, Cloner cloner)
85      : base(original, cloner) {
86        Index = original.Index;
87        ServiceRequest = original.ServiceRequest;
88        OrderState = original.OrderState;
89        Tardiness = original.Tardiness;
90        PickupTime = original.PickupTime;
91        DeliveryTime = original.DeliveryTime;
92        Vehicle = original.Vehicle;
93        AssignedVehicle = original.AssignedVehicle;
94        PickupXCoord = original.PickupXCoord;
95        PickupYCoord = original.PickupYCoord;
96        DeliveryXCoord = original.DeliveryXCoord;
97        DeliveryYCoord = original.DeliveryYCoord;
98        Demand = original.Demand;
99        PickupServiceTime = original.PickupServiceTime;
100        PickupReadyTime = original.PickupReadyTime;
101        PickupDueTime = original.PickupDueTime;
102        DeliveryServiceTime = original.DeliveryServiceTime;
103        DeliveryReadyTime = original.DeliveryReadyTime;
104        DeliveryDueTime = original.DeliveryDueTime;
105        Name = original.Name;
106    }
107    public override IDeepCloneable Clone(Cloner cloner) {
108      return new Order(this, cloner);
109    }
110  }
111}
Note: See TracBrowser for help on using the repository browser.