Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
StdDefs.cpp File Reference
#include "StdDefs.h"
#include <sstream>
Include dependency graph for StdDefs.cpp:

Go to the source code of this file.

Functions

int getScalingQuota (double frac, int loaded)
 Returns the number of instances of the current object that shall be emitted given the number of loaded objects considering that "frac" of all objects shall be emitted overall.
 
double roundBits (double x, int fractionBits)
 round to the given number of mantissa bits beyond the given number
 
double roundDecimal (double x, int precision)
 round to the given number of decimal digits
 
double truncate (double x, int fractionBits)
 discrds mantissa bits beyond the given number
 

Variables

bool gDebugFlag1 = false
 global utility flags for debugging
 
bool gDebugFlag2 = false
 
bool gDebugFlag3 = false
 
bool gDebugFlag4 = false
 
bool gDebugFlag5 = false
 
bool gDebugFlag6 = false
 
bool gHumanReadableTime = false
 
bool gIgnoreUnknownVClass = false
 
std::string gLanguage = "C"
 the language for GUI elements and messages
 
int gPrecision = 2
 the precision for floating point outputs
 
int gPrecisionGeo = 6
 
int gPrecisionRandom = 4
 
bool gSimulation = false
 
int GUIDesignHeight = 23
 the default size for GUI elements
 
double gWeightsRandomFactor = 1
 
double gWeightsWalkOppositeFactor = 1
 

Detailed Description

Author
Jakob Erdmann
Michael Behrisch
Laura Bieker
Date
2014-01-07

Definition in file StdDefs.cpp.

Function Documentation

◆ getScalingQuota()

int getScalingQuota ( double  frac,
int  loaded 
)

Returns the number of instances of the current object that shall be emitted given the number of loaded objects considering that "frac" of all objects shall be emitted overall.

Returns
the number of objects to create (something between 0 and ceil(frac))

Definition at line 61 of file StdDefs.cpp.

Referenced by MSVehicleControl::getQuota(), and ROMARouteHandler::myEndElement().

Here is the caller graph for this function:

◆ roundBits()

double roundBits ( double  x,
int  fractionBits 
)

round to the given number of mantissa bits beyond the given number

Definition at line 48 of file StdDefs.cpp.

◆ roundDecimal()

double roundDecimal ( double  x,
int  precision 
)

round to the given number of decimal digits

Definition at line 54 of file StdDefs.cpp.

Referenced by MSVehicleType::computeChosenSpeedDeviation(), MSLane::getDepartPosLat(), MSLane::getDepartSpeed(), and MSLane::insertVehicle().

Here is the caller graph for this function:

◆ truncate()

double truncate ( double  x,
int  fractionBits 
)

discrds mantissa bits beyond the given number

Definition at line 44 of file StdDefs.cpp.

Variable Documentation

◆ gDebugFlag1

◆ gDebugFlag2

◆ gDebugFlag3

◆ gDebugFlag4

◆ gDebugFlag5

◆ gDebugFlag6

bool gDebugFlag6 = false

Definition at line 42 of file StdDefs.cpp.

Referenced by MSLink::blockedByFoe(), and MSLink::computeFoeArrivalTimeBraking().

◆ gHumanReadableTime

◆ gIgnoreUnknownVClass

bool gIgnoreUnknownVClass = false

Definition at line 31 of file StdDefs.cpp.

Referenced by SystemFrame::checkOptions(), and parseVehicleClasses().

◆ gLanguage

std::string gLanguage = "C"

the language for GUI elements and messages

Definition at line 34 of file StdDefs.cpp.

Referenced by SystemFrame::addReportOptions(), main(), GUIMainWindow::onCmdChangeLanguage(), and GUIMainWindow::onUpdChangeLanguage().

◆ gPrecision

◆ gPrecisionGeo

◆ gPrecisionRandom

◆ gSimulation

bool gSimulation = false

◆ GUIDesignHeight

int GUIDesignHeight = 23

the default size for GUI elements

Definition at line 35 of file StdDefs.cpp.

Referenced by GNEFixAdditionalElements::AdditionalList::AdditionalList(), GNEFixElementsDialog::AdditionalList::AdditionalList(), MFXDecalsTable::Column::adjustColumnWidth(), GUIDesigns::buildFXMenuCheckbox(), GUIDesigns::buildFXMenuCheckboxIcon(), GUIDesigns::buildFXMenuCommand(), GUIDesigns::buildFXMenuCommand(), GUIDesigns::buildFXMenuCommandRecentFile(), GUIDesigns::buildFXMenuCommandShortcut(), GUIDesigns::buildFXMenuTitle(), GNEDistributionFrame::DistributionValuesEditor::DistributionValuesEditor(), MFXDecalsTable::fillTable(), GNETLSTable::Column::getColumnMinimumWidth(), GNEOptionsDialog::GNEOptionsDialog(), GUIDialog_AppSettings::GUIDialog_AppSettings(), GUIIconSubSys::GUIIconSubSys(), GUIMainWindow::GUIMainWindow(), GNEPythonToolDialog::openDialog(), GUIDialog_Breakpoints::rebuildList(), GNEFixDemandElements::FixOptions::setInvalidElements(), GNEFixNetworkElements::FixOptions::setInvalidElements(), GNERerouterIntervalDialog::updateClosingLaneReroutesTable(), GNERerouterIntervalDialog::updateClosingReroutesTable(), GNERerouterIntervalDialog::updateDestProbReroutesTable(), GNECalibratorDialog::updateFlowTable(), GNERerouterDialog::updateIntervalTable(), GNERerouterIntervalDialog::updateParkingAreaReroutesTable(), GNERerouterIntervalDialog::updateRouteProbReroutesTable(), GNECalibratorDialog::updateRouteTable(), GNEVariableSpeedSignDialog::updateTableSteps(), and GNECalibratorDialog::updateVehicleTypeTable().

◆ gWeightsRandomFactor

◆ gWeightsWalkOppositeFactor

double gWeightsWalkOppositeFactor = 1