NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD::Interval Class Reference

Detailed Description

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...
 

Member Enumeration Documentation

◆ para_t

Parameters.

Enumerator
P_Start 

Start time point.

P_End 

End time point.

P_StepSize 

StepSize.

Definition at line 40 of file NANDRAD_Interval.h.

Member Function Documentation

◆ setStartEnd()

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.

Parameters
startThe start time point, expected to be already in the unit u.
endtimeThe 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.
uTime unit of start and endtime.

◆ checkParameters()

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.

◆ isInInterval()

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.

Parameters
tSimulation time, in [s], simtime definition.
Warning
This function expects checkParameters() to be called beforehand.

◆ endTime()

double NANDRAD::Interval::endTime ( ) const

Returns the end time point.

It returns the END parameter if given. Otherwise infinitiy.

Warning
This function expects checkParameters() to be called beforehand.

Member Data Documentation

◆ m_para

IBK::Parameter NANDRAD::Interval::m_para[NUM_P]

The parameters defining the interval.

Definition at line 83 of file NANDRAD_Interval.h.


The documentation for this class was generated from the following file: