Skip to main content

Trip Format

In MOSS, trip is composed of Persons. Below is an introduction to the attributes of Person.

Transport Attribute

Vehicle

field: data.vehicle_attributetypedescription
lane_change_lengthfloat64distance required to complete lane change: m
min_gapfloat64the minimum distance between the vehicle and the vehicle in front: m
lengthfloat64length: m
widthfloat64width: m
max_speedfloat64max speed: m/s
max_accelerationfloat64max acceleration: m/s^2 (positive value)
max_braking_accelerationfloat64max deceleration: m/s^2 (negative value)
usual_accelerationfloat64usual acceleration: m/s^2 (positive value), required to be less than the max acceleration
usual_braking_accelerationfloat64usual deceleration: m/s^2 (negative value), required to be greater than the max deceleration
headwayfloat64safe time headway: m/s^2 (positive value)
lane_max_speed_recognition_deviationfloat64the deviation of the vehicle's recognition of lane max speed, must in range (0,1)
emission_attributeEmissionAttributethe emission parameters of this vehicle

EmissionAttribute

field: vehicle_attribute.emission_attributetypedescription
weightfloat64weight of this vehicle: kg
typeVehicleEngineTypeengine type of this vehicle, 0: unspecified; 1: gasoline vehicle; 2: electric vehicle
coefficient_dragfloat64drag coefficient of the vehicle
lambda_sfloat64pavement friction coefficient
frontal_areafloat64frontal area: m^2
fuel_efficiencyVehicleEngineEfficiencyOptional, fuel vehicle efficiency
electric_efficiencyVehicleEngineEfficiencyOptional, electric vehicle efficiency
VehicleEngineEfficiency
message typesfieldtypedescription
VehicleEngineEfficiencyenergy_conversion_efficiencyfloat64the energy conversion efficiency: E_{vehicle consumed} / E_{fuel or electricity}

Bike

field: data.bike_attributetypedescription
speedfloat64moving speed of this person if he rides a bike

Walking

field: data.pedestrian_attributetypedescription
speedfloat64moving speed of this person if he walks

Schedules Attribute

Position

Position typesfieldtypedescription
Position.LanePositionlane_idintLaneID
sfloat64s is the distance from the point on the lane to the starting point of the lane
Position.AoiPositionaoi_idintAOI ID
poi_idintPOI ID, needs to be a sub-poi of aoi_id, otherwise the value is invalid

Journey

message typesfieldtypedescription
DrivingJourneyBodyroad_idslist[int]road sequence from origin to destination
etafloat64estimation time of arrival
WalkingRouteSegmentlane_idintLane ID
moving_directionMovingDirectionmoving direction; 0: unspecified; 1: in the same direction as the positive lane direction; 2: in the opposite direction as the positive lane direction.
WalkingJourneyBodyroutelist[WalkingRouteSegment]the (Lane+direction) sequence from the origin to destination
etafloat64estimation time of arrival
JourneytypeJourneyType0: unspecified; 1: driving; 2: walking
drivingDrivingJourneyBodyOptional. routing results for driving journey
walkingWalkingJourneyBodyOptional. routing results for walking journey

Trip

fieldtypedescription
modeTripModetrip mode, 0: unspecified; 1: walking only; 2: driving only; 5: Riding bikes if avaible, otherwise walking.
endPositiondestination
departure_timefloat64expected departure time (in seconds), optional
wait_timefloat64the expected waiting time (in seconds), if departure_time is empty, wait_time defaults to 0, optional
arrival_timefloat64expected arrival time (in seconds), optional
activitystringthe activity name of the destination for this trip
routesJourneypre calculated routing results

Schedule

fieldtypedescription
tripslist[Trip]list of trips
loop_countintthe number of times trips are executed, where 0 represents infinite loops and greater than 0 represents how many times they are executed
departure_timefloat64expected departure time (in seconds), optional. FAQ: Q1-What would happen if both the Schedule and the departuretime of the first Trip were specified simultaneously? A1-only depend on the departuretime of Trip. Q2-What would happen if both the Schedule and the first Trip were specified with wait_time=10 at the same time? A2-the waiting time is 10+10=20
wait_timefloat64expected waiting time (in seconds), if departure_time is empty, wait_time defaults to 0.

Main Attribute

fieldtypedescription
data.homePositioninitial position
data.scheduleslist[Schedule]initial schedules
data.labelsdict[string, string][can be empty] additional tags (e.g. repair vehicle type -> power grid)

Example

{
"class": "person",
"data": {
"attribute": {},
"home": {
"lane_position": {
"lane_id": 130104,
"s": 115.71712716462363
}
},
"schedules": [
{
"trips": [
{
"mode": 2,
"end": {
"lane_position": {
"lane_id": 22867,
"s": 57.59639027707855
}
},
"activity": "education",
"routes": [
{
"type": 1,
"driving": {
"road_ids": [
200018684,
200007666,
200011019,
200000708,
200000709,
200000710,
200011018
],
"eta": 994.2598904793631
}
}
]
}
],
"loop_count": 1,
"departure_time": 31793.10010598981
}
],
"vehicle_attribute": {
"lane_change_length": 10,
"min_gap": 1,
"headway":1.5,
"length": 5,
"width": 2,
"max_speed": 41.666666666666664,
"max_acceleration": 3,
"max_braking_acceleration": -10,
"usual_acceleration": 2,
"usual_braking_acceleration": -4.5,
"model": "normal",
"lane_max_speed_recognition_deviation": 1,
"emission_attribute" {
"weight": 18000,
"type": 1,
"coefficient_drag": 0.251,
"lambda_s": 0.29,
"frontal_area": 2.52,
"fuel_efficiency": {
"energy_conversion_efficiency": 0.013230000000000002
}
}
},
"bike_attribute": {
"speed": 5
},
"pedestrian_attribute": {
"speed": 1.34
},
"id": 0,
"labels": {}
}
}