62 #ifdef CHECK_MEMORY_LEAKS 64 #endif // CHECK_MEMORY_LEAKS 75 std::string file = oc.
getString(
"net-file");
77 throw ProcessError(
"Missing definition of network to load!");
80 throw ProcessError(
"The network file '" + file +
"' could not be accessed.");
99 main(
int argc,
char* argv[]) {
103 "Generates routes of persons throughout a day for the microscopic road traffic simulation SUMO.");
131 std::string statFile = oc.
getString(
"stat-file");
136 if (oc.
isSet(
"duration-d")) {
139 if (oc.
isSet(
"begin")) {
142 if (oc.
isSet(
"end")) {
154 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
160 }
catch (
const std::exception& e) {
161 if (std::string(e.what()) != std::string(
"")) {
173 std::cout <<
"Success." << std::endl;
static void init()
Initialises the xml-subsystem.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
std::set< std::string > deprecatedVehicleClassesSeen
void addCopyrightNotice(const std::string ©rightLine)
Adds a copyright notice to the help output.
static bool isReadable(std::string path)
Checks whether the given file is readable.
size_t getEdgeNo() const
Returns the total number of edges the network contains including internal edges.
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme)
Enables or disables validation.
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)
void makeActivityTrips(int days=1, int beginTime=0, int endTime=0)
build activities and trips of the population and generate routes
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
static void close()
Closes all of an applications subsystems.
Interface for building instances of router-edges.
#define WRITE_WARNING(msg)
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
static OptionsCont & getOptions()
Retrieves the options.
static void initRandGlobal(MTRand *which=0)
Reads the given random number options and initialises the random number generator in accordance...
Central object handling City, Activities and Trips.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
#define PROGRESS_FAILED_MESSAGE()
void setFileName(const std::string &name)
Sets the current file name.
bool processMetaOptions(bool missingOptions)
Checks for help and configuration output, returns whether we should exit.
#define PROGRESS_BEGIN_MESSAGE(msg)
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
void loadNet(RONet &toFill, ROAbstractEdgeBuilder &eb)
Loads the network.
void addSeconds(int sec)
addition of seconds to the current moment
static void getOptions()
Parses the command line arguments and loads the configuration.
The router's network representation.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
void inform(std::string msg, bool addType=true)
adds a new error to the list
A storage for options typed value containers)
void importInfoCity()
build the internal city
The handler that parses a SUMO-network for its usage in a router.
int getTime()
: returns the number of seconds from the beginning of the first day of simulation this includes ...
static bool createDeviceByOption(const std::string &optionName, const std::string &rootElement="", const std::string &schemaFile="")
Creates the device using the output definition stored in the named option.
#define PROGRESS_DONE_MESSAGE()
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
#define WRITE_MESSAGE(msg)
static void initOutputOptions()
static void fillOptions()
Inserts options used by ActivityGen into the OptionsCont singleton.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
int main(int argc, char *argv[])
void setApplicationName(const std::string &appName, const std::string &fullName)
Sets the application name.