#region License Information /* HeuristicLab * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion using System; using System.Collections.Generic; using System.Linq; using System.Text; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; using HeuristicLab.Common; namespace HeuristicLab.PDPSimulation.DomainModel { public enum OrderState { Waiting, PickingUp, PickedUp, Delivering, Delivered, Cancelled } [StorableClass] public class Order: BaseObject { //State [Storable] public OrderState OrderState { get; set; } [Storable] public double Tardiness { get; set; } [Storable] public double PickupTime { get; set; } [Storable] public double DeliveryTime { get; set; } [Storable] public Guid Vehicle { get; set; } [Storable] public Guid AssignedVehicle { get; set; } //Data [Storable] public int Index { get; set; } [Storable] public bool ServiceRequest { get; set; } [Storable] public double PickupXCoord { get; set; } [Storable] public double PickupYCoord { get; set; } [Storable] public double DeliveryXCoord { get; set; } [Storable] public double DeliveryYCoord { get; set; } [Storable] public double Demand { get; set; } [Storable] public double PickupServiceTime { get; set; } [Storable] public double PickupReadyTime { get; set; } [Storable] public double PickupDueTime { get; set; } [Storable] public double DeliveryServiceTime { get; set; } [Storable] public double DeliveryReadyTime { get; set; } [Storable] public double DeliveryDueTime { get; set; } [Storable] public string Name { get; set; } public Order() : base() { } [StorableConstructor] private Order(bool deserializing) : base(deserializing) { } private Order(Order original, Cloner cloner) : base(original, cloner) { Index = original.Index; ServiceRequest = original.ServiceRequest; OrderState = original.OrderState; Tardiness = original.Tardiness; PickupTime = original.PickupTime; DeliveryTime = original.DeliveryTime; Vehicle = original.Vehicle; AssignedVehicle = original.AssignedVehicle; PickupXCoord = original.PickupXCoord; PickupYCoord = original.PickupYCoord; DeliveryXCoord = original.DeliveryXCoord; DeliveryYCoord = original.DeliveryYCoord; Demand = original.Demand; PickupServiceTime = original.PickupServiceTime; PickupReadyTime = original.PickupReadyTime; PickupDueTime = original.PickupDueTime; DeliveryServiceTime = original.DeliveryServiceTime; DeliveryReadyTime = original.DeliveryReadyTime; DeliveryDueTime = original.DeliveryDueTime; Name = original.Name; } public override IDeepCloneable Clone(Cloner cloner) { return new Order(this, cloner); } } }