Eclipse SUMO - Simulation of Urban MObility
SUMOTime.cpp File Reference
#include <config.h>
#include <sstream>
#include <iostream>
#include <iomanip>
#include "SUMOTime.h"
#include "StringTokenizer.h"
#include "StringUtils.h"
#include "StdDefs.h"
#include "MsgHandler.h"
Include dependency graph for SUMOTime.cpp:

Go to the source code of this file.

Functions

bool checkStepLengthMultiple (const SUMOTime t, const std::string &error)
 
SUMOTime string2time (const std::string &r)
 
std::string time2string (SUMOTime t)
 

Variables

SUMOTime DELTA_T = 1000
 

Detailed Description

Author
Daniel Krajzewicz
Jakob Erdmann
Michael Behrisch
Date
Fri, 29.04.2005

Definition in file SUMOTime.cpp.

Function Documentation

◆ checkStepLengthMultiple()

bool checkStepLengthMultiple ( const SUMOTime  t,
const std::string &  error 
)

◆ string2time()

SUMOTime string2time ( const std::string &  r)

Definition at line 44 of file SUMOTime.cpp.

References StringTokenizer::getVector(), STEPS2TIME, string2time(), SUMOTime_MAX, TIME2STEPS, and StringUtils::toDouble().

Referenced by ODMatrix::add(), MSDetectorControl::add(), MSDetectorControl::addDetectorAndInterval(), NLHandler::addEdgeLaneMeanData(), NLBuilder::build(), MSTransportableDevice_Routing::buildDevices(), NLBuilder::buildRouteLoaderControl(), MELoop::buildSegmentsFor(), NLTriggerBuilder::buildVaporizer(), MSDevice_Routing::buildVehicleDevices(), MSDevice_Routing::checkOptions(), MSFrame::checkOptions(), TraCIServer::cleanup(), MSNet::closeBuilding(), MSRouteHandler::closeFlow(), MSRouteHandler::closePerson(), MSRouteHandler::closePersonFlow(), MSRouteHandler::closeVehicle(), computeRoutes(), SUMOSAXAttributes::getOptSUMOTimeReporting(), GNEStopFrame::getStopParameter(), SUMOSAXAttributes::getSUMOTimeReporting(), GUIApplicationWindow::handleEvent_SimulationLoaded(), MSPhaseDefinition::init(), MSLane::initCollisionOptions(), MSRoutingEngine::initRouter(), MSRoutingEngine::initWeightUpdate(), GUISettingsHandler::loadBreakpoints(), main(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSNet::MSNet(), MSPModel_Striping::MSPModel_Striping(), SUMORouteHandler::myEndElement(), MSStateHandler::myStartElement(), GUIDialog_Breakpoints::onCmdEditTable(), ROLoader::openRoutes(), TraCIServer::openSocket(), SUMOVehicleParameter::parseDepart(), SUMOVehicleParserHelper::parseVTypeEmbedded(), readDetectorFlows(), GUILoadThread::run(), GNEVehicleType::setAttribute(), GNEStop::setAttribute(), GNEPerson::setAttribute(), GNEVehicle::setAttribute(), MSFrame::setMSGlobals(), signalHandler(), startComputation(), string2time(), and MSFCDExport::write().

◆ time2string()

std::string time2string ( SUMOTime  t)

Definition at line 67 of file SUMOTime.cpp.

References gHumanReadableTime, gPrecision, MAX2(), MIN2(), TIME2STEPS, and TS.

Referenced by MSPModel_Striping::add(), libsumo::Person::add(), MSVehicleTransfer::add(), IntermodalNetwork< E, L, N, V >::addSchedule(), AGActivityTripWriter::addTrip(), GUIRunThread::begin(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), NLBuilder::build(), CHBuilder< E, V >::buildContractionHierarchy(), NLBuilder::buildNet(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSDeterministicHiLevelTrafficLightLogic::canRelease(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSSwarmTrafficLightLogic::canRelease(), MELoop::changeSegment(), GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), MSVehicleTransfer::checkInsertions(), checkStepLengthMultiple(), AStarRouter< E, V >::compute(), NBOwnTLDef::computeLogicAndConts(), computeRoutes(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSOTLPolicy::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), GUIVehicle::drawRouteHelper(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), GUITLLogicPhasesTrackerWindow::drawValues(), GUIDialog_Breakpoints::encode2TXT(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), MSDevice_Tripinfo::generateOutput(), GNEChargingStation::getAttribute(), GNEVaporizer::getAttribute(), GNERouteProbe::getAttribute(), GNEDetectorE1::getAttribute(), GNEDetectorE3::getAttribute(), GNECalibratorFlow::getAttribute(), GNERerouterInterval::getAttribute(), GNERerouter::getAttribute(), GNECalibrator::getAttribute(), GNEDetectorE2::getAttribute(), GNEVehicleType::getAttribute(), GNEStop::getAttribute(), GNEPerson::getAttribute(), GNEVehicle::getAttribute(), MSVehicle::getBackPositionOnLane(), SUMOVehicleParameter::getDepart(), IntermodalTrip< E, N, V >::getID(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), MSPModel_Striping::getNextLane(), MSTransportableDevice_Routing::getParameter(), MSDevice_Routing::getParameter(), GUIPerson::getParameterWindow(), GUIContainer::getParameterWindow(), GUICalibrator::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIMEVehicle::getParameterWindow(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), GUIVehicle::getStopInfo(), MSLane::handleCollisionBetween(), GUIApplicationWindow::handleEvent_SimulationEnded(), MSVehicle::haveValidStopEdges(), ROMAAssignments::incremental(), MSVehicle::Influencer::influenceChangeDecision(), MSActuatedTrafficLightLogic::init(), MSEdge::insertVehicle(), MSSOTLTrafficLightLogic::isThresholdPassed(), MSAbstractLaneChangeModel::laneChangeOutput(), MSVehicle::leaveLane(), GUIRunThread::makeStep(), MSPModel_Striping::moveInDirectionOnLane(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), GUIDialog_ViewSettings::onCmdExportSetting(), MSMeanData::openInterval(), ROLoader::openRoutes(), MSNet::postSimStepOutput(), MSNet::preSimStepOutput(), MSVehicle::processLaneAdvances(), ROLoader::processRoutes(), ODMatrix::readTime(), GUIDialog_Breakpoints::rebuildList(), MSVehicle::rerouteParkingArea(), MSPerson::MSPersonStage_Walking::routeOutput(), MSContainer::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSPerson::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), ROPerson::Ride::saveAsXML(), MSStateHandler::saveState(), MSNet::simulate(), MSNet::simulationStep(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), MELoop::teleportVehicle(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSContainer::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Access::tripInfoOutput(), MSPerson::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), MSSOTLTrafficLightLogic::trySwitch(), MSSOTLTrafficLightLogic::updateDecayThreshold(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateShadowLane(), MSVehicle::updateState(), MSPModel_Striping::PState::walk(), MSBatteryExport::write(), MSEmissionExport::write(), MSQueueExport::write(), MSFullExport::write(), MSFCDExport::write(), MSXMLRawOut::write(), ODMatrix::write(), SUMOVehicleParameter::Stop::write(), MSVehicle::Stop::write(), MSLink::writeApproaching(), MSChargingStation::writeChargingStationOutput(), GNEPerson::writeDemandElement(), GNEVehicle::writeDemandElement(), RODFDetector::writeEmitterDefinition(), ODMatrix::writeFlows(), writeInterval(), MSDevice_Vehroutes::writeOutput(), MSNet::writeOutput(), RODFDetector::writeSingleSpeedTrigger(), ROLoader::writeStats(), TrajectoriesHandler::writeXMLEmissions(), MSCalibrator::writeXMLOutput(), MEInductLoop::writeXMLOutput(), MSRouteProbe::writeXMLOutput(), MSE3Collector::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and MSDevice_Vehroutes::writeXMLRoute().

Variable Documentation

◆ DELTA_T

SUMOTime DELTA_T = 1000

Definition at line 36 of file SUMOTime.cpp.

Referenced by MSCFModel_CC::_consensus(), MSCFModel_CC::_v(), MSVehicle::Influencer::GapControlState::activate(), MSRoutingEngine::adaptEdgeEfforts(), MSPModel_Striping::add(), MSTransportableControl::add(), GUITLLogicPhasesTrackerWindow::addValue(), MSDevice_ToC::awarenessRecoveryStep(), MSTransportableControl::boardAnyWaiting(), MSFrame::buildStreams(), MSVehicleType::check(), MSInsertionControl::checkCandidates(), MSLaneChanger::checkChange(), RONet::checkFlows(), GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), MSE2Collector::checkJam(), GUIViewTraffic::checkSnapshots(), GUISUMOAbstractView::checkSnapshots(), checkStepLengthMultiple(), NLJunctionControlBuilder::closeTrafficLightLogic(), MSInsertionControl::computeRandomDepartOffset(), MSSOTLTrafficLightLogic::computeReturnTime(), MSSwarmTrafficLightLogic::computeReturnTime(), MSPModel_NonInteracting::PState::computeWalkingTime(), MSLane::detectCollisionBetween(), MSE3Collector::detectorUpdate(), MSMeanData::detectorUpdate(), MSInsertionControl::determineCandidates(), TraCIServer::dispatchCommand(), MSVehicle::enterLaneAtInsertion(), MSPModel_Remote::execute(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSProgram::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSCalibrator::execute(), MSEventControl::execute(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), TrackerValueDesc::getAggregationSpan(), MEVehicle::getConservativeSpeed(), libsumo::InductionLoop::getLastStepMeanLength(), libsumo::InductionLoop::getLastStepMeanSpeed(), libsumo::InductionLoop::getLastStepVehicleIDs(), libsumo::InductionLoop::getLastStepVehicleNumber(), MSInductLoop::getOccupancy(), GUINet::getRTFactor(), MSLeaderInfo::getSubLanes(), libsumo::InductionLoop::getVehicleData(), MSVehicle::Influencer::influenceSpeed(), MSVehicle::keepStopping(), MSAbstractLaneChangeModel::laneChangeOutput(), GUIRunThread::makeStep(), MSCFModel_Rail::maxNextSpeed(), MSCFModel_Rail::minNextSpeed(), MSPModel_Striping::moveInDirectionOnLane(), MSDevice_ToC::MRMExecutionStep(), MSPModel_Remote::MSPModel_Remote(), MSRailSignal::MSRailSignal(), MSDevice_Tripinfo::notifyMove(), MSVehicleContainer::DepartFinder::operator()(), NLTriggerBuilder::parseAndBuildCalibrator(), SUMOVehicleParserHelper::parseVTypeEmbedded(), MSVehicle::planMoveInternal(), MSNet::postSimStepOutput(), MSDevice_Routing::preInsertionReroute(), MSLCM_LC2013::prepareStep(), SUMOVehicleParserHelper::processActionStepLength(), TraCIServerAPI_Vehicle::processSet(), MSDevice_ToC::requestToC(), GUIRunThread::run(), TrackerValueDesc::setAggregationSpan(), MSFrame::setMSGlobals(), libsumo::Vehicle::setSpeed(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSTransportableControl::setWaitEnd(), MELoop::simulate(), MSNet::simulationStep(), MSLaneChangerSublane::startChangeSublane(), MSAbstractLaneChangeModel::startLaneChangeManeuver(), MSDevice_ToC::ToCPreparationStep(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSInsertionControl::tryInsert(), MSOffTrafficLightLogic::trySwitch(), MSRailSignal::trySwitch(), MSAbstractLaneChangeModel::unchanged(), PolygonDynamics::update(), MSRailCrossing::updateCurrentPhase(), GUIApplicationWindow::updateTimeLCD(), MSVehicle::updateWaitingTime(), MSPModel_Striping::PState::walk(), ODMatrix::write(), MSNet::writeOutput(), and MSMeanData::writeXMLOutput().