Trip Struct Reference

CPP API: mio::abm::Trip Struct Reference
mio::abm::Trip Struct Reference

A trip describes a change of Location from one Location to another Location. More...

#include <trip_list.h>

Collaboration diagram for mio::abm::Trip:

Public Member Functions

auto default_serialize ()
 
bool operator== (const Trip &other) const
 Compare two Trips. More...
 
 Trip (PersonId id, const TimePoint time, const LocationId dest, const int dest_model_id=0, const TransportMode mode_of_transport=mio::abm::TransportMode::Unknown, const std::vector< uint32_t > &input_cells={})
 Construct a new Trip. More...
 

Public Attributes

std::vector< uint32_t > cells
 If destination consists of different Cells, this gives the index of the Cells the Person changes to. More...
 
LocationId destination
 Location where the Person changes to. More...
 
int destination_model_id
 Model id of destination Location. More...
 
PersonId person_id
 Person that makes the trip and corresponds to the index into the structure m_persons from Model, where all Persons are saved. More...
 
TransportMode trip_mode
 Mode of transportation. See TransportMode for all possible modes of transportation. More...
 
TimePoint trip_time
 Daytime at which a Person changes the Location. More...
 

Detailed Description

A trip describes a change of Location from one Location to another Location.

Constructor & Destructor Documentation

◆ Trip()

mio::abm::Trip::Trip ( PersonId  id,
const TimePoint  time,
const LocationId  dest,
const int  dest_model_id = 0,
const TransportMode  mode_of_transport = mio::abm::TransportMode::Unknown,
const std::vector< uint32_t > &  input_cells = {} 
)
inline

Construct a new Trip.

Parameters
[in]idID of the Person that makes the Trip.
[in]timeTime at which a Person changes the Location this currently cant be set for s specific day just a timepoint in a day.
[in]destinationLocation where the Person changes to.
[in]destination_model_idModel the Person changes to.
[in]originLocation where the person starts the Trip.
[in]origin_model_idModel the Person starts the Trip.
[in]input_cellsThe index of the Cells the Person changes to.

Member Function Documentation

◆ default_serialize()

auto mio::abm::Trip::default_serialize ( )
inline

◆ operator==()

bool mio::abm::Trip::operator== ( const Trip other) const
inline

Compare two Trips.

Member Data Documentation

◆ cells

std::vector<uint32_t> mio::abm::Trip::cells

If destination consists of different Cells, this gives the index of the Cells the Person changes to.

◆ destination

LocationId mio::abm::Trip::destination

Location where the Person changes to.

◆ destination_model_id

int mio::abm::Trip::destination_model_id

Model id of destination Location.

◆ person_id

PersonId mio::abm::Trip::person_id

Person that makes the trip and corresponds to the index into the structure m_persons from Model, where all Persons are saved.

◆ trip_mode

TransportMode mio::abm::Trip::trip_mode

Mode of transportation. See TransportMode for all possible modes of transportation.

◆ trip_time

TimePoint mio::abm::Trip::trip_time

Daytime at which a Person changes the Location.