|
MTCT
Design Automation and Optimization for ETCS Railway Networks
|
Properties and characteristics of a train. More...
#include <Train.hpp>
Public Member Functions | |
| Train (std::string name, double length, double max_speed, double acceleration, double deceleration, bool tim=true) | |
| Constructs a train with specified dynamic properties. | |
| std::string const & | get_name () const |
| Accesses the train's name. | |
| double | get_length () const |
| Retrieves the train's length. | |
| double | get_max_speed () const |
| Accesses the train's maximum speed. | |
| double | get_acceleration () const |
| Retrieves the train's acceleration. | |
| double | get_deceleration () const |
| Retrieves the train's maximum deceleration. | |
| bool | has_tim () const |
| Returns whether the train has train integrity monitoring. | |
| void | set_length (double const length) |
| Sets the length of the train. | |
| void | set_max_speed (double const maxSpeed) |
| Sets the maximum speed of the train. | |
| void | set_acceleration (double const acceleration) |
| Sets the maximum acceleration of the train. | |
| void | set_deceleration (double const deceleration) |
| Sets the maximum deceleration of the train. | |
| void | set_tim_value (bool const tim) |
| Sets the train integrity monitoring flag to a specific value. | |
| void | set_tim () |
| Enables train integrity monitoring. | |
| void | set_no_tim () |
| Disables train integrity monitoring. | |
Friends | |
| class | TrainList |
Properties and characteristics of a train.
Stores the name, length, maximum speed, and acceleration/deceleration capabilities, as well as train integrity monitoring status.
| cda_rail::Train::Train | ( | std::string | name, |
| double | length, | ||
| double | max_speed, | ||
| double | acceleration, | ||
| double | deceleration, | ||
| bool | tim = true ) |
Constructs a train with specified dynamic properties.
| name | Name identifier for the train. |
| length | Length of the train in meters. |
| max_speed | Maximum speed of the train in m/s. |
| acceleration | Maximum acceleration capability in m/s². |
| deceleration | Maximum deceleration capability in m/s². |
| tim | Train integrity monitoring flag (default: true). |
| cda_rail::exceptions::InvalidInputException | If any numeric precondition is violated. |
|
inlinenodiscard |
Retrieves the train's acceleration.
|
inlinenodiscard |
Retrieves the train's maximum deceleration.
|
inlinenodiscard |
Retrieves the train's length.
|
inlinenodiscard |
Accesses the train's maximum speed.
|
inlinenodiscard |
Accesses the train's name.
|
inlinenodiscard |
Returns whether the train has train integrity monitoring.
|
inline |
Sets the maximum acceleration of the train.
| acceleration | New maximum acceleration in m/s². |
| cda_rail::exceptions::InvalidInputException | If acceleration is less than MIN_NON_ZERO. |
|
inline |
Sets the maximum deceleration of the train.
| deceleration | New maximum deceleration in m/s². |
| cda_rail::exceptions::InvalidInputException | If deceleration is less than MIN_NON_ZERO. |
|
inline |
Sets the length of the train.
| length | New length in meters. |
| cda_rail::exceptions::InvalidInputException | If length is negative. |
|
inline |
Sets the maximum speed of the train.
| maxSpeed | New maximum speed in m/s. Must be at least MIN_NON_ZERO. |
| cda_rail::exceptions::InvalidInputException | If maxSpeed is less than MIN_NON_ZERO. |
|
inline |
Disables train integrity monitoring.
|
inline |
Enables train integrity monitoring.
|
inline |
Sets the train integrity monitoring flag to a specific value.
| tim | true to enable TIM, false to disable. |
|
friend |