![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <config.h>
#include <sstream>
#include <iostream>
#include <iomanip>
#include "SUMOTime.h"
#include "StringTokenizer.h"
#include "StringUtils.h"
#include "StdDefs.h"
#include "MsgHandler.h"
Go to the source code of this file.
Functions | |
bool | checkStepLengthMultiple (const SUMOTime t, const std::string &error, SUMOTime deltaT) |
check if given SUMOTime is multiple of the step length More... | |
std::string | elapsedMs2string (long long int t) |
convert ms to string for log output More... | |
SUMOTime | string2time (const std::string &r) |
convert string to SUMOTime More... | |
std::string | time2string (SUMOTime t) |
convert SUMOTime to string More... | |
Variables | |
SUMOTime | DELTA_T = 1000 |
Definition in file SUMOTime.cpp.
check if given SUMOTime is multiple of the step length
Definition at line 122 of file SUMOTime.cpp.
References time2string(), and WRITE_WARNING.
Referenced by MSFrame::checkOptions(), NLDetectorBuilder::checkSampleInterval(), and NLDetectorBuilder::createEdgeLaneMeanData().
std::string elapsedMs2string | ( | long long int | t | ) |
convert ms to string for log output
Definition at line 109 of file SUMOTime.cpp.
References gHumanReadableTime, STEPS2TIME, time2string(), and toString().
Referenced by MSNet::generateStatistics(), and SUMOAbstractRouter< E, V >::~SUMOAbstractRouter().
SUMOTime string2time | ( | const std::string & | r | ) |
convert string to SUMOTime
Definition at line 45 of file SUMOTime.cpp.
References StringTokenizer::getVector(), STEPS2TIME, SUMOTime_MAX, TIME2STEPS, and StringUtils::toDouble().
Referenced by MSNet::adaptIntermodalRouter(), RONet::adaptIntermodalRouter(), ODMatrix::add(), MSDetectorControl::add(), MSDetectorControl::addDetectorAndInterval(), NLHandler::addEdgeLaneMeanData(), NLBuilder::build(), MSTransportableDevice_Routing::buildDevices(), NLBuilder::buildNet(), NLBuilder::buildRouteLoaderControl(), NLTriggerBuilder::buildVaporizer(), MSDevice_Routing::buildVehicleDevices(), MSFrame::checkOptions(), MSDevice_Routing::checkOptions(), TraCIServer::cleanup(), MSNet::closeBuilding(), MSRouteHandler::closeFlow(), MSRouteHandler::closePerson(), MSRouteHandler::closePersonFlow(), MSRouteHandler::closeVehicle(), computeRoutes(), MSTLLogicControl::WAUTSwitchProcedure::getGSPTime(), MSNet::getIntermodalRouter(), MSNet::getMesoType(), SUMOSAXAttributes::getOptSUMOTimeReporting(), GNEStopFrame::getStopParameter(), SUMOSAXAttributes::getSUMOTimeReporting(), GUIApplicationWindow::handleEvent_SimulationLoaded(), MSActuatedTrafficLightLogic::init(), MSPhaseDefinition::init(), MSLane::initCollisionOptions(), MSDevice_Taxi::initDispatch(), MSRoutingEngine::initRouter(), MSRoutingEngine::initWeightUpdate(), LIBSUMO_NAMESPACE::Simulation::load(), GUISettingsHandler::loadBreakpoints(), main(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDevice_Taxi::MSDevice_Taxi(), MSNet::MSNet(), MSPModel_Striping::MSPModel_Striping(), MSTriggeredRerouter::myEndElement(), SUMORouteHandler::myEndElement(), MSStateHandler::myStartElement(), GUIDialog_Breakpoints::onCmdEditTable(), ROLoader::openRoutes(), TraCIServer::openSocket(), SUMOVehicleParameter::parseDepart(), SUMOVehicleParserHelper::parseVTypeEmbedded(), readDetectorFlows(), GUILoadThread::run(), GNEPerson::setAttribute(), GNEPersonStop::setAttribute(), GNEStop::setAttribute(), GNEVehicle::setAttribute(), GNEVehicleType::setAttribute(), MSFrame::setMSGlobals(), MSActuatedTrafficLightLogic::setParameter(), signalHandler(), startComputation(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::WAUTSwitchProcedure_Stretch(), MSFCDExport::write(), and MSEmissionExport::write().
std::string time2string | ( | SUMOTime | t | ) |
convert SUMOTime to string
Definition at line 68 of file SUMOTime.cpp.
References gHumanReadableTime, gPrecision, MAX2(), MIN2(), SUMOTime_MAX, TIME2STEPS, and TS.
Referenced by LIBSUMO_NAMESPACE::Person::add(), MSVehicleTransfer::add(), MSPModel_Striping::add(), MSDispatch::addReservation(), IntermodalNetwork< E, L, N, V >::addSchedule(), AGActivityTripWriter::addTrip(), GUIRunThread::begin(), 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(), MSFrame::checkOptions(), checkStepLengthMultiple(), MSNet::closeSimulation(), RailwayRouter< E, V >::compute(), MSDispatch_Greedy::computeDispatch(), MSDispatch_GreedyClosest::computeDispatch(), NBOwnTLDef::computeLogicAndConts(), computeRoutes(), MSDevice_Taxi::customerArrived(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSSOTLPolicy::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), MSDispatch_GreedyShared::dispatch(), MSDispatch_RouteExtension::dispatch(), MSDevice_Taxi::dispatchShared(), GUIVehicle::drawRouteHelper(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), GUITLLogicPhasesTrackerWindow::drawValues(), elapsedMs2string(), GUIDialog_Breakpoints::encode2TXT(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSSwitchStates::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), MSDevice_Taxi::generateOutput(), MSDevice_Tripinfo::generateOutput(), GNECalibrator::getAttribute(), GNECalibratorFlow::getAttribute(), GNEChargingStation::getAttribute(), GNEDetectorE2::getAttribute(), GNEDetectorE3::getAttribute(), GNERerouter::getAttribute(), GNERerouterInterval::getAttribute(), GNERouteProbe::getAttribute(), GNEVaporizer::getAttribute(), GNEPerson::getAttribute(), GNEPersonStop::getAttribute(), GNEStop::getAttribute(), GNEVehicle::getAttribute(), GNEVehicleType::getAttribute(), MSVehicle::getBackPositionOnLane(), GNEVehicle::getBegin(), SUMOVehicleParameter::getDepart(), MSRailSignal::LinkInfo::getDriveWay(), IntermodalTrip< E, N, V >::getID(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), MSPModel_Striping::getNextLane(), MSDevice_Routing::getParameter(), MSTransportableDevice_Routing::getParameter(), GUICalibrator::getParameterWindow(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIMEVehicle::getParameterWindow(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), MSStageWaiting::getStageSummary(), MSStageDriving::getStageSummary(), GUIVehicle::getStopInfo(), MSLane::handleCollisionBetween(), GUIApplicationWindow::handleEvent_SimulationEnded(), MSBaseVehicle::haveValidStopEdges(), ROMAAssignments::incremental(), MSVehicle::Influencer::influenceChangeDecision(), MSActuatedTrafficLightLogic::init(), MSEdge::insertVehicle(), MSSOTLTrafficLightLogic::isThresholdPassed(), MSVehicle::joinTrainPartFront(), MSAbstractLaneChangeModel::laneChangeOutput(), MSVehicle::leaveLane(), LIBSUMO_NAMESPACE::Simulation::load(), MSPModel_Striping::moveInDirectionOnLane(), MSLaneSpeedTrigger::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), MSTriggeredRerouter::notifyEnter(), GUIDialog_ViewSettings::onCmdExportSetting(), MSMeanData::openInterval(), ROLoader::openRoutes(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSNet::postSimStepOutput(), MSNet::preSimStepOutput(), MSVehicle::processLaneAdvances(), ROLoader::processRoutes(), ODMatrix::readTime(), GUIDialog_Breakpoints::rebuildList(), MSCalibrator::removePending(), MSVehicle::rerouteParkingArea(), MSPerson::MSPersonStage_Walking::routeOutput(), MSStageWaiting::routeOutput(), MSStageDriving::routeOutput(), MSTransportable::routeOutput(), ROPerson::Ride::saveAsXML(), MSStateHandler::saveState(), MEVehicle::saveState(), MSVehicle::saveState(), MSCalibrator::setFlow(), MSNet::simulate(), MSNet::simulationStep(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), MELoop::teleportVehicle(), MSTransportable::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSPerson::MSPersonStage_Access::tripInfoOutput(), MSStageWaiting::tripInfoOutput(), MSStageDriving::tripInfoOutput(), MSStageTranship::tripInfoOutput(), MSSOTLTrafficLightLogic::trySwitch(), MSSOTLTrafficLightLogic::updateDecayThreshold(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateShadowLane(), MSVehicle::updateState(), MSPModel_Striping::PState::walk(), MSStop::write(), SUMOVehicleParameter::Stop::write(), MSXMLRawOut::write(), MSElecHybridExport::write(), MSFullExport::write(), MSQueueExport::write(), MSFCDExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), ODMatrix::write(), MSElecHybridExport::writeAggregated(), MSLink::writeApproaching(), MSChargingStation::writeChargingStationOutput(), GNEPerson::writeDemandElement(), GNEVehicle::writeDemandElement(), RODFDetector::writeEmitterDefinition(), ODMatrix::writeFlows(), writeInterval(), MSNet::writeOutput(), MSDevice_Vehroutes::writeOutput(), MSOverheadWire::writeOverheadWireSegmentOutput(), RODFDetector::writeSingleSpeedTrigger(), ROLoader::writeStats(), TrajectoriesHandler::writeXMLEmissions(), MEInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), MSE3Collector::writeXMLOutput(), MSRouteProbe::writeXMLOutput(), MSCalibrator::writeXMLOutput(), and MSDevice_Vehroutes::writeXMLRoute().
SUMOTime DELTA_T = 1000 |
Definition at line 37 of file SUMOTime.cpp.
Referenced by MSCFModel_CC::_consensus(), MSCFModel_CC::_v(), MSVehicle::Influencer::GapControlState::activate(), MSRoutingEngine::adaptEdgeEfforts(), MSTransportableControl::add(), MSPModel_Striping::add(), MSVehicleContainer::add(), GUITLLogicPhasesTrackerWindow::addValue(), MSDevice_ToC::awarenessRecoveryStep(), MSTransportableControl::boardAnyWaiting(), MSFrame::buildStreams(), MSVehicleType::check(), MSLaneChanger::checkChange(), RONet::checkFlows(), GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), MSE2Collector::checkJam(), GUIViewTraffic::checkSnapshots(), GUISUMOAbstractView::checkSnapshots(), NLJunctionControlBuilder::closeTrafficLightLogic(), MSPModel_NonInteracting::PState::computeDuration(), MSInsertionControl::computeRandomDepartOffset(), MSSOTLTrafficLightLogic::computeReturnTime(), MSSwarmTrafficLightLogic::computeReturnTime(), MSLane::detectCollisionBetween(), MSE3Collector::detectorUpdate(), MSMeanData::detectorUpdate(), TraCIServer::dispatchCommand(), MSVehicle::enterLaneAtInsertion(), METriggeredCalibrator::execute(), Command_SaveTLSProgram::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSSwitchStates::execute(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSPModel_Striping::MovePedestrians::execute(), MSCalibrator::execute(), MSEventControl::execute(), MSPModel_Remote::execute(), MSVehicle::executeMove(), TrackerValueDesc::getAggregationSpan(), MEVehicle::getConservativeSpeed(), LIBSUMO_NAMESPACE::InductionLoop::getLastStepMeanLength(), LIBSUMO_NAMESPACE::InductionLoop::getLastStepMeanSpeed(), LIBSUMO_NAMESPACE::InductionLoop::getLastStepVehicleIDs(), LIBSUMO_NAMESPACE::InductionLoop::getLastStepVehicleNumber(), MSInductLoop::getOccupancy(), GUINet::getRTFactor(), MSVehicle::getStopDelay(), MSLeaderInfo::getSubLanes(), LIBSUMO_NAMESPACE::InductionLoop::getVehicleData(), MSVehicle::Influencer::influenceSpeed(), MSLane::insertVehicle(), MSVehicle::keepStopping(), MSAbstractLaneChangeModel::laneChangeOutput(), MSTransportableControl::loadAnyWaiting(), GUIRunThread::makeStep(), MSCFModel_Rail::maxNextSpeed(), MSCFModel_Rail::minNextSpeed(), MSPModel_Striping::moveInDirectionOnLane(), MSDevice_ToC::MRMExecutionStep(), MSPModel_Remote::MSPModel_Remote(), MSRailSignal::MSRailSignal(), MSDevice_Tripinfo::notifyIdle(), MSDevice_ElecHybrid::notifyMove(), MSDevice_Taxi::notifyMove(), MSDevice_Tripinfo::notifyMove(), MSVehicleContainer::DepartFinder::operator()(), NLTriggerBuilder::parseAndBuildCalibrator(), SUMOVehicleParserHelper::parseVTypeEmbedded(), MSVehicle::planMoveInternal(), MSNet::postSimStepOutput(), MSDevice_Routing::preInsertionReroute(), SUMOVehicleParserHelper::processActionStepLength(), TraCIServerAPI_Vehicle::processSet(), MSDevice_ToC::requestToC(), GUIRunThread::run(), TrackerValueDesc::setAggregationSpan(), MSFrame::setMSGlobals(), LIBSUMO_NAMESPACE::Vehicle::setSpeed(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSTransportableControl::setWaitEnd(), MSTrafficLightLogic::SwitchCommand::shiftTime(), MELoop::simulate(), MSNet::simulationStep(), MSLaneChangerSublane::startChangeSublane(), MSAbstractLaneChangeModel::startLaneChangeManeuver(), MSDevice_ToC::ToCPreparationStep(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), 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().