Eclipse SUMO - Simulation of Urban MObility
MSFrame Class Reference

Sets and checks options for microsim; inits global outputs and settings. More...

#include <MSFrame.h>

Static Public Member Functions

static void buildStreams ()
 Builds the streams used possibly by the simulation. More...
 
static bool checkOptions ()
 Checks the set options. More...
 
static void fillOptions ()
 Inserts options used by the simulation into the OptionsCont-singleton. More...
 
static void setMSGlobals (OptionsCont &oc)
 Sets the global microsim-options. More...
 

Detailed Description

Sets and checks options for microsim; inits global outputs and settings.

In addition to setting and checking options, this frame also sets global values via "setMSGlobals". They are stored in MSGlobals.

Also, global output streams are initialised within "buildStreams".

See also
MSGlobals

Definition at line 47 of file MSFrame.h.

Member Function Documentation

◆ buildStreams()

void MSFrame::buildStreams ( )
static

Builds the streams used possibly by the simulation.

Definition at line 797 of file MSFrame.cpp.

References OutputDevice::createDeviceByOption(), DELTA_T, OptionsCont::getOptions(), MSGlobals::gOverheadWireRecuperation, MSDevice_Vehroutes::init(), MSStopOut::init(), STEPS2MS, and toString().

Referenced by NLBuilder::buildNet().

Here is the caller graph for this function:

◆ checkOptions()

bool MSFrame::checkOptions ( )
static

Checks the set options.

The following constraints must be valid:

  • the network-file was specified (otherwise no simulation is existing)
  • the begin and the end of the simulation must be given
  • The default lane change model must be known If one is not, false is returned.
Returns
Whether the settings are valid
Todo:

Rechek usage of the lane change model

probably, more things should be checked...

Definition at line 839 of file MSFrame.cpp.

References SUMOXMLDefinitions::CarFollowModels, MSDevice::checkOptions(), SystemFrame::checkOptions(), checkStepLengthMultiple(), OptionsCont::getBool(), OptionsCont::getFloat(), OptionsCont::getInt(), OptionsCont::getOptions(), OptionsCont::getString(), OptionsCont::getStringVector(), OptionsCont::isDefault(), OptionsCont::isSet(), OptionsCont::isUsableFileList(), MAX2(), OptionsCont::setDefault(), string2time(), TIME2STEPS, time2string(), TL, StringUtils::toDouble(), toString(), WRITE_ERROR, WRITE_ERRORF, WRITE_WARNING, and WRITE_WARNINGF.

Referenced by NLBuilder::init(), and GUILoadThread::run().

Here is the caller graph for this function:

◆ fillOptions()

void MSFrame::fillOptions ( )
static

Inserts options used by the simulation into the OptionsCont-singleton.

Device-options are inserted by calling the device's "insertOptions" -methods.

!! check, describe

!! check, describe

Definition at line 60 of file MSFrame.cpp.

References OptionsCont::addCallExample(), SystemFrame::addConfigurationOptions(), OptionsCont::addDescription(), OptionsCont::addOptionSubTopic(), SystemFrame::addReportOptions(), OptionsCont::addSynonyme(), OptionsCont::addXMLDefault(), OptionsCont::doRegister(), OptionsCont::getOptions(), MSDevice::insertOptions(), RandHelper::insertRandOptions(), INVALID_DOUBLE, and TL.

Referenced by NLBuilder::init(), main(), and GUILoadThread::run().

Here is the caller graph for this function:

◆ setMSGlobals()

void MSFrame::setMSGlobals ( OptionsCont oc)
static

Sets the global microsim-options.

Parameters
[in]ocThe options container to get the values from
See also
MSGlobals

Definition at line 1040 of file MSFrame.cpp.

References DELTA_T, MSGlobals::gActionStepLength, MSGlobals::gCheck4Accidents, MSGlobals::gCheckRoutes, MSGlobals::gDefaultEmergencyDecel, MSGlobals::gEmergencyDecelWarningThreshold, MSGlobals::gEmergencyInsert, OptionsCont::getBool(), OptionsCont::getFloat(), OptionsCont::getInt(), OptionsCont::getOptions(), OptionsCont::getString(), MSGlobals::gGridlockHighwaysSpeed, MSGlobals::gIgnoreJunctionBlocker, MSGlobals::gLaneChangeDuration, MSGlobals::gLateralResolution, MSGlobals::gMesoLimitedJunctionControl, MSGlobals::gMinorPenalty, MSGlobals::gModelParkingManoeuver, MSGlobals::gNumSimThreads, MSGlobals::gNumThreads, MSGlobals::gOmitEmptyEdgesOnDump, MSGlobals::gOverheadWireCurrentLimits, MSGlobals::gOverheadWireRecuperation, MSGlobals::gOverheadWireSolver, MSGlobals::gRemoveGridlocked, MSGlobals::gSemiImplicitEulerUpdate, MSGlobals::gStartupWaitThreshold, MSGlobals::gStateLoaded, MSGlobals::gStopTolerance, MSGlobals::gSublane, MSGlobals::gTimeToGridlock, MSGlobals::gTimeToGridlockHighways, MSGlobals::gTimeToImpatience, MSGlobals::gTimeToTeleportBidi, MSGlobals::gTimeToTeleportDisconnected, MSGlobals::gTLSPenalty, MSGlobals::gTLSYellowMinDecel, MSGlobals::gUseMesoSim, MSGlobals::gUseStopEnded, MSGlobals::gUseStopStarted, MSGlobals::gUsingInternalLanes, MSGlobals::gWaitingTimeMemory, MSGlobals::gWeightsSeparateTurns, MSLane::initCollisionOptions(), MSAbstractLaneChangeModel::initGlobalOptions(), OptionsCont::isDefault(), OptionsCont::isSet(), MAX2(), SUMOVehicleParserHelper::processActionStepLength(), string2time(), TL, StringUtils::toDouble(), VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL, VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT, and WRITE_MESSAGE.

Referenced by NLBuilder::init(), and GUILoadThread::run().

Here is the caller graph for this function:

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