22 #ifndef MSCalibrator_h 23 #define MSCalibrator_h 62 const std::string& aXMLFilename,
63 const std::string& outputFilename,
65 const MSRouteProbe* probe,
const bool addLaneMeanData =
true);
143 AspiredState() : begin(-1), end(-1), q(-1.), v(-1.), vehicleParameter(0) {}
193 virtual void reset();
MSCalibrator(const std::string &id, const MSEdge *const edge, const SUMOReal pos, const std::string &aXMLFilename, const std::string &outputFilename, const SUMOTime freq, const SUMOReal length, const MSRouteProbe *probe, const bool addLaneMeanData=true)
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 void myEndElement(int element)
Called on the closing of a tag;.
Writes routes of vehicles passing a certain edge.
unsigned int myClearedInJam
The number of vehicles that were removed when clearin a jam.
bool myDidSpeedAdaption
The information whether speed was adapted in the current interval.
virtual bool notifyEnter(SUMOVehicle &veh, Notification reason)
Checks whether the reminder is activated by a vehicle entering the lane.
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 SUMOReal myPos
the position on the edge where this calibrator lies
SUMOTime myFrequency
The frequeny with which to check for calibration.
Base (microsim) event class.
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 remainingVehicleCapacity(int laneIndex) const
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
unsigned int myInserted
The number of vehicles that were inserted in the current interval.
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.
bool invalidJam(int laneIndex) const
unsigned nVehEntered
The number of vehicles that entered this lane within the sample interval.
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.
std::vector< MSMeanData_Net::MSLaneMeanDataValues * > myLaneMeanData
data collector for the calibrator
static std::vector< MSMoveReminder * > LeftoverReminders
Structure representing possible vehicle parameter.
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
virtual int passed() const
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 ...
int totalWished() const
number of vehicles expected to pass this interval
MSMeanData_Net::MSLaneMeanDataValues myEdgeMeanData
accumlated data for the whole edge
bool isCurrentStateActive(SUMOTime time)
std::vector< VehicleRemover * > myVehicleRemovers
Representation of a lane in the micro simulation.
unsigned int myRemoved
The number of vehicles that were removed in the current interval.
std::set< std::string > myToRemove
set of vehicle ids to remove
Parser and container for routes during their loading.
SUMOReal myDefaultSpeed
The default (maximum) speed on the segment.
const std::string & getID() const
Returns the name of the vehicle.