46 #ifdef CHECK_MEMORY_LEAKS
48 #endif // CHECK_MEMORY_LEAKS
97 std::vector<MSInductLoop::VehicleData>
109 myDetector(detector), myPosition(pos) {
136 ret->
mkItem(
"lane",
false, myDetector.getLane()->getID());
138 ret->
mkItem(
"passed vehicles [#]",
true,
140 ret->
mkItem(
"speed [m/s]",
true,
142 ret->
mkItem(
"occupancy [%]",
true,
144 ret->
mkItem(
"vehicle length [m]",
true,
146 ret->
mkItem(
"empty time [s]",
true,
156 glPushName(getGlID());
162 glTranslated(0, 0, getType());
163 glTranslated(myFGPosition.x(), myFGPosition.y(), 0);
164 glRotated(myFGRotation, 0, 0, 1);
167 glVertex2d(0 - 1.0, 2);
168 glVertex2d(-1.0, -2);
172 glTranslated(0, 0, .01);
174 glVertex2d(0, 2 - .1);
175 glVertex2d(0, -2 + .1);
181 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
183 glVertex2f(0 - 1.0, 2);
184 glVertex2f(-1.0, -2);
188 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
193 glRotated(90, 0, 0, -1);
201 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
void leaveDetectorByMove(SUMOVehicle &veh, SUMOReal leaveTimestep)
Processes a vehicle that leaves the detector.
MyWrapper(GUIInductLoop &detector, SUMOReal pos)
Constructor.
Boundary myBoundary
The detector's boundary.
A MSInductLoop-visualiser.
void reset()
Resets all generated values to allow computation of next interval.
virtual void leaveDetectorByLaneChange(SUMOVehicle &veh)
Removes a vehicle from the detector's map myVehiclesOnDet.
GUIVisualizationTextSettings addName
std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
const Position geometryPositionAtOffset(SUMOReal offset) const
Stores the information about how to visualize structures.
virtual void reset()
Resets all generated values to allow computation of next interval.
virtual std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
Position myFGPosition
The position in full-geometry mode.
SUMOReal getCurrentOccupancy() const
Returns the current occupancy.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
SUMOReal x() const
Returns the x-position.
const SUMOReal myPosition
Detector's position on lane [m].
A class that stores a 2D geometrical boundary.
const MSLane * getLane() const
Returns the lane the reminder works on.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
MFXMutex myLock
Mutex preventing parallel read/write access to internal MSInductLoop state.
void leaveDetectorByLaneChange(SUMOVehicle &veh)
Removes a vehicle from the detector's map myVehiclesOnDet.
The gui-version of the MSInductLoop.
float addExaggeration
The additional structures exaggeration (upscale)
Representation of a vehicle.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
virtual void enterDetectorByMove(SUMOVehicle &veh, SUMOReal entryTimestep)
Introduces a vehicle to the detector's map myVehiclesOnDet.
GUIInductLoop(const std::string &id, MSLane *const lane, SUMOReal position, bool splitByType)
Constructor.
void enterDetectorByMove(SUMOVehicle &veh, SUMOReal entryTimestep)
Introduces a vehicle to the detector's map myVehiclesOnDet.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
SUMOReal getCurrentSpeed() const
Returns the speed of the vehicle on the detector.
unsigned int getCurrentPassedNumber() const
Returns the number of vehicles that have passed the detector.
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
SUMOReal myFGRotation
The rotation in full-geometry mode.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
SUMOReal y() const
Returns the y-position.
~GUIInductLoop()
Destructor.
const PositionVector & getShape() const
Returns this lane's shape.
SUMOReal getTimestepsSinceLastDetection() const
Returns the time since the last vehicle left the detector.
GUIInductLoop & getLoop()
Returns the detector itself.
SUMOReal getCurrentLength() const
Returns the length of the vehicle on the detector.
virtual void leaveDetectorByMove(SUMOVehicle &veh, SUMOReal leaveTimestep)
Processes a vehicle that leaves the detector.
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
void closeBuilding()
Closes the building of the table.
Representation of a lane in the micro simulation.
A window containing a gl-object's parameter.
An unextended detector measuring at a fixed position on a fixed lane.