21 #ifndef MSCalibrator_h 22 #define MSCalibrator_h 63 const std::string& aXMLFilename,
64 const std::string& outputFilename,
65 const SUMOTime freq,
const double length,
67 bool addLaneMeanData =
true);
159 AspiredState() : begin(-1), end(-1), q(-1.), v(-1.), vehicleParameter(0) {}
215 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.
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.
Representation of a vehicle.
Encapsulated SAX-Attributes.
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.
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.
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.
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
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, bool addLaneMeanData=true)
const std::string & getID() const
Returns the name of the vehicle.
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.
double currentFlow() const
flow in the current interval in veh/h