79 #pragma warning(disable: 4355) 83 MSVehicle(pars, route, type, speedFactor),
109 ret->
mkItem(
"position [m]",
true,
111 ret->
mkItem(
"lateral offset [m]",
true,
113 ret->
mkItem(
"speed [m/s]",
true,
115 ret->
mkItem(
"lateral speed [m/s]",
true,
117 ret->
mkItem(
"acceleration [m/s^2]",
true,
119 ret->
mkItem(
"angle [degree]",
true,
121 ret->
mkItem(
"slope [degree]",
true,
124 ret->
mkItem(
"time gap on lane [s]",
true,
126 ret->
mkItem(
"waiting time [s]",
true,
130 ret->
mkItem(
"time loss [s]",
true,
132 ret->
mkItem(
"impatience",
true,
134 ret->
mkItem(
"last lane change [s]",
true,
138 if (
getParameter().repetitionNumber < std::numeric_limits<int>::max()) {
149 ret->
mkItem(
"CO2 [mg/s]",
true,
151 ret->
mkItem(
"CO [mg/s]",
true,
153 ret->
mkItem(
"HC [mg/s]",
true,
155 ret->
mkItem(
"NOx [mg/s]",
true,
157 ret->
mkItem(
"PMx [mg/s]",
true,
159 ret->
mkItem(
"fuel [ml/s]",
true,
161 ret->
mkItem(
"electricity [Wh/s]",
true,
163 ret->
mkItem(
"noise (Harmonoise) [dB]",
true,
166 ret->
mkItem(
"persons",
true,
168 ret->
mkItem(
"containers",
true,
195 ret->
mkItem(
"Type Information:",
false,
"");
240 glTranslated(0, 0,
getType() + .2);
242 if ((*i).myLink ==
nullptr) {
245 MSLink* link = (*i).myLink;
247 if (via !=
nullptr) {
249 if ((*i).mySetRequest) {
254 const SUMOTime leaveTime = (*i).myLink->getLeaveTime(
264 glTranslated(0, 0,
getType() - .2);
274 double upscaleLength = exaggeration;
275 if (exaggeration > 1 && totalLength > 5) {
277 upscaleLength =
MAX2(1.0, upscaleLength * (5 + sqrt(totalLength - 5)) / totalLength);
280 if (exaggeration == 0) {
285 const double length = totalLength * upscaleLength;
288 const double xCornerCut = 0.3 * exaggeration;
289 const double yCornerCut = 0.4 * exaggeration;
291 const int numCarriages =
MAX2(1, 1 + (
int)((length - locomotiveLength) / (defaultLength + carriageGap) + 0.5));
292 assert(numCarriages > 0);
293 double carriageLengthWithGap = length / numCarriages;
294 double carriageLength = carriageLengthWithGap - carriageGap;
295 double firstCarriageLength = carriageLength;
296 if (defaultLength != locomotiveLength && numCarriages > 1) {
297 firstCarriageLength = locomotiveLength;
298 carriageLengthWithGap = (length - locomotiveLength) / (numCarriages - 1);
299 carriageLength = carriageLengthWithGap - carriageGap;
301 const int firstPassengerCarriage = defaultLength == locomotiveLength || numCarriages == 1 ? 0 : 1;
303 const int seatsPerCarriage = (int)ceil(totalSeats / (numCarriages - firstPassengerCarriage));
309 int backRouteIndex = routeIndex;
312 double carriageBackOffset =
myState.
pos() - firstCarriageLength;
315 if (requiredSeats > 0) {
321 double curCLength = firstCarriageLength;
323 for (
int i = 0; i < numCarriages; ++i) {
325 curCLength = carriageLength;
327 while (carriageOffset < 0) {
337 while (carriageBackOffset < 0) {
339 if (prev != backLane) {
343 carriageBackOffset = 0;
353 const double drawnCarriageLength = front.
distanceTo2D(back);
354 angle = atan2((front.
x() - back.
x()), (back.
y() - front.
y())) * (double) 180.0 / (
double)
M_PI;
355 if (i >= firstPassengerCarriage) {
356 computeSeats(front, back, seatsPerCarriage, exaggeration, requiredSeats);
359 glTranslated(front.
x(), front.
y(),
getType());
360 glRotated(angle, 0, 0, 1);
379 glBegin(GL_TRIANGLE_FAN);
380 glVertex2d(-halfWidth + xCornerCut, 0);
381 glVertex2d(-halfWidth, yCornerCut);
382 glVertex2d(-halfWidth, drawnCarriageLength - yCornerCut);
383 glVertex2d(-halfWidth + xCornerCut, drawnCarriageLength);
384 glVertex2d(halfWidth - xCornerCut, drawnCarriageLength);
385 glVertex2d(halfWidth, drawnCarriageLength - yCornerCut);
386 glVertex2d(halfWidth, yCornerCut);
387 glVertex2d(halfWidth - xCornerCut, 0);
393 carriageOffset -= (curCLength + carriageGap);
394 carriageBackOffset -= carriageLengthWithGap;
398 glTranslated(front.
x(), front.
y(),
getType());
399 glRotated(angle, 0, 0, 1);
407 glTranslated(front.
x(), front.
y(),
getType());
409 glRotated(degAngle, 0, 0, 1);
410 glScaled(exaggeration, upscaleLength, 1);
416 #define BLINKER_POS_FRONT .5 417 #define BLINKER_POS_BACK .5 421 glColor3d(1.f, .8f, 0);
457 glColor3f(1.f, .2f, 0);
460 glTranslated(0, length, -0.1);
477 glTranslated(0, 2.5, .5);
487 switch (activeScheme) {
553 std::vector<std::vector<MSVehicle::LaneQ> > bestLanes =
myBestLanes;
555 for (std::vector<std::vector<MSVehicle::LaneQ> >::iterator j = bestLanes.begin(); j != bestLanes.end(); ++j) {
556 std::vector<MSVehicle::LaneQ>& lanes = *j;
559 for (std::vector<MSVehicle::LaneQ>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
560 gmax =
MAX2((*i).length, gmax);
561 rmax =
MAX2((*i).occupation, rmax);
563 for (std::vector<MSVehicle::LaneQ>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
565 double g = (*i).
length / gmax;
566 double r = (*i).occupation / rmax;
568 double width = 0.5 / (1 + abs((*i).bestLaneOffset));
591 int bestLaneIndex = (&r ==
myRoute ? 0 : (int)bestLaneConts.
size());
592 for (; i != r.
end(); ++i) {
594 if (bestLaneIndex < (
int)bestLaneConts.size() && bestLaneConts[bestLaneIndex] != 0 && (*i) == &(bestLaneConts[bestLaneIndex]->getEdge())) {
595 lane =
static_cast<GUILane*
>(bestLaneConts[bestLaneIndex]);
598 const std::vector<MSLane*>* allowed = (*i)->allowedLanes(
getVClass());
599 if (allowed !=
nullptr && allowed->size() != 0) {
600 lane =
static_cast<GUILane*
>((*allowed)[0]);
602 lane =
static_cast<GUILane*
>((*i)->getLanes()[0]);
609 std::map<std::pair<const MSLane*, double>,
int> repeat;
614 std::string label = stop.reached ?
"stopped" :
"stop " +
toString(stopIndex);
618 if (stop.pars.until >= 0) {
621 if (stop.duration >= 0) {
623 label +=
" duration:1day+";
625 label +=
" duration:" +
time2string(stop.duration);
628 std::pair<const MSLane*, double> stopPos = std::make_pair(stop.lane, stop.getEndPos(*
this));
643 if (routeIndex > 0) {
647 for (
MSLink* link : cand->getLinkCont()) {
648 if (link->getLane() == current) {
649 if (link->getViaLane() !=
nullptr) {
650 return link->getViaLane();
652 return const_cast<MSLane*
>(link->getLaneBefore());
670 std::string result =
"";
676 return "next: " +
myStops.front().getDescription();
680 if (
myStops.front().pars.triggered) {
681 result +=
", triggered";
682 }
else if (
myStops.front().pars.containerTriggered) {
683 result +=
", containerTriggered";
684 }
else if (
myStops.front().collision) {
685 result +=
", collision";
686 }
else if (
myStops.front().pars.until != -1) {
699 std::cout <<
SIMTIME <<
" selectBlockingFoes veh=" <<
getID() <<
" dist=" << dist <<
" numLinks=" <<
myLFLinkLanes.size() <<
"\n";
703 if (dpi.
myLink ==
nullptr) {
707 std::vector<const SUMOVehicle*> blockingFoes;
708 std::vector<const MSPerson*> blockingPersons;
717 std::cout <<
" closed due to:\n";
718 for (std::vector<const SUMOVehicle*>::const_iterator it = blockingFoes.begin(); it != blockingFoes.end(); ++it) {
719 std::cout <<
" " << (*it)->getID() <<
"\n";
725 if (parallelLink !=
nullptr) {
729 const bool isShadowOpen =
738 for (std::vector<const SUMOVehicle*>::const_iterator it = blockingFoes.begin(); it != blockingFoes.end(); ++it) {
739 std::cout <<
" " << (*it)->getID() <<
"\n";
745 for (std::vector<const SUMOVehicle*>::const_iterator it = blockingFoes.begin(); it != blockingFoes.end(); ++it) {
755 for (MSLink::LinkLeaders::const_iterator it = linkLeaders.begin(); it != linkLeaders.end(); ++it) {
758 if (leader !=
nullptr) {
762 std::cout <<
" linkLeader=" << leader->
getID() <<
"\n";
766 for (std::vector<const MSPerson*>::iterator it_p = blockingPersons.begin(); it_p != blockingPersons.end(); ++it_p) {
768 if (foe !=
nullptr) {
784 if (view !=
nullptr) {
806 for (
int i = 0; i < (int)sublaneSides.size(); ++i) {
807 if (sublaneSides[i] > rightSide) {
808 return MAX2(i - 1, 0);
818 for (
int i = (
int)sublaneSides.size() - 1; i >= 0; --i) {
819 if (sublaneSides[i] < leftSide) {
868 std::string line =
"";
869 int destinations = 0;
872 if (!it->reached && destinations < 2 && it->busstop !=
nullptr) {
873 line += it->busstop->getID();
876 if (it->busstop == busStop) {
877 it->duration = finalDuration;
882 it->duration =
MIN2(it->duration, intermediateDuration);
885 if (destinations < 2) {
886 line += busStop->
getID();
907 std::string errorMsg;
std::vector< MSVehicleDevice * > myDevices
The devices this vehicle has.
const std::vector< IncomingLaneInfo > & getIncomingLanes() const
int getRoutePosition() const
bool gDebugFlag1
global utility flags for debugging
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
void drawAction_drawVehicleBlinker(double length) const
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Drive process items represent bounds on the safe velocity corresponding to the upcoming links...
static double gLateralResolution
double getFuelConsumption() const
Returns fuel consumption of the current state.
const std::vector< double > getSubLaneSides() const
Returns the right side offsets of this edge's sublanes.
int getContainerNumber() const
Returns the number of containers.
double getAccumulatedWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s) within the last millisecs...
void reroute(SUMOTime t, const std::string &info, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, const bool onInit=false, const bool withTaz=false, const bool silent=false)
Performs a rerouting using the given router.
static StringBijection< SumoXMLTag > CarFollowModels
car following models
SumoXMLTag
Numbers representing SUMO-XML - element names.
SUMOVehicleShape getGuiShape() const
Get this vehicle type's shape.
double getNOxEmissions() const
Returns NOx emission of the current state.
MSEdge & getEdge() const
Returns the lane's edge.
Representation of a vehicle in the micro simulation.
std::string lane
The lane to stop at.
double scale
information about a lane's width (temporary, used for a single view)
double getBeginLanePosition() const
Returns the begin position of this stop.
double getElectricityConsumption() const
Returns electricity consumption of the current state.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
const ConstMSEdgeVector & getEdges() const
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
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.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
std::vector< std::vector< LaneQ > > myBestLanes
State myState
This Vehicles driving state (pos and speed)
bool haveValidStopEdges() const
check whether all stop.edge MSRouteIterators are valid and in order
A lane area vehicles can halt at.
DriveItemVector myLFLinkLanes
container for the planned speeds in the current step
MSLane * getLane() const
Returns the lane the vehicle is on.
const MSVehicleType & getVType() const
A shortcut to myVehicle.myType.
double getRightSideOnEdge2() const
return right vehicle side on current edge (without argument)
double carriageLength
the length of train carriages and locomotive
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
bool gaming
whether the application is in gaming mode or not
LateralAlignment getPreferredLateralAlignment() const
Get vehicle's preferred lateral alignment.
int getShadowDirection() const
return the direction in which the current shadow lane lies
std::string getLCStateRight() const
return the lanechange state
double getManeuverDist() const
Returns the remaining unblocked distance for the current maneuver. (only used by sublane model) ...
Stores the information about how to visualize structures.
std::string getShadowLaneID() const
static bool haveLateralDynamics()
whether any kind of lateral dynamics is active
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
double y() const
Returns the y-position.
double getPositionOnLane() const
Get the vehicle's position along the lane.
void computeSeats(const Position &front, const Position &back, int maxSeats, double exaggeration, int &requiredSeats) const
add seats to mySeatPositions and update requiredSeats
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
int getBestLaneOffset() const
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
std::string time2string(SUMOTime t)
GUIVisualizationTextSettings vehicleName
A device that performs vehicle rerouting based on current edge speeds.
double x() const
Returns the x-position.
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
double getLeaveSpeed() const
std::string busstop
(Optional) bus stop if one is assigned to the stop
int parametersSet
Information for the output which parameter were set.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOTime getDepartDelay() const
Returns the depart delay.
double getLeftSideOnEdge() const
return left vehicle side on current edge
void drawOutsideNetwork(bool add)
register vehicle for drawing while outside the network
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
double getLength() const
Returns the lane's length.
const PositionVector & getShape() const
Returns this lane's shape.
const MSRoute * myRoute
This vehicle's route.
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
std::string getTargetLaneID() const
double getMinGapLat() const
Get the minimum lateral gap that vehicles of this type maintain.
bool addStop(const SUMOVehicleParameter::Stop &stopPar, std::string &errorMsg, SUMOTime untilOffset=0, bool collision=false, MSRouteIterator *searchStart=0)
Adds a stop.
void drawBestLanes() const
Draws the vehicle's best lanes.
void rerouteDRTStop(MSStoppingPlace *busStop)
handle route to accomodate to given stop
bool addAdditionalGLVisualisation(const GUIGlObject *const which)
Adds an object to call its additional visualisation method.
std::vector< const MSEdge * > ConstMSEdgeVector
static void drawLinkItem(const Position &pos, SUMOTime arrivalTime, SUMOTime leaveTime, double exagerate)
const SUMOVehicleParameter * myParameter
This vehicle's parameter.
const std::string & getID() const
Returns the id.
static SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector())
return the router instance
The base class for microscopic and mesoscopic vehicles.
int getLeftSublaneOnEdge() const
int size() const
Returns the number of edges to pass.
const std::vector< double > & getShapeRotations() const
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
int getPersonCapacity() const
Get this vehicle type's person capacity.
void drawAction_drawVehicleBrakeLight(double length, bool onlyOne=false) const
double getNaviDegree() const
return the current angle in navigational degrees
int getNumberReroutes() const
Returns the number of new routes this vehicle got.
double getWidth() const
Returns the lane's width.
std::string getStopInfo() const
retrieve information about the current stop state
#define UNUSED_PARAMETER(x)
int getContainerCapacity() const
Get this vehicle type's container capacity.
bool removeAdditionalGLVisualisation(const GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
The car-following model and parameter.
bool triggered
whether an arriving person lets the vehicle continue
MSAbstractLaneChangeModel & getLaneChangeModel()
SUMOTime getBoardingDuration() const
Get this vehicle type's boarding duration.
MSLink * getParallelLink(int direction) const
return the link that is parallel to this lane or 0
bool isLeader(const MSLink *link, const MSVehicle *veh) const
whether the given vehicle must be followed at the given junction
Right blinker lights are switched on.
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
std::string getVehicleShapeName(SUMOVehicleShape id)
Returns the class name of the shape class given by its id.
PositionVector mySeatPositions
positions of seats in the vehicle (updated at every drawing step)
Representation of a lane in the micro simulation (gui-version)
double getChosenSpeedFactor() const
Returns the precomputed factor by which the driver wants to be faster than the speed limit...
double getMaxSpeed() const
Returns the maximum speed.
bool signalSet(int which) const
Returns whether the given signal is on.
bool isSelected() const
whether this vehicle is selected in the GUI
A road/street connecting two junctions.
GUISUMOAbstractView * getActiveView() const
get the active view or 0
double getEndLanePosition() const
Returns the end position of this stop.
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
double getCO2Emissions() const
Returns CO2 emission of the current state.
Left blinker lights are switched on.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
bool replaceRouteEdges(ConstMSEdgeVector &edges, double cost, double savings, const std::string &info, bool onInit=false, bool check=false, bool removeStops=true)
Replaces the current route by the given edges.
bool opened(SUMOTime arrivalTime, double arrivalSpeed, double leaveSpeed, double vehicleLength, double impatience, double decel, SUMOTime waitingTime, double posLat=0, std::vector< const SUMOVehicle *> *collectFoes=0, bool ignoreRed=false, const SUMOVehicle *ego=0) const
Returns the information whether the link may be passed.
static GUIMainWindow * getInstance()
A point in 2D or 3D with translation and scaling methods.
GUIVehicle(SUMOVehicleParameter *pars, const MSRoute *route, MSVehicleType *type, const double speedFactor)
Constructor.
double getTimeLossSeconds() const
Returns the time loss in seconds.
const std::vector< MSLane * > & getBestLanesContinuation() const
Returns the best sequence of lanes to continue the route starting at myLane.
SUMOTime getLoadingDuration() const
Get this vehicle type's loading duration.
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
void move2side(double amount, double maxExtension=100)
move position vector to side using certain ammount
SUMOTime until
The time at which the vehicle may continue its journey.
std::list< Stop > myStops
The vehicle's list of stops.
ConstMSEdgeVector::const_iterator MSRouteIterator
MSLane * myLane
The lane the vehicle is on.
Blinker lights on both sides are switched on.
bool hasStops() const
Returns whether the vehicle has to stop somewhere.
double getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
render as a (city) rail without locomotive
std::vector< LinkLeader > LinkLeaders
double getImpatience() const
Returns this vehicles impatience.
A MSVehicle extended by some values for usage within the gui.
const PositionVector & getShape() const
A blue emergency light is on.
int getNumPassengers() const
return the number of passengers
double getMinGap() const
Get the free space in front of vehicles of this class.
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
double getMaxDecel() const
Get the vehicle type's maximal comfortable deceleration [m/s^2].
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
double endPos
The stopping position end.
void drawAction_drawLinkItems(const GUIVisualizationSettings &s) const
void selectBlockingFoes() const
adds the blocking foes to the current selection
const SUMOVTypeParameter & getParameter() const
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
MSLane * getPreviousLane(MSLane *current, int &routeIndex) const
void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, bool asImage) const
draws the given guiShape with distinct carriages/modules
std::string line
The vehicle's line (mainly for public transport)
std::string getLaneID() const
return vehicle lane id
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
Definition of vehicle stop (position and duration)
static void drawAction_drawVehicleAsPoly(const GUIVisualizationSettings &s, const SUMOVehicleShape shape, const double width, const double length, int carriageIndex=-1)
draw vehicle as a polygon
int index
at which position in the stops list
double getManeuverDist() const
return the lane-change maneuver distance
double getCOEmissions() const
Returns CO emission of the current state.
int getRightSublaneOnEdge() const
return the righmost sublane on the edge occupied by the vehicle
double getMaxSpeedLat() const
Get vehicle's maximum lateral speed [m/s].
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
double startPos
The stopping position start.
SUMOVehicleClass getVClass() const
Returns the vehicle's access class.
int getPersonNumber() const
Returns the number of persons.
LaneChangeAction
The state of a vehicle's lane-change behavior.
Structure representing possible vehicle parameter.
double length() const
Returns the length.
draw vehicle outside the road network
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
bool isActive() const
Returns whether the current simulation step is an action point for the vehicle.
bool containerTriggered
whether an arriving container lets the vehicle continue
MSVehicleType * myType
This vehicle's type.
SubParams jmParameter
Junction-model parameter.
MSVehicleDevice * getDevice(const std::type_info &type) const
Returns a device of the given type if it exists or 0.
const std::vector< double > & getShapeLengths() const
double getAcceleration() const
Returns the vehicle's acceleration in m/s (this is computed as the last step's mean acceleration in c...
const std::string & getID() const
Returns the name of the vehicle type.
double getPMxEmissions() const
Returns PMx emission of the current state.
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
MSLane * getViaLaneOrLane() const
return the via lane if it exists and the lane otherwise
double getLength() const
Get vehicle's length [m].
double getTimeGapOnLane() const
Returns the time gap in seconds to the leader of the vehicle on the same lane.
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
GUIGlID getGlID() const
Returns the numerical id of the object.
static bool drawAction_drawVehicleAsImage(const GUIVisualizationSettings &s, const std::string &file, const GUIGlObject *o, const double width, double length)
try to draw vehicle as raster image and return true if sucessful
#define BLINKER_POS_FRONT
std::string getLCStateLeft() const
double getSlope() const
Returns the slope of the road at vehicle's position.
GUIVisualizationSizeSettings vehicleSize
void drawAction_drawBlinker(double dir, double length)
MSRouteIterator myCurrEdge
Iterator to current route-edge.
bool isActionStep(SUMOTime t) const
Returns whether the next simulation step will be an action point for the vehicle. ...
MSLane * getShadowLane() const
Returns the lane the vehicle's shadow is on during continuous/sublane lane change.
double getHCEmissions() const
Returns HC emission of the current state.
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
bool isStopped() const
Returns whether the vehicle is at a stop.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
double getRightSideOnEdge(const MSLane *lane=0) const
Get the vehicle's lateral position on the edge of the given lane (or its current edge if lane == 0) ...
void drawAction_drawVehicleBlueLight() const
const MSLane & getLane() const
Returns the lane this stop is located at.
bool isParking() const
Returns whether the vehicle is parking.
void drawRouteHelper(const GUIVisualizationSettings &s, const MSRoute &r, bool future) const
Draws the route.
double getSpeed() const
Returns the vehicle's current speed.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
render as a transport vehicle with one trailer
static SUMOTime gLaneChangeDuration
const std::string & getID() const
Returns the name of the vehicle.
GUISelectedStorage gSelected
A global holder of selected objects.
Representation of a lane in the micro simulation.
double getVehicleMaxSpeed(const SUMOTrafficObject *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
A window containing a gl-object's parameter.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
SUMOTime duration
The stopping duration.
render as a semi-trailer transport vehicle ("Sattelschlepper")
SubParams lcParameter
Lane-changing parameter.
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
MSRouteIterator end() const
Returns the end of the list of edges to pass.
double getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
double getSpeedLat() const
return the lateral speed of the current lane change maneuver
double getAngle() const
Return current angle.
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
bool parking
whether the vehicle is removed from the net while stopping
double getWidth() const
Returns the vehicle's width.
Definition of vehicle stop (position and duration)
double pos() const
Position of this state.
static RGBColor getColor()
gets the gl-color
int getNumContainers() const
return the number of passengers
A MSVehicle extended by some values for usage within the gui.