52 return "RailSignalConstraint";
65 static std::string
getVehID(
const std::string& tripID);
106 bool hasPassed(
const std::string& tripId,
int limit)
const;
115 void loadState(
int index,
const std::vector<std::string>& tripIDs);
Representation of a lane in the micro simulation.
Something on a lane to be noticed about vehicle movement.
Notification
Definition of a vehicle state.
bool hasPassed(const std::string &tripId, int limit) const
void raiseLimit(int limit)
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
tracks vehicles that passed this link (entered the next lane)
void loadState(int index, const std::vector< std::string > &tripIDs)
loads the current passed states into the given stream
PassedTracker(MSLane *lane)
void clearState()
Clear all passed states before quick-loading state.
int myLastIndex
index of the last passed object
std::vector< std::string > myPassed
passed tripIds
void saveState(OutputDevice &out)
Saves the current passed states into the given stream.
MSRailSignalConstraint_Predecessor & operator=(const MSRailSignalConstraint_Predecessor &s)=delete
invalidated assignment operator
bool cleared() const
whether the constraint has been met
static void loadState(const SUMOSAXAttributes &attrs)
loads the constraint state from the given attrs
static void saveState(OutputDevice &out)
Saves the current constraint states into the given stream.
const std::string myTripId
id of the predecessor that must already have passed
std::string getDescription() const
static void clearState()
Clear all constraint states before quick-loading state.
static std::map< const MSLane *, PassedTracker * > myTrackerLookup
static void cleanup()
clean up state
std::vector< PassedTracker * > myTrackers
the tracker object for this constraint
const int myLimit
the number of passed vehicles within which tripId must have occured
~MSRailSignalConstraint_Predecessor()
Destructor.
MSRailSignalConstraint_Predecessor(const MSRailSignal *signal, const std::string &tripId, int limit)
Constructor.
A base class for constraints.
virtual std::string getDescription() const
static void saveState(OutputDevice &out)
Saves the current constraint states into the given stream.
static std::string getVehID(const std::string &tripID)
static void clearState()
Clear all constraint states before quick-loading state.
MSRailSignalConstraint()
Constructor.
virtual bool cleared() const =0
whether the constraint has been met
static void cleanup()
clean up state
virtual ~MSRailSignalConstraint()
Destructor.
Static storage of an output device and its base (abstract) implementation.
Encapsulated SAX-Attributes.
Representation of a vehicle, person, or container.