55 const std::string& aXMLFilename,
56 const std::string& outputFilename,
57 const SUMOTime freq,
const double length,
59 const double invalidJamThreshold,
60 const std::string& vTypes,
62 const bool addLaneMeanData);
94 static const std::map<std::string, MSCalibrator*>&
getInstances() {
279 virtual void reset();
Base (microsim) event class.
Changes the speed allowed on a set of lanes (gui version)
CalibratorCommand(MSCalibrator *cali)
SUMOTime shiftTime(SUMOTime currentTime, SUMOTime execTime, SUMOTime newTime)
Reschedule or deschedule the command when quick-loading state.
SUMOTime execute(SUMOTime currentTime)
Executes the command.
MSCalibrator * myCalibrator
const bool myUndoCalibration
VehicleRemover(MSLane *const lane, MSCalibrator *const parent, const bool undo=false)
virtual bool notifyLeave(SUMOTrafficObject &veh, double lastPos, Notification reason, const MSLane *enteredLane=nullptr)
Checks whether any calibrations need to be undone.
virtual bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=nullptr)
Checks whether the reminder is activated by a vehicle entering the lane.
Calibrates the flow on a segment to a specified one.
static std::map< std::string, MSCalibrator * > myInstances
bool tryEmit(MSLane *lane, MSVehicle *vehicle)
OutputDevice * myOutput
The device for xml statistics.
double myInvalidJamThreshold
relative speed threshold for detecting and clearing invalid jam
double currentSpeed() const
measured speed in the current interval
MSMeanData_Net myMeanDataParent
dummy parent to retrieve vType filter
MSEdge *const myEdge
the edge on which this calibrator lies
static void cleanup()
cleanup remaining data structures
bool mySpeedIsDefault
The information whether the speed adaption has been reset.
virtual void updateMeanData()
aggregate lane values
const MSRouteProbe * getRouteProbe() const
int myRemoved
The number of vehicles that were removed in the current interval.
virtual int passed() const
const MSRouteProbe *const myProbe
the route probe to retrieve routes from
bool myAmActive
whether the calibrator was active when last checking
std::set< std::string > myToRemove
set of vehicle ids to remove
const MSLane * getLane() const
static std::vector< MSMoveReminder * > myLeftoverReminders
void setFlow(SUMOTime begin, SUMOTime end, double vehsPerHour, double speed, SUMOVehicleParameter vehicleParameter)
bool myHaveInvalidJam
whether the calibrator has registered an invalid jam in the last execution step
std::vector< MSMeanData_Net::MSLaneMeanDataValues * > myLaneMeanData
data collector for the calibrator
std::vector< AspiredState >::const_iterator myCurrentStateInterval
Iterator pointing to the current interval.
double currentFlow() const
flow in the current interval in veh/h
static std::vector< SUMOVehicleParameter * > myLeftoverVehicleParameters
bool removePending()
remove any vehicles which are scheduled for removal. return true if removals took place
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
int myInserted
The number of vehicles that were inserted in the current interval.
bool myHaveWarnedAboutClearingJam
The default (maximum) speed on the segment.
std::vector< AspiredState > myIntervals
List of adaptation intervals.
const double myPos
the position on the edge where this calibrator lies
virtual void myEndElement(int element)
Called on the closing of a tag;.
int totalWished() const
number of vehicles expected to pass this interval
std::vector< VehicleRemover * > myVehicleRemovers
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Write the generated output to the given device.
std::string getNewVehicleID()
determine id of new vehicle from calibrator state
MSMeanData_Net::MSLaneMeanDataValues myEdgeMeanData
accumlated data for the whole edge
bool invalidJam(int laneIndex) const
int myClearedInJam
The number of vehicles that were removed when clearin a jam.
void writeXMLDetectorProlog(OutputDevice &dev) const
Open the XML-output.
const MSEdge * getEdge() const
double myDefaultSpeed
The default (maximum) speed on the segment.
virtual SUMOTime execute(SUMOTime currentTime)
MSLane *const myLane
the lane on which this calibrator lies (nullptr if the whole edge is covered at once)
bool scheduleRemoval(SUMOTrafficObject *veh)
try to schedule the given vehicle for removal. return true if it isn't already scheduled
bool myDidInit
The information whether init was called.
bool myAmLocal
whether the calibrator needs to undo the calibration after the edge / junction has been left
AspiredState getCurrentStateInterval() const
bool isCurrentStateActive(SUMOTime time)
MSJunction *const myNode
the junction on which this calibrator lies (nullptr if is edge or lane specific)
static const std::map< std::string, MSCalibrator * > & getInstances()
return all calibrator instances
SUMOTime myFrequency
The frequeny with which to check for calibration.
virtual void reset()
reset collected vehicle data
int remainingVehicleCapacity(int laneIndex) const
bool myDidSpeedAdaption
The information whether speed was adapted in the current interval.
Base of value-generating classes (detectors)
A road/street connecting two junctions.
The base class for an intersection.
Representation of a lane in the micro simulation.
Data structure for mean (aggregated) edge/lane values.
int nVehEntered
The number of vehicles that entered this lane within the sample interval.
Network state mean data collector for edges/lanes.
Something on a lane to be noticed about vehicle movement.
Notification
Definition of a vehicle state.
Parser and container for routes during their loading.
Writes routes of vehicles passing a certain edge.
Representation of a vehicle in the micro simulation.
const std::string & getID() const
Returns the id.
Static storage of an output device and its base (abstract) implementation.
Encapsulated SAX-Attributes.
Representation of a vehicle, person, or container.
Structure representing possible vehicle parameter.
SUMOVehicleParameter * vehicleParameter