19 #ifndef MSCalibrator_h 20 #define MSCalibrator_h 58 const std::string& aXMLFilename,
59 const std::string& outputFilename,
60 const SUMOTime freq,
const double length,
62 const std::string& vTypes,
63 bool addLaneMeanData =
true);
91 const std::string&
getID()
const {
178 AspiredState() : begin(-1), end(-1), q(-1.), v(-1.), vehicleParameter(0) {}
234 virtual void reset();
SUMOTime execute(SUMOTime currentTime)
Executes the command.
int nVehEntered
The number of vehicles that entered this lane within the sample interval.
Representation of a vehicle in the micro simulation.
VehicleRemover(MSLane *lane, int laneIndex, MSCalibrator *parent)
bool tryEmit(MSLane *lane, MSVehicle *vehicle)
static std::vector< SUMOVehicleParameter * > LeftoverVehicleParameters
virtual int passed() const
virtual void myEndElement(int element)
Called on the closing of a tag;.
Writes routes of vehicles passing a certain edge.
bool myDidSpeedAdaption
The information whether speed was adapted in the current interval.
Notification
Definition of a vehicle state.
bool myAmActive
whether the calibrator was active when last checking
bool myDidInit
The information whether init was called.
const std::string & getID() const
Returns the id.
SUMOTime myFrequency
The frequeny with which to check for calibration.
int myRemoved
The number of vehicles that were removed in the current interval.
Base (microsim) event class.
CalibratorCommand(MSCalibrator *cali)
double currentSpeed() const
measured speed in the current interval
int myClearedInJam
The number of vehicles that were removed when clearin a jam.
const MSEdge *const myEdge
the edge on which this calibrator lies
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Data structure for mean (aggregated) edge/lane values.
const std::string & getID() const
int totalWished() const
number of vehicles expected to pass this interval
A road/street connecting two junctions.
std::vector< AspiredState >::const_iterator myCurrentStateInterval
Iterator pointing to the current interval.
An abstract device that changes the state of the micro simulation.
Encapsulated SAX-Attributes.
void writeXMLDetectorProlog(OutputDevice &dev) const
Open the XML-output.
double myDefaultSpeed
The default (maximum) speed on the segment.
bool mySpeedIsDefault
The information whether the speed adaption has been reset.
Something on a lane to be noticed about vehicle movement.
bool scheduleRemoval(MSVehicle *veh)
try to schedule the givne vehicle for removal. return true if it isn't already scheduled ...
std::vector< AspiredState > myIntervals
List of adaptation intervals.
virtual void reset()
reset collected vehicle data
bool myHaveWarnedAboutClearingJam
The default (maximum) speed on the segment.
MSMeanData_Net myMeanDataParent
dummy parent to retrieve vType filter
MSLane *const myLane
the lane on which this calibrator lies (0 if the whole edge is covered at once)
bool invalidJam(int laneIndex) const
std::vector< MSMeanData_Net::MSLaneMeanDataValues * > myLaneMeanData
data collector for the calibrator
static std::vector< MSMoveReminder * > LeftoverReminders
Structure representing possible vehicle parameter.
Representation of a vehicle or person.
const double myPos
the position on the edge where this calibrator lies
SUMOVehicleParameter * vehicleParameter
const MSRouteProbe *const myProbe
the route probe to retrieve routes from
static void cleanup()
cleanup remaining data structures
OutputDevice * myOutput
The device for xml statistics.
virtual void updateMeanData()
aggregate lane values
Calibrates the flow on a segment to a specified one.
virtual SUMOTime execute(SUMOTime currentTime)
Static storage of an output device and its base (abstract) implementation.
Network state mean data collector for edges/lanes.
MSCalibrator(const std::string &id, const MSEdge *const edge, MSLane *lane, const double pos, const std::string &aXMLFilename, const std::string &outputFilename, const SUMOTime freq, const double length, const MSRouteProbe *probe, const std::string &vTypes, bool addLaneMeanData=true)
bool removePending()
remove any vehicles which are scheduled for removal. return true if removals took place ...
MSMeanData_Net::MSLaneMeanDataValues myEdgeMeanData
accumlated data for the whole edge
bool isCurrentStateActive(SUMOTime time)
std::vector< VehicleRemover * > myVehicleRemovers
MSCalibrator * myCalibrator
int remainingVehicleCapacity(int laneIndex) const
const std::string & getID() const
Returns the name of the vehicle.
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Write the generated output to the given device.
Representation of a lane in the micro simulation.
std::set< std::string > myToRemove
set of vehicle ids to remove
Parser and container for routes during their loading.
int myInserted
The number of vehicles that were inserted in the current interval.
Base of value-generating classes (detectors)
double currentFlow() const
flow in the current interval in veh/h