70 std::string file = oc.
getString(
"net-file");
72 throw ProcessError(
"Missing definition of network to load!");
75 throw ProcessError(
"The network file '" + file +
"' could not be accessed.");
94 main(
int argc,
char* argv[]) {
98 "Generates routes of persons throughout a day for the microscopic road traffic simulation SUMO.");
126 std::string statFile = oc.
getString(
"stat-file");
132 actiGen.importInfoCity();
133 actiGen.makeActivityTrips(duration.getDay(), begin.getTime(), end.getTime());
140 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
146 }
catch (
const std::exception& e) {
147 if (std::string(e.what()) != std::string(
"")) {
159 std::cout <<
"Success." << std::endl;
int getEdgeNumber() const
Returns the total number of edges the network contains including internal edges.
static void init()
Initialises the xml-subsystem.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
std::set< std::string > deprecatedVehicleClassesSeen
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
static void getOptions(const bool commandLineOnly=false)
Parses the command line arguments and loads the configuration.
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.
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)
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.
Central object handling City, Activities and Trips.
#define PROGRESS_FAILED_MESSAGE()
void setFileName(const std::string &name)
Sets the current file name.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool processMetaOptions(bool missingOptions)
Checks for help and configuration output, returns whether we should exit.
#define PROGRESS_BEGIN_MESSAGE(msg)
void loadNet(RONet &toFill, ROAbstractEdgeBuilder &eb)
Loads the network.
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)
The handler that parses a SUMO-network for its usage in a router.
static void initRandGlobal(std::mt19937 *which=0)
Reads the given random number options and initialises the random number generator in accordance...
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()
#define WRITE_MESSAGE(msg)
static void initOutputOptions()
static void fillOptions()
Inserts options used by ActivityGen into the OptionsCont singleton.
int main(int argc, char *argv[])
void setApplicationName(const std::string &appName, const std::string &fullName)
Sets the application name.