34#define SUMOTime_MAX (std::numeric_limits<SUMOTime>::max() - 1000)
35#define SUMOTime_MIN std::numeric_limits<SUMOTime>::min()
36#define SUMOTime_MAX_PERIOD (SUMOTime_MAX - SUMOTime_MAX % DELTA_T)
37#define SUMOTime_DAY 86400000
38#define SUMOTime_HOUR 3600000
39#define SUMOTime_MINUTE 60000
45#define TS (static_cast<double>(DELTA_T)/1000.)
48#define SPEED2DIST(x) ((x)*TS)
50#define DIST2SPEED(x) ((x)/TS)
52#define ACCEL2DIST(x) ((x)*TS*TS)
54#define ACCEL2SPEED(x) ((x)*TS)
56#define SPEED2ACCEL(x) ((x)/TS)
58#define STEPS2TIME(x) (static_cast<double>(x)/1000.)
60#define TIME2STEPS(x) (static_cast<SUMOTime>((x) * 1000. + ((x) >= 0 ? 0.5 : -0.5)))
61#define STEPFLOOR(x) (static_cast<SUMOTime>((x)/DELTA_T)*DELTA_T)
62#define STEPS2MS(x) (x)
64#define SIMSTEP MSNet::getInstance()->getCurrentTimeStep()
65#define SIMTIME STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep())
75bool isTime(
const std::string& r);
void checkTimeBounds(const double time)
check the valid SUMOTime range of double input and throw an error if out of bounds
std::string elapsedMs2string(long long int t)
convert ms to string for log output
bool checkStepLengthMultiple(const SUMOTime t, const std::string &error="", SUMOTime deltaT=DELTA_T, SUMOTime begin=0)
check if given SUMOTime is multiple of the step length
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
bool isTime(const std::string &r)
check if the given string is a valid time