![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSRailSignalConstraint.h>
Data Structures | |
class | PassedTracker |
Public Member Functions | |
bool | cleared () const |
whether the constraint has been met More... | |
std::string | getDescription () const |
MSRailSignalConstraint_Predecessor (const MSRailSignal *signal, const std::string &tripId, int limit) | |
Constructor. More... | |
~MSRailSignalConstraint_Predecessor () | |
Destructor. More... | |
Static Public Member Functions | |
static void | cleanup () |
clean up state More... | |
static void | clearState () |
Clear all constraint states before quick-loading state. More... | |
static void | loadState (const SUMOSAXAttributes &attrs) |
loads the constraint state from the given attrs More... | |
static void | saveState (OutputDevice &out) |
Saves the current constraint states into the given stream. More... | |
Data Fields | |
const int | myLimit |
the number of passed vehicles within which tripId must have occured More... | |
std::vector< PassedTracker * > | myTrackers |
the tracker object for this constraint More... | |
const std::string | myTripId |
id of the predecessor that must already have passed More... | |
Static Public Attributes | |
static std::map< const MSLane *, PassedTracker * > | myTrackerLookup |
Static Protected Member Functions | |
static std::string | getVehID (const std::string &tripID) |
Private Member Functions | |
MSRailSignalConstraint_Predecessor & | operator= (const MSRailSignalConstraint_Predecessor &s)=delete |
invalidated assignment operator More... | |
Definition at line 69 of file MSRailSignalConstraint.h.
MSRailSignalConstraint_Predecessor::MSRailSignalConstraint_Predecessor | ( | const MSRailSignal * | signal, |
const std::string & | tripId, | ||
int | limit | ||
) |
Constructor.
Definition at line 74 of file MSRailSignalConstraint.cpp.
References MSTrafficLightLogic::getLinks(), myTrackerLookup, myTrackers, and MSRailSignalConstraint_Predecessor::PassedTracker::raiseLimit().
|
inline |
Destructor.
Definition at line 76 of file MSRailSignalConstraint.h.
|
static |
clean up state
Definition at line 95 of file MSRailSignalConstraint.cpp.
References myTrackerLookup.
Referenced by MSRailSignalConstraint::cleanup().
|
virtual |
whether the constraint has been met
Implements MSRailSignalConstraint.
Definition at line 137 of file MSRailSignalConstraint.cpp.
References myLimit, myTrackers, and myTripId.
|
static |
Clear all constraint states before quick-loading state.
Definition at line 129 of file MSRailSignalConstraint.cpp.
References myTrackerLookup.
Referenced by MSRailSignalConstraint::clearState().
|
virtual |
Reimplemented from MSRailSignalConstraint.
Definition at line 147 of file MSRailSignalConstraint.cpp.
References MSRailSignalConstraint::getVehID(), myTrackers, myTripId, and toString().
|
staticprotectedinherited |
Definition at line 60 of file MSRailSignalConstraint.cpp.
References Named::getID(), MSNet::getInstance(), SUMOTrafficObject::getParameter(), Parameterised::getParameter(), MSNet::getVehicleControl(), MSVehicleControl::loadedVehBegin(), and MSVehicleControl::loadedVehEnd().
Referenced by getDescription().
|
static |
loads the constraint state from the given attrs
Definition at line 110 of file MSRailSignalConstraint.cpp.
References MSLane::dictionary(), SUMOSAXAttributes::get(), SUMOSAXAttributes::getString(), SUMOSAXAttributes::getStringVector(), MSRailSignalConstraint_Predecessor::PassedTracker::loadState(), myTrackerLookup, SUMO_ATTR_INDEX, SUMO_ATTR_LANE, SUMO_ATTR_STATE, and WRITE_WARNINGF.
Referenced by MSStateHandler::myStartElement().
|
privatedelete |
invalidated assignment operator
|
static |
Saves the current constraint states into the given stream.
Definition at line 103 of file MSRailSignalConstraint.cpp.
References myTrackerLookup.
Referenced by MSRailSignalConstraint::saveState().
const int MSRailSignalConstraint_Predecessor::myLimit |
the number of passed vehicles within which tripId must have occured
Definition at line 131 of file MSRailSignalConstraint.h.
Referenced by cleared().
|
static |
Definition at line 134 of file MSRailSignalConstraint.h.
Referenced by cleanup(), clearState(), loadState(), MSRailSignalConstraint_Predecessor(), and saveState().
std::vector<PassedTracker*> MSRailSignalConstraint_Predecessor::myTrackers |
the tracker object for this constraint
Definition at line 125 of file MSRailSignalConstraint.h.
Referenced by cleared(), getDescription(), and MSRailSignalConstraint_Predecessor().
const std::string MSRailSignalConstraint_Predecessor::myTripId |
id of the predecessor that must already have passed
Definition at line 128 of file MSRailSignalConstraint.h.
Referenced by cleared(), and getDescription().