45 MEVehicle(pars, route, type, speedFactor),
64 ret->
mkItem(
"waiting time [s]",
true,
77 ret->
mkItem(
"odometer [m]",
true,
79 if (
getParameter().repetitionNumber < std::numeric_limits<int>::max()) {
152 switch (activeScheme) {
211 std::map<const MSLane*, int> repeatLane;
213 const int indexDigits = (int)
toString(r->size()).size();
215 for (; i != r->end(); ++i) {
222 (laneAngle >= -0.25 *
M_PI && laneAngle < 0.75 *
M_PI ? 1 : -1) * 0.4 * indexDigits * textSize, 0);
226 if (noLoop && i != start && (*i) == (*start)) {
245 std::string result =
"";
278 const double curTime =
SIMTIME;
279 double vehiclePosition = 0.;
284 const std::vector<MEVehicle*>& queue = segment->
getQueue(queIdx);
285 for (
auto it = queue.rbegin(); it != queue.rend(); ++it) {
289 const double offset = segment->
getLength() * (curTime - entry) / (intendedLeave - entry);
290 if (offset < vehiclePosition) {
291 vehiclePosition = offset;
GUISelectedStorage gSelected
A global holder of selected objects.
ConstMSEdgeVector::const_iterator MSRouteIterator
std::shared_ptr< const MSRoute > ConstMSRoutePtr
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
std::string getVehicleShapeName(SUMOVehicleShape id)
Returns the class name of the shape class given by its id.
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
int gPrecision
the precision for floating point outputs
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Boundary & grow(double by)
extends the boundary by the given amount
std::string toStr(std::streamsize accuracy) const
Returns the string representation of this distribution.
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.
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048, const int align=0)
static void drawAction_drawVehicleAsBoxPlus(const double width, const double length, bool amReversed=false)
draw vehicle as a Box
A MSVehicle extended by some values for usage within the gui.
void drawParkingInfo(const GUIVisualizationSettings &s) const
double getNaviDegree() const
return the current angle in navigational degrees
void drawStopLabels(const GUIVisualizationSettings &s, bool noLoop, const RGBColor &col) const
std::string getDeviceDescription()
lists equipped device (types) for the current vehicle
const MSVehicleType & getVType() const
A shortcut to myVehicle.myType.
GUIGlID getGlID() const
Returns the numerical id of the object.
Representation of a lane in the micro simulation (gui-version)
const std::vector< double > & getShapeRotations(bool secondary) const
const PositionVector & getShape(bool secondary) const override
const std::vector< double > & getShapeLengths(bool secondary) const
void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, bool asImage) const
draws the given guiShape with distinct carriages/modules
std::string getStopInfo() const
retrieve information about the current stop state
GUIMEVehicle(SUMOVehicleParameter *pars, ConstMSRoutePtr route, MSVehicleType *type, const double speedFactor)
Constructor.
~GUIMEVehicle()
destructor
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
virtual Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
void drawRouteHelper(const GUIVisualizationSettings &s, ConstMSRoutePtr r, bool future, bool noLoop, const RGBColor &col) const
Draws the route.
double getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void selectBlockingFoes() const
adds the blocking foes to the current selection
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
std::string getEdgeID() const
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings vehicleName
GUIVisualizationSizeSettings vehicleSize
double scale
information about a lane's width (temporary, used for a single view)
bool secondaryShape
whether secondary lane shape shall be drawn
bool showRouteIndex
Information whether the route index should be shown.
double angle
The current view rotation angle.
A single mesoscopic segment (cell)
static const int PARKING_QUEUE
double getLength() const
Returns the length of the segment in meters.
const std::vector< MEVehicle * > & getQueue(int index) const
Returns the cars in the queue with the given index for visualization.
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
A vehicle from the mesoscopic point of view.
double getLastEntryTimeSeconds() const
Returns the entry time for the current segment.
double getBlockTimeSeconds() const
Returns the time at which the vehicle was blocked on the current segment.
double getCurrentStoppingTimeSeconds() const
Returns the delay that is accrued due to option –meso-tls-penalty or –meso-minor-penalty.
double getPositionOnLane() const
Get the vehicle's position along the lane.
MESegment * getSegment() const
Returns the current segment the vehicle is on.
int getQueIndex() const
Returns the index of the que the vehicle is in.
int getSegmentIndex() const
double getCurrentLinkPenaltySeconds() const
Returns the delay that is accrued due to option –meso-tls-penalty or –meso-minor-penalty.
double getSpeed() const
Returns the vehicle's estimated speed assuming no delays.
double getEventTimeSeconds() const
Returns the earliest leave time for the current segment.
The base class for microscopic and mesoscopic vehicles.
double getMaxSpeed() const
Returns the maximum speed (the minimum of desired and technical maximum speed)
MSVehicleType * myType
This vehicle's type.
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
double getChosenSpeedFactor() const
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
double getOdometer() const
Returns the distance that was already driven by this vehicle.
double getLength() const
Returns the vehicle's length.
bool isParking() const
Returns whether the vehicle is parking.
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
MSRouteIterator myCurrEdge
Iterator to current route-edge.
double getWidth() const
Returns the vehicle's width.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
SUMOTime getDepartDelay() const
Returns the depart delay.
const SUMOVehicleParameter * myParameter
This vehicle's parameter.
int getNumberReroutes() const
Returns the number of new routes this vehicle got.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
bool isStopped() const
Returns whether the vehicle is at a stop.
virtual void unlock() const
release exclusive access to the mesoscopic state
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
double getVehicleMaxSpeed(const SUMOTrafficObject *const veh) const
Returns the maximum speed the vehicle may use on this edge.
virtual void lock() const
grant exclusive access to the mesoscopic state
Representation of a lane in the micro simulation.
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
The car-following model and parameter.
double getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
int getPersonCapacity() const
Get this vehicle type's person capacity.
const std::string & getID() const
Returns the name of the vehicle type.
double getMinGap() const
Get the free space in front of vehicles of this class.
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
double getLength() const
Get vehicle's length [m].
SUMOVehicleShape getGuiShape() const
Get this vehicle type's shape.
double getMass() const
Get this vehicle type's mass.
const SUMOVTypeParameter & getParameter() const
int getContainerCapacity() const
Get this vehicle type's container capacity.
const std::string & getID() const
Returns the id.
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
A point in 2D or 3D with translation and scaling methods.
double angleAt2D(int pos) const
get angle in certain position of position vector (in radians between -M_PI and M_PI)
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
Structure representing possible vehicle parameter.
std::string line
The vehicle's line (mainly for public transport)
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values