44 #ifdef CHECK_MEMORY_LEAKS 46 #endif // CHECK_MEMORY_LEAKS 95 std::vector<MSInductLoop::VehicleData>
136 ret->
mkItem(
"passed vehicles [#]",
true,
138 ret->
mkItem(
"speed [m/s]",
true,
140 ret->
mkItem(
"occupancy [%]",
true,
142 ret->
mkItem(
"vehicle length [m]",
true,
144 ret->
mkItem(
"empty time [s]",
true,
164 glScaled(exaggeration, exaggeration, 1);
166 glVertex2d(0 - 1.0, 2);
167 glVertex2d(-1.0, -2);
171 glTranslated(0, 0, .01);
173 glVertex2d(0, 2 - .1);
174 glVertex2d(0, -2 + .1);
178 if (width * exaggeration > 1) {
180 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
182 glVertex2f(0 - 1.0, 2);
183 glVertex2f(-1.0, -2);
187 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
191 if (width * exaggeration > 1) {
192 glRotated(90, 0, 0, -1);
void leaveDetectorByMove(SUMOVehicle &veh, SUMOReal leaveTimestep)
Processes a vehicle that leaves the detector.
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
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.
GUIVisualizationTextSettings addName
Stores the information about how to visualize structures.
virtual void reset()
Resets all generated values to allow computation of next interval.
std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t, bool leaveTime=false) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
int getCurrentPassedNumber() const
Returns the number of vehicles that have passed the detector.
SUMOReal myPosition
The position on the lane.
Position myFGPosition
The position in full-geometry mode.
GUIInductLoop & myDetector
The wrapped detector.
virtual std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t, bool leaveTime=false) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
SUMOReal getCurrentOccupancy() const
Returns the current occupancy.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
const Position geometryPositionAtOffset(SUMOReal offset, SUMOReal lateralOffset=0) const
SUMOReal x() const
Returns the x-position.
GUIGlID getGlID() const
Returns the numerical id of the object.
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.
const std::string & getID() const
Returns the id.
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
The gui-version of the MSInductLoop.
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.
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
SUMOReal getCurrentSpeed() const
Returns the speed of the vehicle on 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.
virtual void leaveDetectorByLaneChange(SUMOVehicle &veh, SUMOReal lastPos)
Removes a vehicle from the detector's map myVehiclesOnDet.
~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.
void leaveDetectorByLaneChange(SUMOVehicle &veh, SUMOReal lastPos)
Removes a vehicle from the detector's map myVehiclesOnDet.