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) {
200 oc.
addCallExample(
"-c <CONFIGURATION>",
"edit net with options read from file");
228 oc.
addDescription(
"additional-files",
"Netedit",
"Load additional and shapes descriptions from FILE(s)");
231 oc.
addDescription(
"additionals-output",
"Netedit",
"file in which additionals must be saved");
235 oc.
addDescription(
"route-files",
"Netedit",
"Load demand elements descriptions from FILE(s)");
238 oc.
addDescription(
"demandelements-output",
"Netedit",
"file in which demand elements must be saved");
242 oc.
addDescription(
"data-files",
"Netedit",
"Load data elements descriptions from FILE(s)");
245 oc.
addDescription(
"dataelements-output",
"Netedit",
"file in which data elements must be saved");
248 oc.
addDescription(
"TLSPrograms-output",
"Netedit",
"file in which TLS Programs must be saved");
251 oc.
addDescription(
"edgeTypes-output",
"Netedit",
"file in which edgeTypes must be saved");
256 oc.
addDescription(
"node-prefix",
"Netedit",
"prefix for node naming");
259 oc.
addDescription(
"edge-prefix",
"Netedit",
"prefix for edge naming");
262 oc.
addDescription(
"edge-infix",
"Netedit",
"enable edge-infix (<fromNodeID><infix><toNodeID>)");
267 oc.
addDescription(
"busStop-prefix",
"Netedit",
"prefix for busStop naming");
270 oc.
addDescription(
"trainStop-prefix",
"Netedit",
"prefix for trainStop naming");
273 oc.
addDescription(
"containerStop-prefix",
"Netedit",
"prefix for containerStop naming");
276 oc.
addDescription(
"chargingStation-prefix",
"Netedit",
"prefix for chargingStation naming");
279 oc.
addDescription(
"parkingArea-prefix",
"Netedit",
"prefix for parkingArea naming");
282 oc.
addDescription(
"e1Detector-prefix",
"Netedit",
"prefix for e1Detector naming");
285 oc.
addDescription(
"e2Detector-prefix",
"Netedit",
"prefix for e2Detector naming");
288 oc.
addDescription(
"e3Detector-prefix",
"Netedit",
"prefix for e3Detector naming");
291 oc.
addDescription(
"e1InstantDetector-prefix",
"Netedit",
"prefix for e1InstantDetector naming");
294 oc.
addDescription(
"rerouter-prefix",
"Netedit",
"prefix for rerouter naming");
297 oc.
addDescription(
"calibrator-prefix",
"Netedit",
"prefix for calibrator naming");
300 oc.
addDescription(
"routeProbe-prefix",
"Netedit",
"prefix for routeProbe naming");
303 oc.
addDescription(
"vss-prefix",
"Netedit",
"prefix for vss naming");
306 oc.
addDescription(
"polygon-prefix",
"Netedit",
"prefix for polygon naming");
309 oc.
addDescription(
"poi-prefix",
"Netedit",
"prefix for poi naming");
314 oc.
addDescription(
"route-prefix",
"Netedit",
"prefix for route naming");
317 oc.
addDescription(
"vType-prefix",
"Netedit",
"prefix for vType naming");
320 oc.
addDescription(
"vehicle-prefix",
"Netedit",
"prefix for vehicle naming");
323 oc.
addDescription(
"trip-prefix",
"Netedit",
"prefix for trip naming");
326 oc.
addDescription(
"flow-prefix",
"Netedit",
"prefix for flow naming");
329 oc.
addDescription(
"person-prefix",
"Netedit",
"prefix for person naming");
332 oc.
addDescription(
"container-prefix",
"Netedit",
"prefix for container naming");
337 oc.
addDescription(
"disable-laneIcons",
"Visualisation",
"Disable icons of special lanes");
343 oc.
addDescription(
"gui-settings-file",
"Visualisation",
"Load visualisation settings from FILE");
346 oc.
addDescription(
"registry-viewport",
"Visualisation",
"Load current viewport from registry");
349 oc.
addDescription(
"window-size",
"Visualisation",
"Create initial window with the given x,y size");
352 oc.
addDescription(
"window-pos",
"Visualisation",
"Create initial window at the given x,y position");
357 oc.
addDescription(
"gui-testing",
"Visualisation",
"Enable overlay for screen recognition");
360 oc.
addDescription(
"gui-testing-debug",
"Visualisation",
"Enable output messages during GUI-Testing");
363 oc.
addDescription(
"gui-testing-debug-gl",
"Visualisation",
"Enable output messages during GUI-Testing specific of gl functions");
366 oc.
addDescription(
"gui-testing.setting-output",
"Visualisation",
"Save gui settings in the given settings-output file");
370 oc.
addDescription(
"begin",
"Time",
"Defines the begin time in seconds; The simulation starts at this time");
373 oc.
addDescription(
"end",
"Time",
"Defines the end time in seconds; The simulation ends at this time");
376 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.");
388 oc.
set(
"offset.disable-normalization",
"true");
389 oc.
set(
"no-turnarounds",
"true");
414 if (!oc.
isSet(
"output-file")) {
419 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
432 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 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
void submitEndAndCleanup(GNENet *net, const bool newNet=false, const std::string &guiSettingsFile="", const bool viewportFromRegistry=false)
Closes the loading process.
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_GLDEBUG
The message is GL debug output.
@ MT_DEBUG
The message is debug output.
@ MT_MESSAGE
The message is only something to show.
@ MT_ERROR
The message is an error.
@ MT_WARNING
The message is a warning.
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 insertRandOptions()
Initialises the given options container with random number options.
static void initRandGlobal(SumoRNG *which=nullptr)
Reads the given random number options and initialises the random number generator in accordance.
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.