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