SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SUMOTime.h File Reference
#include <config.h>
#include <climits>
#include <string>
#include "UtilExceptions.h"

Go to the source code of this file.

Macros

#define ACCEL2DIST(x)   (x)
 
#define ACCEL2SPEED(x)   (x)
 
#define DELTA_T   1
 
#define DIST2SPEED(x)   (x)
 
#define SIMTIME   STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep())
 
#define SPEED2ACCEL(x)   (x)
 
#define SPEED2DIST(x)   (x)
 
#define STEPFLOOR(x)   (x)
 
#define STEPS2MS(x)   ((x)*1000)
 
#define STEPS2TIME(x)   (static_cast<SUMOReal>(x))
 
#define SUMOTime_MAX   INT_MAX
 
#define SUMOTIME_MAXSTRING   "2147483"
 
#define SUMOTime_MIN   INT_MIN
 
#define TIME2STEPS(x)   (static_cast<SUMOTime>(x))
 
#define TS   (static_cast<SUMOReal>(1.))
 

Typedefs

typedef int SUMOTime
 

Functions

SUMOTime string2time (const std::string &r)
 
std::string time2string (SUMOTime t)
 

Detailed Description

Author
Daniel Krajzewicz
Jakob Erdmann
Michael Behrisch
Date
Fri, 29.04.2005
Version
Id
SUMOTime.cpp 18095 2015-03-17 09:39:00Z behrisch
Author
Daniel Krajzewicz
Jakob Erdmann
Michael Behrisch
Date
Fri, 29.04.2005
Version
Id
SUMOTime.h 18095 2015-03-17 09:39:00Z behrisch

Definition in file SUMOTime.h.

Macro Definition Documentation

#define ACCEL2DIST (   x)    (x)

Definition at line 59 of file SUMOTime.h.

Referenced by MSCFModel::freeSpeed(), and MSLCM_DK2008::informBlocker().

#define DELTA_T   1

Definition at line 50 of file SUMOTime.h.

