Eclipse SUMO - Simulation of Urban MObility
StdDefs.cpp File Reference
#include "StdDefs.h"
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. More...
 
double roundBits (double x, int fractionBits)
 round to the given number of mantissa bits beyond the given number More...
 
double truncate (double x, int fractionBits)
 discrds mantissa bits beyond the given number More...
 

Variables

bool gDebugFlag1 = false
 global utility flags for debugging More...
 
bool gDebugFlag2 = false
 
bool gDebugFlag3 = false
 
bool gDebugFlag4 = false
 
bool gDebugFlag5 = false
 
bool gHumanReadableTime = false
 
int gPrecision = 2
 the precision for floating point outputs More...
 
int gPrecisionGeo = 6
 
bool gSimulation = false
 
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 50 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 42 of file StdDefs.cpp.

◆ truncate()

double truncate ( double  x,
int  fractionBits 
)

discrds mantissa bits beyond the given number

Definition at line 38 of file StdDefs.cpp.

Variable Documentation

◆ gDebugFlag1

◆ gDebugFlag2

◆ gDebugFlag3

◆ gDebugFlag4

◆ gDebugFlag5

bool gDebugFlag5 = false

Definition at line 36 of file StdDefs.cpp.

Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::getOncomingVehicle().

◆ gHumanReadableTime

bool gHumanReadableTime = false

Definition at line 27 of file StdDefs.cpp.

Referenced by SystemFrame::checkOptions(), elapsedMs2string(), and time2string().

◆ gPrecision

◆ gPrecisionGeo

◆ gSimulation

bool gSimulation = false

Definition at line 28 of file StdDefs.cpp.

Referenced by LIBSUMO_NAMESPACE::Simulation::load(), and main().

◆ gWeightsRandomFactor

◆ gWeightsWalkOppositeFactor

double gWeightsWalkOppositeFactor = 1