Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/microsim/MSFrame.h
185785 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
14
/// @file MSFrame.h
15
/// @author Daniel Krajzewicz
16
/// @author Michael Behrisch
17
/// @date Sept 2002
18
///
19
// Sets and checks options for microsim; inits global outputs and settings
20
/****************************************************************************/
21
#pragma once
22
#include <config.h>
23
24
25
// ===========================================================================
26
// class declarations
27
// ===========================================================================
28
class OptionsCont;
29
class MSNet;
30
class OutputDevice;
31
32
33
// ===========================================================================
34
// class definitions
35
// ===========================================================================
36
/**
37
* @class MSFrame
38
* @brief Sets and checks options for microsim; inits global outputs and settings
39
*
40
* In addition to setting and checking options, this frame also sets global
41
* values via "setMSGlobals". They are stored in MSGlobals.
42
*
43
* Also, global output streams are initialised within "buildStreams".
44
*
45
* @see MSGlobals
46
*/
47
class MSFrame {
48
public:
49
/** @brief Inserts options used by the simulation into the OptionsCont-singleton
50
*
51
* Device-options are inserted by calling the device's "insertOptions"
52
* -methods.
53
*/
54
static void fillOptions();
55
56
57
/** @brief Builds the streams used possibly by the simulation */
58
static void buildStreams();
59
60
61
/** @brief Checks the set options.
62
*
63
* The following constraints must be valid:
64
* @arg the network-file was specified (otherwise no simulation is existing)
65
* @arg the begin and the end of the simulation must be given
66
* @arg The default lane change model must be known
67
* If one is not, false is returned.
68
*
69
* @return Whether the settings are valid
70
* @todo Rechek usage of the lane change model
71
* @todo probably, more things should be checked...
72
*/
73
static bool checkOptions();
74
75
76
/** @brief Sets the global microsim-options
77
*
78
* @param[in] oc The options container to get the values from
79
* @see MSGlobals
80
*/
81
static void setMSGlobals(OptionsCont& oc);
82
83
};
84
85