|
MTCT
Design Automation and Optimization for ETCS Railway Networks
|
Specific schedule object with fixed entry/exit constraints. More...
#include <Timetable.hpp>
Public Member Functions | |
| Schedule (double entry_time, double initial_velocity, size_t entry_vertex, double exit_time, double exit_velocity, size_t exit_vertex, std::vector< ScheduledStop > stops={}) | |
| Constructs a schedule with fixed entry/exit constraints. | |
| double | get_entry_time () const |
| Provides the entry time. | |
| double | get_exit_time () const |
| Gets the scheduled exit time. | |
| double | get_initial_velocity () const |
| Obtains the initial velocity. | |
| double | get_exit_velocity () const |
| Obtains the exit velocity. | |
| size_t | get_entry_vertex () const |
| Determines the network vertex where the train enters. | |
| size_t | get_exit_vertex () const |
| Gets the exit vertex of the schedule. | |
| std::vector< ScheduledStop > const & | get_stops () const |
| Retrieves the scheduled stops for this train. | |
| size_t | get_station_index (std::string const &station_name) const |
| Returns the index of a scheduled stop by station name. | |
| void | set_entry_time (double const newEntryTime) |
| Sets the entry time. | |
| void | set_exit_time (double const newExitTime) |
| Sets the exit time. | |
| void | set_initial_velocity (double const newInitialVelocity) |
| Updates the initial velocity. | |
| void | set_exit_velocity (double const newExitVelocity) |
| Sets the exit velocity. | |
| void | set_entry_vertex (size_t const newEntryVertex) |
| Sets the entry vertex. | |
| void | set_entry_vertex (size_t const newEntryVertex, Network const &network) |
| Sets the entry vertex id after validating it against a network. | |
| void | set_exit_vertex (size_t const newExitVertex) |
| Sets the exit vertex id. | |
| void | set_exit_vertex (size_t const newExitVertex, Network const &network) |
| Sets the exit vertex id after validating it against a network. | |
| void | set_stops (std::vector< ScheduledStop > new_stops) |
| Replaces the stop list for this schedule. | |
| void | insert_stop (ScheduledStop new_stop) |
| Inserts one stop while preserving stop-list invariants. | |
| void | remove_stop (std::string const &station_name, bool throw_exception_if_not_existent=true) |
| Removes a stop by station name. | |
| void | sort_stops_by_service_time () |
| Sorts the scheduled stops by service time. | |
Friends | |
| class | Timetable |
Specific schedule object with fixed entry/exit constraints.
Stores timing, velocity, path endpoints, and an ordered list of scheduled stops for one train.
| cda_rail::Schedule::Schedule | ( | double | entry_time, |
| double | initial_velocity, | ||
| size_t | entry_vertex, | ||
| double | exit_time, | ||
| double | exit_velocity, | ||
| size_t | exit_vertex, | ||
| std::vector< ScheduledStop > | stops = {} ) |
Constructs a schedule with fixed entry/exit constraints.
| entry_time | Earliest allowed entry time. |
| initial_velocity | Initial velocity at entry. |
| entry_vertex | Entry vertex id. |
| exit_time | Desired exit time. |
| exit_velocity | Desired velocity at exit. |
| exit_vertex | Exit vertex id. |
| stops | Ordered scheduled stops for this train. |
| cda_rail::exceptions::InvalidInputException | If any of the preconditions is violated. |
|
inlinenodiscard |
Provides the entry time.
|
inlinenodiscard |
Determines the network vertex where the train enters.
|
inlinenodiscard |
Gets the scheduled exit time.
|
inlinenodiscard |
Obtains the exit velocity.
|
inlinenodiscard |
Gets the exit vertex of the schedule.
|
inlinenodiscard |
Obtains the initial velocity.
|
nodiscard |
Returns the index of a scheduled stop by station name.
| station_name | Name of the stop station. |
| cda_rail::exceptions::StationNotExistentException | If the station does not appear in the schedule. |
|
inlinenodiscard |
Retrieves the scheduled stops for this train.
| void cda_rail::Schedule::insert_stop | ( | ScheduledStop | new_stop | ) |
Inserts one stop while preserving stop-list invariants.
Inserts the stop such that the list remains ordered by service time. If other stops have the same service time, the new stop is inserted after them.
| new_stop | Stop to insert. |
| cda_rail::exceptions::InvalidInputException | If the station already appears in the current stop list. |
| void cda_rail::Schedule::remove_stop | ( | std::string const & | station_name, |
| bool | throw_exception_if_not_existent = true ) |
Removes a stop by station name.
| station_name | Name of the station whose stop should be removed. |
| throw_exception_if_not_existent | If true, throw when no stop with station_name exists; if false, perform no action in that case. |
| cda_rail::exceptions::InvalidInputException | If no matching stop exists and throw_exception_if_not_existent is true. |
|
inline |
Sets the entry time.
| newEntryTime | New entry time. |
| cda_rail::exceptions::InvalidInputException | If newEntryTime is negative. |
|
inline |
Sets the entry vertex.
| newEntryVertex | New entry vertex id. |
|
inline |
Sets the entry vertex id after validating it against a network.
| newEntryVertex | New entry vertex id. |
| network | Network used for vertex existence validation. |
| cda_rail::exceptions::VertexNotExistentException | If newEntryVertex does not exist in network. |
|
inline |
Sets the exit time.
| newExitTime | New exit time. |
| cda_rail::exceptions::InvalidInputException | If newExitTime is smaller than the current entry time. |
|
inline |
Sets the exit velocity.
| newExitVelocity | New exit velocity. |
| cda_rail::exceptions::InvalidInputException | If the exit velocity is negative. |
|
inline |
Sets the exit vertex id.
| newExitVertex | New exit vertex id. |
|
inline |
Sets the exit vertex id after validating it against a network.
| newExitVertex | New exit vertex id. |
| network | Network used for vertex existence validation. |
| cda_rail::exceptions::VertexNotExistentException | If newExitVertex does not exist in network. |
|
inline |
Updates the initial velocity.
| newInitialVelocity | The new initial velocity. |
| cda_rail::exceptions::InvalidInputException | If the value is negative. |
|
inline |
Replaces the stop list for this schedule.
| new_stops | New stop list to replace the current one. |
| cda_rail::exceptions::InvalidInputException | If the stop list is not sorted by service time or contains duplicate stations. |
|
inline |
Sorts the scheduled stops by service time.
Stops with equal service times keep their order, since that is the order in which they are served.
|
friend |