61 std::string file = oc.
getString(
"net-file");
66 throw ProcessError(
TLF(
"The network file '%' could not be accessed.", file));
85main(
int argc,
char* argv[]) {
88 TL(
"Generates trips of persons throughout a day for the microscopic, multi-modal traffic simulation SUMO."));
117 std::string statFile = oc.
getString(
"stat-file");
131 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
137 }
catch (
const std::exception& e) {
138 if (std::string(e.what()) != std::string(
"")) {
150 std::cout <<
"Success." << std::endl;
#define WRITE_WARNINGF(...)
#define WRITE_MESSAGEF(...)
#define WRITE_MESSAGE(msg)
#define PROGRESS_DONE_MESSAGE()
#define PROGRESS_FAILED_MESSAGE()
#define PROGRESS_BEGIN_MESSAGE(msg)
std::set< std::string > deprecatedVehicleClassesSeen
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
int main(int argc, char *argv[])
void loadNet(RONet &toFill, ROAbstractEdgeBuilder &eb)
Loads the network.
Central object handling City, Activities and Trips.
void importInfoCity()
build the internal city
void makeActivityTrips(int days=1, int beginTime=0, int endTime=0)
build activities and trips of the population and generate routes
static void fillOptions()
Inserts options used by ActivityGen into the OptionsCont singleton.
int getTime()
: returns the number of seconds from the beginning of the first day of simulation this includes
static bool isReadable(std::string path)
Checks whether the given file is readable.
void setFileName(const std::string &name)
Sets the current file name.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
virtual void inform(std::string msg, bool addType=true)
adds a new error to the list
A storage for options typed value containers)
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
void setApplicationName(const std::string &appName, const std::string &fullName)
Sets the application name.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static bool createDeviceByOption(const std::string &optionName, const std::string &rootElement="", const std::string &schemaFile="", const int maximumDepth=2)
Creates the device using the output definition stored in the named option.
void addCopyrightNotice(const std::string ©rightLine)
Adds a copyright notice to the help output.
void setApplicationDescription(const std::string &appDesc)
Sets the application description.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
bool processMetaOptions(bool missingOptions)
Checks for help and configuration output, returns whether we should exit.
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 OutputDevice & getDevice(const std::string &name, bool usePrefix=true)
Returns the described OutputDevice.
Interface for building instances of router-edges.
The handler that parses a SUMO-network for its usage in a router.
The router's network representation.
int getEdgeNumber() const
Returns the total number of edges the network contains including internal edges.
static void close()
Closes all of an applications subsystems.
static bool checkOptions(OptionsCont &oc)
checks shared options and sets StdDefs
static void initRandGlobal(SumoRNG *which=nullptr)
Reads the given random number options and initialises the random number generator in accordance.
static void initOutputOptions()
init message output (console and log files) according to the options
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme, const std::string &routeValidationScheme)
Enables or disables validation.
static void init()
Initialises the xml-subsystem.
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false, const bool isRoute=false, const bool isExternal=false, const bool catchExceptions=true)
Runs the given handler on the given file; returns if everything's ok.