trip_list.h Source File
|
CPP API
|
trip_list.h
Go to the documentation of this file.
80 return (person_id == other.person_id) && (trip_time == other.trip_time) && (destination == other.destination) &&
TimeSpan time_since_midnight() const
Time since midnight.
Definition: time.h:239
TimePoint get_next_trip_time() const
Get the trip_time at which the next Trip will happen.
Definition: trip_list.cpp:34
uint32_t get_current_index() const
Get the current index.
Definition: trip_list.h:153
const Trip & get_next_trip() const
Get the next Trip.
Definition: trip_list.cpp:29
std::vector< Trip > m_trips
The list of Trips a Person makes on a weekday.
Definition: trip_list.h:165
void reset_index()
Reset the current index to 0.
Definition: trip_list.h:136
void add_trips(std::vector< Trip > trip)
Adds Trips to the trip list.
Definition: trip_list.cpp:39
size_t num_trips() const
Get the length of the TripList.
Definition: trip_list.h:145
void increase_index()
Increment the current index to select the next Trip.
Definition: trip_list.h:128
uint32_t m_current_index
The index of the Trip a Person makes next.
Definition: trip_list.h:166
auto default_serialize()
This method is used by the default serialization feature.
Definition: trip_list.h:159
@ Unknown
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
Creates an instance of T for later initialization.
Definition: default_serialize.h:173
Members< ValueTypes..., T > add(const char *member_name, T &member)
Add a class member.
Definition: default_serialize.h:139
A trip describes a change of Location from one Location to another Location.
Definition: trip_list.h:42
TimePoint trip_time
Daytime at which a Person changes the Location.
Definition: trip_list.h:45
bool operator==(const Trip &other) const
Compare two Trips.
Definition: trip_list.h:78
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.
Definition: trip_list.h:62
LocationId destination
Location where the Person changes to.
Definition: trip_list.h:46
int destination_model_id
Model id of destination Location.
Definition: trip_list.h:47
TransportMode trip_mode
Mode of transportation. See TransportMode for all possible modes of transportation.
Definition: trip_list.h:48
PersonId person_id
Person that makes the trip and corresponds to the index into the structure m_persons from Model,...
Definition: trip_list.h:43
std::vector< uint32_t > cells
If destination consists of different Cells, this gives the index of the Cells the Person changes to.
Definition: trip_list.h:49
Generated by