1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2003-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
10 /// @file    MSGlobals.h
11 /// @author  Daniel Krajzewicz
12 /// @author  Christian Roessel
13 /// @author  Michael Behrisch
14 /// @author  Jakob Erdmann
15 /// @date    late summer 2003
16 /// @version $Id$
17 ///
18 // Some static variables for faster access
19 /****************************************************************************/
20 #ifndef MSGlobals_h
21 #define MSGlobals_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <map>
30 #include <utils/common/SUMOTime.h>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class MELoop;
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
42 /**
43  * @class MSGlobals
44  * This class holds some static variables, filled mostly with values coming
45  *  from the command line or the simulation configuration file.
46  * They are stored herein to allow a faster access than from the options
47  *  container.
48  */
49 class MSGlobals {
50 public:
51     /// Information whether empty edges shall be written on dump
52     static bool gOmitEmptyEdgesOnDump;
53 
54     /* Allows switching between time step integration methods
55      * "Semi-Implicit Euler" (default) and the ballistic update rule. */
56     static bool gSemiImplicitEulerUpdate;
57 
58     /** Information how long the simulation shall wait until it recognizes
59         a vehicle as a grid lock participant */
60     static SUMOTime gTimeToGridlock;
61 
62     /** The time to detect grid locks on highways */
63     static SUMOTime gTimeToGridlockHighways;
64 
65     /** Information how long a vehicle must wait for impatience to grow from 0 to 1 */
66     static SUMOTime gTimeToImpatience;
67 
68     /// Information whether the simulation regards internal lanes
69     static bool gUsingInternalLanes;
70 
71     /** Vehicles on internal lanes (even partially) with a waiting time that exceeds this threshold
72      * no longer block cross-traffic on the junction */
73     static SUMOTime gIgnoreJunctionBlocker;
74 
75     /** information whether the network shall check for collisions */
76     static bool gCheck4Accidents;
77 
78     /** information whether the routes shall be checked for connectivity */
79     static bool gCheckRoutes;
80 
81     /** information Duration of a lane change maneuver */
82     static SUMOTime gLaneChangeDuration;
83 
84     /** Lateral resolution within a lane */
85     static double gLateralResolution;
86 
87     /// Information whether a state has been loaded
88     static bool gStateLoaded;
89 
90     /** Information whether mesosim shall be used */
91     static bool gUseMesoSim;
92 
93     /** Information whether limited junction control shall be used */
94     static bool gMesoLimitedJunctionControl;
95 
96     /** Information whether overtaking is enabled in the mesoscopic simulation */
97     static bool gMesoOvertaking;
98 
99     /** scaling factor for macroscopic time penalty when passing tls controlled intersection */
100     static double gMesoTLSPenalty;
101 
102     /** penalty time for passing a minor link */
103     static SUMOTime gMesoMinorPenalty;
104 
105     /// mesoscopic simulation infrastructure
106     static MELoop* gMesoNet;
107 
108     /// length of memory for waiting times (in millisecs)
109     static SUMOTime gWaitingTimeMemory;
110 
111     /// default value for the interval between two action points for MSVehicle (defaults to DELTA_T)
112     static SUMOTime gActionStepLength;
113 
114     /// encoding of the string-option default.emergencydecel
115     static double gDefaultEmergencyDecel;
116 
117     /// whether unit tests are being run
118     static bool gUnitTests;
119 
120     /// whether the simulationLoop is in the lane changing phase
121     static bool gComputeLC;
122 
123     /// how many threads to use for simulation
124     static int gNumSimThreads;
125 
126     /// treshold for warning about strong deceleration
127     static double gEmergencyDecelWarningThreshold;
128 
129     /// time penalty for passing a minor link when routing
130     static double gMinorPenalty;
131 
132 };
133 
134 
135 #endif
136 
137 /****************************************************************************/
138 
139