52 MSLane* lane,
double startPos,
double endPos,
double detLength,
53 SUMOTime haltingTimeThreshold,
double haltingSpeedThreshold,
54 double jamDistThreshold,
const std::string& vTypes,
bool showDetector)
55 :
MSE2Collector(id, usage, lane, startPos, endPos, detLength, haltingTimeThreshold,
56 haltingSpeedThreshold, jamDistThreshold, vTypes),
57 myShowDetectorInGUI(showDetector) {}
60 std::vector<MSLane*> lanes,
double startPos,
double endPos,
61 SUMOTime haltingTimeThreshold,
double haltingSpeedThreshold,
62 double jamDistThreshold,
const std::string& vTypes,
bool showDetector)
63 :
MSE2Collector(id, usage, lanes, startPos, endPos, haltingTimeThreshold,
64 haltingSpeedThreshold, jamDistThreshold, vTypes),
82 myDetector(detector) {
86 const std::vector<MSLane*> lanes = detector.
getLanes();
87 for (std::vector<MSLane*>::const_iterator li = lanes.begin(); li != lanes.end(); ++li) {
89 v.insert(v.end(), shape.begin(), shape.end());
98 for (
int i = 0; i < e; ++i) {
102 myShapeRotations.push_back((
double) atan2((s.
x() - f.
x()), (f.
y() - s.
y())) * (double) 180.0 / (
double)
PI);
131 ret->
mkItem(
"vehicles [#]",
true,
133 ret->
mkItem(
"occupancy [%]",
true,
135 ret->
mkItem(
"mean speed [m/s]",
true,
137 ret->
mkItem(
"mean vehicle length [m]",
true,
139 ret->
mkItem(
"jam number [#]",
true,
141 ret->
mkItem(
"max jam length [veh]",
true,
143 ret->
mkItem(
"max jam length [m]",
true,
145 ret->
mkItem(
"jam length sum [veh]",
true,
147 ret->
mkItem(
"jam length sum [m]",
true,
149 ret->
mkItem(
"started halts [#]",
true,
167 if (exaggeration > 0) {
169 dwidth = (double) 0.3;
170 glColor3d(0, (
double) .6, (
double) .8);
172 glColor3d(0, (
double) .8, (
double) .8);
174 double width = (double) 2.0 * s.
scale;
175 if (width * exaggeration > 1.0) {
179 for (
int i = 0; i < e; ++i) {
const MSLane * getLane() const
Returns the lane the reminder works on.
std::vector< double > myShapeLengths
A sequence of lengths in full-geometry mode.
double scale
information about a lane's width (temporary, used for a single view)
std::vector< double > myShapeRotations
A sequence of rotations in full-geometry mode.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
GUIVisualizationTextSettings addName
int getCurrentJamLengthInVehicles() const
Returns the length of all jams in vehicles.
An areal detector corresponding to a sequence of consecutive lanes.
MyWrapper(GUIE2Collector &detector)
Constructor.
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
double x() const
Returns the x-position.
double getLength() const
Returns the length of the detector.
GUIE2Collector & myDetector
The wrapped detector.
double getStartPos() const
Returns the begin position of the detector.
const std::string & getID() const
Returns the id.
The gui-version of the MSE2Collector.
A class that stores a 2D geometrical boundary.
PositionVector myFullGeometry
A sequence of positions in full-geometry mode.
GUIVisualizationSizeSettings addSize
int getCurrentMaxJamLengthInVehicles() const
Returns the length in vehicles of the currently largest jam.
double getCurrentMeanSpeed() const
Returns the mean vehicle speed of vehicles currently on the detector.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
A point in 2D or 3D with translation and scaling methods.
int getCurrentJamNumber() const
Returns the current number of jams.
std::vector< MSLane * > getLanes()
Returns a vector containing pointers to the lanes covered by the detector ordered from its first to i...
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
GUIE2Collector(const std::string &id, DetectorUsage usage, MSLane *lane, double startPos, double endPos, double detLength, SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold, const std::string &vTypes, bool showDetector)
Constructor with given end position and detector length.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Boundary & grow(double by)
extends the boundary by the given amount
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
PositionVector getSubpart(double beginOffset, double endOffset) const
get subpart of a position vector
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double getCurrentJamLengthInMeters() const
Returns the length of all jams in meters.
double getCurrentMaxJamLengthInMeters() const
Returns the length in meters of the currently largest jam.
int getCurrentStartedHalts() const
Returns the length of all jams in meters.
virtual DetectorUsage getUsageType() const
Returns the detector's usage type.
bool myShowDetectorInGUI
Whether the detector shall be drawn in the gui.
GUIGlID getGlID() const
Returns the numerical id of the object.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
~GUIE2Collector()
Destructor.
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
double getCurrentMeanLength() const
Returns the mean vehicle length of vehicles currently on the detector.
void closeBuilding()
Closes the building of the table.
Representation of a lane in the micro simulation.
double getCurrentOccupancy() const
Returns the current detector occupancy.
A window containing a gl-object's parameter.
GUIE2Collector & getDetector()
Returns the detector itself.
int getCurrentVehicleNumber() const
Returns the number of vehicles currently on the detector.
Boundary myBoundary
The detector's boundary.