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