Referenced by MSLCM_JE2013::_wantsChange(), MSLCM_LC2013::_wantsChange(), MSDevice_Routing::adaptEdgeEfforts(), GUITLLogicPhasesTrackerWindow::addValue(), MSFrame::buildStreams(), MSInsertionControl::checkCandidates(), RONet::checkFlows(), GUIApplicationWindow::checkGamingEvents(), MSVehicleControl::computeRandomDepartOffset(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), MSE2Collector::detectorUpdate(), MSMeanData::detectorUpdate(), MSInsertionControl::determineCandidates(), TraCIServer::dispatchCommand(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSEventControl::execute(), MSPModel_Striping::MovePedestrians::execute(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSVehicle::executeMove(), TrackerValueDesc::getAggregationSpan(), MSInductLoop::getCurrentLength(), MSInductLoop::getCurrentOccupancy(), MSInductLoop::getCurrentPassedNumber(), MSInductLoop::getCurrentSpeed(), MSInductLoop::getCurrentVehicleIDs(), MSVehicle::Influencer::influenceSpeed(), GUIRunThread::makeStep(), MSPModel_Striping::MSPModel_Striping(), MSRailSignal::MSRailSignal(), MSInstantInductLoop::notifyMove(), MSVehicleContainer::DepartFinder::operator()(), NLTriggerBuilder::parseAndBuildCalibrator(), SUMOVehicleParserHelper::parseVTypeEmbedded(), MSVehicle::planMoveInternal(), MSNet::postSimStepOutput(), MSDevice_Routing::preInsertionReroute(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Simulation::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), TrackerValueDesc::setAggregationSpan(), MSContainerControl::setDeparture(), MSPersonControl::setDeparture(), MSFrame::setMSGlobals(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSContainerControl::setWaitEnd(), MSPersonControl::setWaitEnd(), MSNet::simulationStep(), MSAbstractLaneChangeModel::startLaneChangeManeuver(), MSInsertionControl::tryInsert(), MSOffTrafficLightLogic::trySwitch(), MSRailSignal::trySwitch(), MSAbstractLaneChangeModel::unchanged(), MSRailSignal::updateCurrentPhase(), GUIApplicationWindow::updateTimeLCD(), MSPModel_Striping::PState::walk(), ODMatrix::write(), MSNet::writeOutput(), and MSMeanData::writeXMLOutput().

#define DIST2SPEED (   x)    (x)

Definition at line 57 of file SUMOTime.h.

Referenced by MSVehicle::executeMove(), and MSCFModel::freeSpeed().

#define SPEED2ACCEL (   x)    (x)
#define STEPFLOOR (   x)    (x)

Definition at line 67 of file SUMOTime.h.

Referenced by MSVehicleControl::vehicleDeparted().

#define STEPS2MS (   x)    ((x)*1000)

Definition at line 68 of file SUMOTime.h.

Referenced by MSFrame::buildStreams(), and MSAmitranTrajectories::writeVehicle().

#define STEPS2TIME (   x)    (static_cast<SUMOReal>(x))

Definition at line 65 of file SUMOTime.h.

Referenced by MSLCM_JE2013::_patchSpeed(), MSLCM_JE2013::_wantsChange(), MSLCM_LC2013::_wantsChange(), MSDevice_Routing::adaptEdgeEfforts(), CHRouter< E, V, PF >::buildContractionHierarchy(), LogitCalculator< R, E, V >::calculateProbabilities(), MSVehicle::Influencer::changeRequestRemainingSeconds(), MSNet::closeSimulation(), MSInductLoop::collectVehiclesOnDet(), ROJTRRouter::compute(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), BulkStarRouter< E, V, PF >::compute(), MSPerson::MSPersonStage_Walking::computeAverageSpeed(), GUIVehicle::drawLinkItem(), GUITLLogicPhasesTrackerWindow::drawValues(), MSE3Collector::enter(), MSCalibrator::execute(), MSVehicle::getAngle(), MSInductLoop::getCurrentOccupancy(), MSPModel_Striping::PState::getImpatience(), GUIVehicle::getLastLaneChangeOffset(), GUILane::getLoadedEdgeWeight(), GUICalibrator::getParameterWindow(), CState::getPosition(), GUILane::getStoredEdgeTravelTime(), MSInductLoop::getTimestepsSinceLastDetection(), MSVehicle::getWaitingSeconds(), MSPerson::getWaitingSeconds(), MSContainer::getWaitingSeconds(), ROMAAssignments::incremental(), MSVehicle::Influencer::influenceSpeed(), MSLCM_JE2013::inform(), MSLCM_JE2013::informFollower(), MSLCM_JE2013::informLeader(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSInstantInductLoop::notifyMove(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSInductLoop::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSMeanData_Amitran::openInterval(), MSMeanData::openInterval(), MSLCM_JE2013::patchSpeed(), MSVehicle::planMoveInternal(), TraCIServerAPI_Vehicle::processSet(), CHRouterWrapper< E, V, PF >::recomputeCosts(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::recomputeCosts(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::recomputeCosts(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::recomputeCosts(), BulkStarRouter< E, V, PF >::recomputeCosts(), CHRouter< E, V, PF >::recomputeCosts(), MSLCM_JE2013::saveBlockerLength(), MSVehicleControl::scheduleVehicleRemoval(), MSLCM_JE2013::slowDownForBlocked(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), string2time(), ROMAAssignments::sue(), time2string(), MSCalibrator::totalWished(), GUIApplicationWindow::updateTimeLCD(), MSVehicleControl::vehicleDeparted(), MSLCM_JE2013::wantsChange(), MSMeanData_Emissions::MSLaneMeanDataValues::write(), MSMeanData_Harmonoise::MSLaneMeanDataValues::write(), MSMeanData_Net::MSLaneMeanDataValues::write(), MSNet::writeOutput(), SUMOVehicleParameter::writeStops(), NWWriter_SUMO::writeSUMOTime(), MSInductLoop::writeTypedXMLOutput(), RORoute::writeXMLDefinition(), MSCalibrator::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and MSE3Collector::writeXMLOutput().

#define SUMOTIME_MAXSTRING   "2147483"

Definition at line 46 of file SUMOTime.h.

Referenced by ROMAFrame::addImportOptions(), ROFrame::fillOptions(), and fillOptions().

#define SUMOTime_MIN   INT_MIN

Definition at line 45 of file SUMOTime.h.

#define TIME2STEPS (   x)    (static_cast<SUMOTime>(x))

Definition at line 66 of file SUMOTime.h.

Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), MSVehicleTransfer::add(), NLHandler::addE2Detector(), NBOwnTLDef::addPedestrianPhases(), NIImporter_SUMO::addPhase(), ODMatrix::applyCurve(), NLHandler::beginE3Detector(), NLBuilder::buildNet(), GUIApplicationWindow::checkGamingEvents(), MSVehicleTransfer::checkInsertions(), PedestrianRouter< E, L, N, DijkstraRouterTT< PedestrianEdge< E, L, N >, PedestrianTrip< E, N >, prohibited_withRestrictions< PedestrianEdge< E, L, N >, PedestrianTrip< E, N > > > >::compute(), NBOwnTLDef::computeLogicAndConts(), CState::computeTranshipTime(), MSPModel_NonInteracting::PState::computeWalkingTime(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::cutLogic(), GUITLLogicPhasesTrackerWindow::drawValues(), MSActuatedTrafficLightLogic::duration(), MSCalibrator::execute(), MSLane::getCriticalLeader(), MSLane::getLeaderOnConsecutive(), MSLink::getLeaveTime(), SUMOSAXAttributes::getSUMOTimeReporting(), MSActuatedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), MSLane::isInsertionSuccess(), MSTLLogicControl::WAUTSwitchProcedure::isPosAtGSP(), MSVehicle::Influencer::isVTDAffected(), MSOffTrafficLightLogic::MSOffTrafficLightLogic(), NBLoadedTLDef::myCompute(), MSDevice_Tripinfo::notifyMove(), GUIParameterTracker::onCmdChangeAggregation(), NIImporter_VISUM::parse_TrafficLights(), SUMOVehicleParserHelper::parseFlowAttributes(), ODMatrix::parseSingleTime(), SUMOVehicleParserHelper::parseVTypeEmbedded(), MSVehicle::planMoveInternal(), MSOffTrafficLightLogic::rebuildPhase(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), string2time(), MSTLLogicControl::WAUTSwitchProcedure_GSP::trySwitch(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::trySwitch().

Typedef Documentation

typedef int SUMOTime

Definition at line 43 of file SUMOTime.h.

Function Documentation

std::string time2string ( SUMOTime  t)

Definition at line 61 of file SUMOTime.cpp.

References OUTPUT_ACCURACY, and STEPS2TIME.

Referenced by MSVehicleTransfer::add(), GUIRunThread::begin(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), NLBuilder::build(), CHRouter< E, V, PF >::buildContractionHierarchy(), NLBuilder::buildNet(), GUIApplicationWindow::checkGamingEvents(), MSVehicleTransfer::checkInsertions(), NBOwnTLDef::computeLogicAndConts(), computeRoutes(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), GUITLLogicPhasesTrackerWindow::drawValues(), GUIDialog_Breakpoints::encode2TXT(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSContainerControl::erase(), MSPersonControl::erase(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), MSDevice_Tripinfo::generateOutput(), MSDevice_Vehroutes::generateOutput(), GUICalibrator::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIVehicle::getStopInfo(), MSLane::handleCollision(), GUIApplicationWindow::handleEvent_SimulationEnded(), MSVehicle::Influencer::influenceChangeDecision(), GUIRunThread::makeStep(), MSLaneSpeedTrigger::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), ROLoader::openRoutes(), MSNet::postSimStepOutput(), MSNet::preSimStepOutput(), ROLoader::processRoutes(), GUIDialog_Breakpoints::rebuildList(), MSPerson::MSPersonStage_Walking::routeOutput(), MSContainer::MSContainerStage_Waiting::routeOutput(), MSPerson::MSPersonStage_Waiting::routeOutput(), MSNet::simulate(), MSLane::succLinkSec(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSContainer::MSContainerStage_Waiting::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Waiting::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSQueueExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSFullExport::write(), MSXMLRawOut::write(), ODMatrix::write(), SUMOVehicleParameter::write(), MSLink::writeApproaching(), RODFDetector::writeEmitterDefinition(), ODMatrix::writeFlows(), MSNet::writeOutput(), RODFDetector::writeSingleSpeedTrigger(), ROLoader::writeStats(), MSInductLoop::writeTypedXMLOutput(), TrajectoriesHandler::writeXMLEmissions(), MSRouteProbe::writeXMLOutput(), MSCalibrator::writeXMLOutput(), MSE2Collector::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSDevice_Vehroutes::writeXMLRoute().