|
NANDRAD Data Model Library
Version 2.0
NANDRAD
|
The class Interval defines intervals of simulation time.
It is used to define output grids and schedules.
Definition at line 36 of file NANDRAD_Interval.h.
#include <NANDRAD_Interval.h>
Public Types | |
| enum | para_t { P_Start, P_End, P_StepSize, NUM_P } |
| Parameters. More... | |
Public Member Functions | |
| void | setStartEnd (double start, double endtime, IBK::Unit u) |
| Convenience function to specify a parameter through start time point and end time point. More... | |
| void | checkParameters () const |
| Checks input parameters. More... | |
| bool | isInInterval (double t) const |
| Returns true, if t lies inside the internal. More... | |
| double | endTime () const |
| Returns the end time point. More... | |
Public Attributes | |
| IBK::Parameter | m_para [NUM_P] |
| The parameters defining the interval. More... | |
Parameters.
| Enumerator | |
|---|---|
| P_Start | Start time point. |
| P_End | End time point. |
| P_StepSize | StepSize. |
Definition at line 40 of file NANDRAD_Interval.h.
| void NANDRAD::Interval::setStartEnd | ( | double | start, |
| double | endtime, | ||
| IBK::Unit | u | ||
| ) |
Convenience function to specify a parameter through start time point and end time point.
This sets parameters IP_START and IP_END to given values using the unit u for both parameters.
| start | The start time point, expected to be already in the unit u. |
| endtime | The end time point, expected to be already in the unit u. If endtime should not be specified, given std::numeric_limits<double>::max() as value. |
| u | Time unit of start and endtime. |
| void NANDRAD::Interval::checkParameters | ( | ) | const |
Checks input parameters.
Definition of Start and End intervals are optional. If provided, the values must be >= 0 and End time point must be always beyond start time point. Throws an IBK::Exception if conditions are not met.
| bool NANDRAD::Interval::isInInterval | ( | double | t | ) | const |
Returns true, if t lies inside the internal.
This check requires a valid START parameter to be set.
| t | Simulation time, in [s], simtime definition. |
| double NANDRAD::Interval::endTime | ( | ) | const |
Returns the end time point.
It returns the END parameter if given. Otherwise infinitiy.
| IBK::Parameter NANDRAD::Interval::m_para[NUM_P] |
The parameters defining the interval.
Definition at line 83 of file NANDRAD_Interval.h.