 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
58 const std::string& basePath) {
62 if (type ==
"" || !ok) {
66 KnownActions::iterator i =
myActions.find(type);
71 switch ((*i).second) {
90 const std::string& basePath) {
95 if (dest ==
"" || !ok) {
96 throw InvalidArgument(
"Incomplete description of an 'SaveTLSState'-action occurred.");
100 for (std::vector<std::string>::const_iterator tls = ids.begin(); tls != ids.end(); ++tls) {
107 throw InvalidArgument(
"The traffic light logic to save (" + source +
") is not known.");
118 const std::string& basePath) {
123 if (dest ==
"" || !ok) {
124 throw InvalidArgument(
"Incomplete description of an 'SaveTLSSwitchTimes'-action occurred.");
128 for (std::vector<std::string>::const_iterator tls = ids.begin(); tls != ids.end(); ++tls) {
135 throw InvalidArgument(
"The traffic light logic to save (" + source +
") is not known.");
146 const std::string& basePath) {
151 if (dest ==
"" || !ok) {
152 throw InvalidArgument(
"Incomplete description of an 'SaveTLSSwitchStates'-action occurred.");
156 for (std::vector<std::string>::const_iterator tls = ids.begin(); tls != ids.end(); ++tls) {
163 throw InvalidArgument(
"The traffic light logic to save (" + source +
") is not known.");
174 const std::string& basePath) {
179 if (dest ==
"" || !ok) {
180 throw InvalidArgument(
"Incomplete description of an 'SaveTLSProgram'-action occurred.");
184 for (std::vector<std::string>::const_iterator tls = ids.begin(); tls != ids.end(); ++tls) {
191 throw InvalidArgument(
"The traffic light logic to save (" + source +
") is not known.");
std::vector< std::string > getAllTLIds() const
NLDiscreteEventBuilder(MSNet &net)
Constructor.
The simulated network and simulation perfomer.
void buildSaveTLSwitchesCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the switch times of links into a file.
@ EV_SAVETLSPROGRAM
"SaveTLSProgram"
KnownActions myActions
Build actions that shall be executed during the simulation.
Writes the switch times of a tls into a file when the tls switches.
static std::string checkForRelativity(const std::string &filename, const std::string &basePath)
Returns the path from a configuration so that it is accessable from the current working directory.
@ EV_SAVETLSWITCHES
"SaveTLSSwitchTimes"
bool knows(const std::string &id) const
Returns the information whether the named tls is stored.
~NLDiscreteEventBuilder()
Destructor.
TLSLogicVariants & get(const std::string &id) const
Returns the variants of a named tls.
@ EV_SAVETLSTATE
"SaveTLSStates"
void addAction(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action and saves it for further use.
void buildSaveTLSwitchStatesCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the switch times and states of tls into a file.
void buildSaveTLSProgramCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the tls states as a loadable program into a file.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
void buildSaveTLStateCommand(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action which saves the state of a certain tls into a file.
Writes the switch times of a tls into a file when the tls switches.
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
Writes the state of the tls to a file (in each second)
Storage for all programs of a single tls.
Encapsulated SAX-Attributes.
Writes information about the green durations of a tls.
@ EV_SAVETLSWITCHSTATES
"SaveTLSSwitchStates"