 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
85 oc.
set(
"aggregate-warnings",
"5");
121 net =
new GNENet(netBuilder);
137 if (oc.
getBool(
"ignore-errors")) {
145 net =
new GNENet(netBuilder);
152 if (oc.
isSet(
"configuration-file")) {
154 }
else if (oc.
isSet(
"sumo-net-file")) {
160 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
167 }
catch (std::exception& e) {
204 oc.
addCallExample(
"-c <CONFIGURATION>",
"edit net with options read from file");
230 oc.
addDescription(
"additional-files",
"Netedit",
"Load additional and shapes descriptions from FILE(s)");
233 oc.
addDescription(
"additionals-output",
"Netedit",
"file in which additionals must be saved");
237 oc.
addDescription(
"route-files",
"Netedit",
"Load demand elements descriptions from FILE(s)");
240 oc.
addDescription(
"demandelements-output",
"Netedit",
"file in which demand elements must be saved");
243 oc.
addDescription(
"TLSPrograms-output",
"Netedit",
"file in which TLS Programs must be saved");
246 oc.
addDescription(
"disable-laneIcons",
"Visualisation",
"Disable icons of special lanes");
252 oc.
addDescription(
"gui-settings-file",
"Visualisation",
"Load visualisation settings from FILE");
255 oc.
addDescription(
"registry-viewport",
"Visualisation",
"Load current viewport from registry");
258 oc.
addDescription(
"window-size",
"Visualisation",
"Create initial window with the given x,y size");
261 oc.
addDescription(
"window-pos",
"Visualisation",
"Create initial window at the given x,y position");
266 oc.
addDescription(
"gui-testing",
"Visualisation",
"Enable overlay for screen recognition");
269 oc.
addDescription(
"gui-testing-debug",
"Visualisation",
"Enable output messages during GUI-Testing");
272 oc.
addDescription(
"gui-testing-debug-gl",
"Visualisation",
"Enable output messages during GUI-Testing specific of gl functions");
275 oc.
addDescription(
"gui-testing.setting-output",
"Visualisation",
"Save gui settings in the given settings-output file");
279 oc.
addDescription(
"begin",
"Time",
"Defines the begin time in seconds; The simulation starts at this time");
282 oc.
addDescription(
"end",
"Time",
"Defines the end time in seconds; The simulation ends at this time");
285 oc.
addDescription(
"default.action-step-length",
"Processing",
"Length of the default interval length between action points for the car-following and lane-change models (in seconds). If not specified, the simulation step-length is used per default. Vehicle- or VType-specific settings override the default. Must be a multiple of the simulation step-length.");
299 oc.
set(
"offset.disable-normalization",
"true");
300 oc.
set(
"no-turnarounds",
"true");
325 if (!oc.
isSet(
"output-file")) {
330 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
343 if (
myFile !=
"" && !useStartupOptions) {
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
@ MT_ERROR
The message is an error.
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
static void initOutputOptions()
init output options
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on.
Instance responsible for building networks.
@ MT_MESSAGE
The message is only something to show.
void resetWritable()
Resets all options to be writeable.
FXint run()
starts the thread. The thread ends after the net has been loaded
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
bool myLoadNet
Information whether only the network shall be loaded.
A NBNetBuilder extended by visualisation and editing capabilities.
Encapsulates an object's method for using it as a message retriever.
@ MT_WARNING
The message is a warning.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void retrieveMessage(const MsgHandler::MsgType type, const std::string &msg)
Retrieves messages from the loading module.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
OutputDevice * myGLDebugRetriever
static OptionsCont & getOptions()
Retrieves the options.
static void fillOptions(bool forNetgen)
Inserts options used by the network writer.
OutputDevice * myWarningRetriever
FXEX::FXThreadEvent & myEventThrow
event throw
static bool init(OptionsCont &oc)
Initialises the processing and the final instance using the given options.
virtual ~GNELoadThread()
destructor
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.
virtual void clear()
Clears information whether an error occurred previously.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
static void enableDebugGLMessages(bool enable)
enable/disable gl-debug messages
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
bool initOptions()
init options
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme)
Enables or disables validation.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
OutputDevice * myMessageRetriever
static void fillOptions(bool forNetedit=false)
Inserts options used by the network importer and network building modules.
static void addProjectionOptions(OptionsCont &oc)
Adds projection options to the given container.
static MsgHandler * getGLDebugInstance()
Returns the instance to add GLdebug to.
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
void applyOptions(OptionsCont &oc)
Initialises the storage by applying given options.
A storage for options typed value containers)
static void fillOptions(bool forNetgen)
Inserts options used by the network converter.
void loadConfigOrNet(const std::string &file, bool isNet, bool useStartupOptions, bool newNet=false)
begins the loading of a netconvert configuration or a a network
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
void load(OptionsCont &oc)
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
static void initRandGlobal(std::mt19937 *which=0)
Reads the given random number options and initialises the random number generator in accordance.
void submitEndAndCleanup(GNENet *net, const std::string &guiSettingsFile="", const bool viewportFromRegistry=false)
Closes the loading process.
static void getOptions(const bool commandLineOnly=false)
Parses the command line arguments and loads the configuration.
static MsgHandler * getDebugInstance()
Returns the instance to add debug to.
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
@ MT_DEBUG
The message is an debug.
virtual void addRetriever(OutputDevice *retriever)
Adds a further retriever to the instance responsible for a certain msg type.
static void setDefaultOptions(OptionsCont &oc)
sets required options for proper functioning
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
static void computeFinal(bool lefthand=false)
compute the location attributes which will be used for output based on the loaded location data,...
void compute(OptionsCont &oc, const std::set< std::string > &explicitTurnarounds=std::set< std::string >(), bool mayAddOrRemove=true)
Performs the network building steps.
static void fillOptions(OptionsCont &oc)
clears and initializes the OptionsCont
static void insertRandOptions()
Initialises the given options container with random number options.
static bool checkOptions()
checks shared options and sets StdDefs
@ MT_GLDEBUG
The message is an debug.
bool myNewNet
if true, a new net is created
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
GNELoadThread(FXApp *app, MFXInterThreadEventClient *mw, FXSynchQue< GUIEvent * > &eq, FXEX::FXThreadEvent &ev)
constructor
OutputDevice * myDebugRetriever
void clear()
Removes all information from the container.
#define WRITE_MESSAGE(msg)
FXSynchQue< GUIEvent * > & myEventQue
event Queue
std::string myFile
the path to load the network from
virtual void removeRetriever(OutputDevice *retriever)
Removes the retriever from the handler.
static void enableDebugMessages(bool enable)
enable/disable debug messages
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.