Legs
Leg
Bases: BaseModel
Source code in passengersim/config/legs.py
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
arr_day
class-attribute
instance-attribute
If the arrival time is on a different day, this is offset in days.
This will usually be zero (arrival date is same as departure date) but will sometimes be 1 (arrives next day) or in a few pathological cases -1 or +2 (for travel across the international dateline).
arr_localtime
property
Arrival time for this leg in local time at the destination.
arr_time
instance-attribute
Arrival time for this leg in Unix time.
In input files, this can be specified as a string in the format "HH:MM", with the hour in 24-hour format.
Unix time is the number of seconds since 00:00:00 UTC on 1 Jan 1970.
date
class-attribute
instance-attribute
Departure date for this leg. The initial load is local, so we have a psuedo-timestamp here, we're avoiding local timezones In the overall model validation, we'll unpack it to HH:MM and use the timezone to get the true UTC value
dep_localtime
property
Departure time for this leg in local time at the origin.
dep_time
instance-attribute
Departure time for this leg in Unix time.
In input files, this can be specified as a string in the format "HH:MM", with the hour in 24-hour format.
Unix time is the number of seconds since 00:00:00 UTC on 1 Jan 1970.
dest_timezone
class-attribute
instance-attribute
Timezone name for the destination location for this leg.
fltno
instance-attribute
A flight number identifier for this leg.
Flight numbers do not need to be unique.
leg_id
class-attribute
instance-attribute
A unique identifier for this leg.
Each leg in a network should have a globally unique identifier (i.e. even
if the carrier is different, leg_id values should be unique. Note this
is not the same as the fltno, which is a label analogous to flight numbers
in practice, which don't need to be unique. If the leg_id is not provided,
the fltno is used, unless the simulation already has a leg with that
leg_id, in which case a new unique leg_id will be generated.
orig_timezone
class-attribute
instance-attribute
Timezone name for the origination location for this leg.