Post

Simulation Data Structures

This is part of the HCDVRP.cpp file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
struct Container
{
   int        JobNo      ;
   int        Demand     ;
   int        AppointmentTime;  // ReadyTime
   int        QCraneTime ;
   int        DueTime    ;
   int        ServiceTime;
   int        SourceDone ;        // 1 if the job has been pick up, otherwise 0
   int        DestDone   ;        // 1 if the job has been put down, otherwise 0
   String     SourceLocation;
   String     DestLocation  ;
   int        UseConstraintTime ; //  1 if the job concern with pick-up time constraint;
};                                  // -1 if the job concern with put-down time constraint;

struct  Vehicle
{
    int    Capacity;
    String StartLoc;
};

struct  VehileList
{
    int    JobNo;
    int    Action;
    int    ServTime;
};

struct  Trip
{
    String       LocToVisit;
    int          Load;
    int          VehicleTime;
    int          ActualTime;
    VehileList   Contents  [CAPACITY];
};

struct Tour
{
    Trip   *PortTrip;
    int     TotalDemand;
    int     TotalDist;
    int     TotalIdle;
    int     TotalLate;
    int     TotalWait;
    int     Length;
};

struct DistTimeInfo
{
    int    Dist;
    int    Index;
};
This post is licensed under CC BY 4.0 by the author.