Eclipse SUMO - Simulation of Urban MObility
MSStageDriving.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
20 // The common superclass for modelling transportable objects like persons and containers
21 /****************************************************************************/
22 #include <config.h>
23 
25 #include <utils/geom/GeomHelper.h>
29 #include <microsim/MSEdge.h>
30 #include <microsim/MSLane.h>
31 #include <microsim/MSNet.h>
41 
42 
43 // ===========================================================================
44 // method definitions
45 // ===========================================================================
46 MSStageDriving::MSStageDriving(const MSEdge* origin, const MSEdge* destination,
47  MSStoppingPlace* toStop, const double arrivalPos, const std::vector<std::string>& lines,
48  const std::string& group,
49  const std::string& intendedVeh, SUMOTime intendedDepart) :
50  MSStage(destination, toStop, arrivalPos, MSStageType::DRIVING, group),
51  myOrigin(origin),
52  myLines(lines.begin(), lines.end()),
53  myVehicle(nullptr),
54  myVehicleID("NULL"),
55  myVehicleVClass(SVC_IGNORING),
56  myVehicleDistance(-1.),
57  myTimeLoss(-1),
58  myWaitingSince(-1),
59  myWaitingEdge(nullptr),
60  myStopWaitPos(Position::INVALID),
61  myOriginStop(nullptr),
62  myIntendedVehicleID(intendedVeh),
63  myIntendedDepart(intendedDepart) {
64 }
65 
66 
67 MSStage*
69  return new MSStageDriving(myOrigin, myDestination, myDestinationStop, myArrivalPos, std::vector<std::string>(myLines.begin(), myLines.end()),
71 }
72 
73 
75 
76 
77 const MSEdge*
79  if (myVehicle != nullptr) {
80  if (myVehicle->getLane() != nullptr) {
81  return &myVehicle->getLane()->getEdge();
82  }
83  return myVehicle->getEdge();
84  } else if (myArrived >= 0) {
85  return myDestination;
86  } else {
87  return myWaitingEdge;
88  }
89 }
90 
91 
92 const MSEdge*
94  return myWaitingEdge;
95 }
96 
97 
98 double
100  if (isWaiting4Vehicle()) {
101  return myWaitingPos;
102  } else if (myArrived >= 0) {
103  return myArrivalPos;
104  } else {
105  // vehicle may already have passed the lane (check whether this is correct)
106  return MIN2(myVehicle->getPositionOnLane(), getEdge()->getLength());
107  }
108 }
109 
110 
111 Position
113  if (isWaiting4Vehicle()) {
115  return myStopWaitPos;
116  }
119  } else if (myArrived >= 0) {
122  } else {
123  return myVehicle->getPosition();
124  }
125 }
126 
127 
128 double
130  if (isWaiting4Vehicle()) {
131  return getEdgeAngle(myWaitingEdge, myWaitingPos) + M_PI / 2. * (MSGlobals::gLefthand ? -1 : 1);
132  } else if (myArrived >= 0) {
133  return getEdgeAngle(myDestination, myArrivalPos) + M_PI / 2. * (MSGlobals::gLefthand ? -1 : 1);
134  } else {
135  MSVehicle* veh = dynamic_cast<MSVehicle*>(myVehicle);
136  if (veh != nullptr) {
137  return veh->getAngle();
138  } else {
139  return 0;
140  }
141  }
142 }
143 
144 
145 double
147  if (myVehicle != nullptr) {
148  // distance was previously set to driven distance upon embarking
150  }
151  return myVehicleDistance;
152 }
153 
154 
155 std::string
156 MSStageDriving::getStageDescription(const bool isPerson) const {
157  return isWaiting4Vehicle() ? "waiting for " + joinToString(myLines, ",") : (isPerson ? "driving" : "transport");
158 }
159 
160 
161 std::string
162 MSStageDriving::getStageSummary(const bool isPerson) const {
163  const std::string dest = (getDestinationStop() == nullptr ?
164  " edge '" + getDestination()->getID() + "'" :
165  " stop '" + getDestinationStop()->getID() + "'" + (
166  getDestinationStop()->getMyName() != "" ? " (" + getDestinationStop()->getMyName() + ")" : ""));
167  const std::string intended = myIntendedVehicleID != "" ?
168  " (vehicle " + myIntendedVehicleID + " at time " + time2string(myIntendedDepart) + ")" :
169  "";
170  const std::string modeName = isPerson ? "driving" : "transported";
171  return isWaiting4Vehicle() ?
172  "waiting for " + joinToString(myLines, ",") + intended + " then " + modeName + " to " + dest :
173  modeName + " to " + dest;
174 }
175 
176 
177 void
178 MSStageDriving::proceed(MSNet* net, MSTransportable* transportable, SUMOTime now, MSStage* previous) {
180  ? previous->getOriginStop()
181  : previous->getDestinationStop());
182  myWaitingSince = now;
183  const bool isPerson = transportable->isPerson();
184  if (transportable->getParameter().departProcedure == DEPART_TRIGGERED
185  && transportable->getNumRemainingStages() == transportable->getNumStages() - 1) {
186  // we are the first real stage (stage 0 is WAITING_FOR_DEPART)
187  const std::string vehID = *myLines.begin();
188  SUMOVehicle* startVeh = net->getVehicleControl().getVehicle(vehID);
189  if (startVeh == nullptr) {
190  throw ProcessError("Vehicle '" + vehID + "' not found for triggered departure of " +
191  (isPerson ? "person" : "container") + " '" + transportable->getID() + "'.");
192  }
193  setVehicle(startVeh);
194  if (myOriginStop != nullptr) {
195  myOriginStop->removeTransportable(transportable);
196  }
197  myVehicle->addTransportable(transportable);
198  return;
199  }
200  if (myOriginStop != nullptr) {
201  // the arrival stop may have an access point
203  myStopWaitPos = myOriginStop->getWaitPosition(transportable);
205  } else {
206  myWaitingEdge = previous->getEdge();
208  myWaitingPos = previous->getEdgePos(now);
209  }
210  if (myOrigin != nullptr && myOrigin != myWaitingEdge) {
211  // transfer at junction
213  myWaitingPos = 0;
214  }
215  SUMOVehicle* const availableVehicle = myWaitingEdge->getWaitingVehicle(transportable, myWaitingPos);
216  const bool triggered = availableVehicle != nullptr &&
217  ((isPerson && availableVehicle->getParameter().departProcedure == DEPART_TRIGGERED) ||
218  (!isPerson && availableVehicle->getParameter().departProcedure == DEPART_CONTAINER_TRIGGERED));
219  if (triggered && !availableVehicle->hasDeparted()) {
220  setVehicle(availableVehicle);
221  if (myOriginStop != nullptr) {
222  myOriginStop->removeTransportable(transportable);
223  }
224  myVehicle->addTransportable(transportable);
228  } else {
229  if (isPerson) {
230  net->getPersonControl().addWaiting(myWaitingEdge, transportable);
231  myWaitingEdge->addPerson(transportable);
232  } else {
233  net->getContainerControl().addWaiting(myWaitingEdge, transportable);
234  myWaitingEdge->addContainer(transportable);
235  }
236  // check if the ride can be conducted and reserve it
238  }
239 }
240 
241 
242 void
243 MSStageDriving::tripInfoOutput(OutputDevice& os, const MSTransportable* const transportable) const {
245  const SUMOTime departed = myDeparted >= 0 ? myDeparted : now;
246  const SUMOTime waitingTime = myWaitingSince >= 0 ? departed - myWaitingSince : -1;
247  const SUMOTime duration = myArrived - myDeparted;
249  os.openTag(transportable->isPerson() ? "ride" : "transport");
250  os.writeAttr("waitingTime", waitingTime >= 0 ? time2string(waitingTime) : "-1");
251  os.writeAttr("vehicle", myVehicleID);
252  os.writeAttr("depart", myDeparted >= 0 ? time2string(myDeparted) : "-1");
253  os.writeAttr("arrival", myArrived >= 0 ? time2string(myArrived) : "-1");
254  os.writeAttr("arrivalPos", toString(getArrivalPos()));
255  os.writeAttr("duration", myArrived >= 0 ? time2string(duration) :
256  (myDeparted >= 0 ? time2string(now - myDeparted) : "-1"));
257  os.writeAttr("routeLength", myVehicleDistance);
258  os.writeAttr("timeLoss", myArrived >= 0 ? time2string(myTimeLoss) : "-1");
259  os.closeTag();
260 }
261 
262 
263 void
264 MSStageDriving::routeOutput(const bool isPerson, OutputDevice& os, const bool withRouteLength, const MSStage* const previous) const {
265  os.openTag(isPerson ? "ride" : "transport");
266  if (getFromEdge() != nullptr) {
267  os.writeAttr(SUMO_ATTR_FROM, getFromEdge()->getID());
268  } else if (previous != nullptr && previous->getStageType() == MSStageType::WAITING_FOR_DEPART) {
269  os.writeAttr(SUMO_ATTR_FROM, previous->getEdge()->getID());
270  }
271  os.writeAttr(SUMO_ATTR_TO, getDestination()->getID());
272  std::string comment = "";
273  if (myDestinationStop != nullptr) {
275  if (myDestinationStop->getMyName() != "") {
276  comment = " <!-- " + StringUtils::escapeXML(myDestinationStop->getMyName(), true) + " -->";
277  }
278  } else if (!unspecifiedArrivalPos()) {
280  }
282  if (myIntendedVehicleID != "") {
284  }
285  if (myIntendedDepart >= 0) {
287  }
288  if (withRouteLength) {
289  os.writeAttr("routeLength", myVehicleDistance);
290  }
291  os.closeTag(comment);
292 }
293 
294 
295 bool
297  return (myLines.count(vehicle->getID()) > 0
298  || myLines.count(vehicle->getParameter().line) > 0
299  || (myLines.count("ANY") > 0 && (
300  myDestinationStop == nullptr
301  ? vehicle->stopsAtEdge(myDestination)
302  : vehicle->stopsAt(myDestinationStop))));
303 }
304 
305 
306 bool
308  return myVehicle == nullptr && myArrived < 0;
309 }
310 
311 
312 SUMOTime
314  return isWaiting4Vehicle() ? now - myWaitingSince : 0;
315 }
316 
317 
318 double
320  return myVehicle == nullptr ? 0 : myVehicle->getSpeed();
321 }
322 
323 
326  ConstMSEdgeVector result;
327  result.push_back(getFromEdge());
328  result.push_back(getDestination());
329  return result;
330 }
331 
332 double
335 }
336 
337 bool
339  return myArrivalPos == std::numeric_limits<double>::infinity();
340 }
341 
342 const std::string
343 MSStageDriving::setArrived(MSNet* net, MSTransportable* transportable, SUMOTime now, const bool vehicleArrived) {
344  MSStage::setArrived(net, transportable, now, vehicleArrived);
345  if (myVehicle != nullptr) {
346  // distance was previously set to driven distance upon embarking
349  if (vehicleArrived) {
351  } else {
353  }
354  } else {
355  myVehicleDistance = -1.;
356  myTimeLoss = -1;
357  }
358  myVehicle = nullptr; // avoid dangling pointer after vehicle arrival
359  return "";
360 }
361 
362 
363 void
365  myVehicle = v;
366  if (myVehicle != nullptr) {
367  myVehicleID = v->getID();
370  myVehicleVClass = v->getVClass();
371  if (myVehicle->hasDeparted()) {
374  } else {
375  // it probably got triggered by the person
376  myVehicleDistance = 0.;
377  myTimeLoss = 0;
378  }
379  }
380 }
381 
382 void
384  if (myVehicle != nullptr) {
385  // jumping out of a moving vehicle!
388  myDestinationStop = nullptr;
389  // myVehicleDistance and myTimeLoss are updated in subsequent call to setArrived
390  } else {
391  MSTransportableControl& tc = (t->isPerson() ?
395  }
396 }
397 
398 
399 std::string
401  return isWaiting4Vehicle() ? ("waiting for " + joinToString(myLines, ",")
402  + " at " + (myDestinationStop == nullptr
403  ? ("edge '" + myWaitingEdge->getID() + "'")
404  : ("busStop '" + myDestinationStop->getID() + "'"))
405  ) : "";
406 }
407 
408 
409 void
410 MSStageDriving::saveState(std::ostringstream& out) {
411  const bool hasVehicle = myVehicle != nullptr;
412  out << " " << myWaitingSince << " " << myTimeLoss << " " << myArrived << " " << hasVehicle;
413  if (hasVehicle) {
414  out << " " << myDeparted << " " << myVehicle->getID() << " " << myVehicleDistance;
415  }
416 }
417 
418 
419 void
420 MSStageDriving::loadState(MSTransportable* transportable, std::istringstream& state) {
421  bool hasVehicle;
422  state >> myWaitingSince >> myTimeLoss >> myArrived >> hasVehicle;
423  if (hasVehicle) {
424  std::string vehID;
425  state >> myDeparted >> vehID;
427  setVehicle(startVeh);
428  myVehicle->addTransportable(transportable);
429  state >> myVehicleDistance;
430  }
431 }
432 
433 
434 /****************************************************************************/
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:74
MSStageType
Definition: MSStage.h:54
std::string time2string(SUMOTime t)
convert SUMOTime to string
Definition: SUMOTime.cpp:68
long long int SUMOTime
Definition: SUMOTime.h:31
@ SVC_IGNORING
vehicles ignoring classes
@ DEPART_CONTAINER_TRIGGERED
The departure is container triggered.
@ DEPART_TRIGGERED
The departure is person triggered.
@ SUMO_ATTR_LINES
@ SUMO_ATTR_DEPART
@ SUMO_ATTR_BUS_STOP
@ SUMO_ATTR_ARRIVALPOS
@ SUMO_ATTR_TO
@ SUMO_ATTR_FROM
@ SUMO_ATTR_INTENDED
T MIN2(T a, T b)
Definition: StdDefs.h:73
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:250
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:44
static void addReservation(MSTransportable *person, const std::set< std::string > &lines, SUMOTime reservationTime, SUMOTime pickupTime, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, const std::string &group)
add new reservation
static void addRideTransportData(const bool isPerson, const double distance, const SUMOTime duration, const SUMOVehicleClass vClass, const std::string &line, const SUMOTime waitingTime)
record tripinfo data for rides and transports
A road/street connecting two junctions.
Definition: MSEdge.h:77
SUMOVehicle * getWaitingVehicle(MSTransportable *transportable, const double position) const
Definition: MSEdge.cpp:1180
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.cpp:948
double getLength() const
return the length of the edge
Definition: MSEdge.h:630
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
Definition: MSEdge.h:662
void removeWaiting(const SUMOVehicle *vehicle) const
Removes a vehicle from the list of waiting vehicles.
Definition: MSEdge.cpp:1168
static bool gLefthand
Whether lefthand-drive is being simulated.
Definition: MSGlobals.h:136
void add(SUMOVehicle *veh)
Adds a single vehicle for departure.
MSEdge & getEdge() const
Returns the lane's edge.
Definition: MSLane.h:673
The simulated network and simulation perfomer.
Definition: MSNet.h:89
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:171
virtual MSTransportableControl & getContainerControl()
Returns the container control.
Definition: MSNet.cpp:995
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:371
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:313
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:424
virtual MSTransportableControl & getPersonControl()
Returns the person control.
Definition: MSNet.cpp:986
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
MSStage * clone() const
MSStoppingPlace * myOriginStop
the stop at which this ride starts (or nullptr)
const MSEdge * getEdge() const
Returns the current edge.
void loadState(MSTransportable *transportable, std::istringstream &state)
Reconstructs the current state.
void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous)
proceeds to this stage
std::string myVehicleID
cached vehicle data for output after the vehicle has been removed
virtual ~MSStageDriving()
destructor
Position myStopWaitPos
double myVehicleDistance
ConstMSEdgeVector getEdges() const
the edges of the current stage
std::string getWaitingDescription() const
Return where the person waits and for what.
const std::string setArrived(MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
marks arrival time and records driven distance
std::string myIntendedVehicleID
double getEdgePos(SUMOTime now) const
double getAngle(SUMOTime now) const
returns the angle of the transportable
const std::set< std::string > & getLines() const
bool unspecifiedArrivalPos() const
double getSpeed() const
the speed of the transportable
bool isWaitingFor(const SUMOVehicle *vehicle) const
Whether the person waits for the given vehicle.
Position getPosition(SUMOTime now) const
returns the position of the transportable
void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
const MSEdge * myOrigin
the origin edge
SUMOVehicleClass myVehicleVClass
std::string getStageDescription(const bool isPerson) const
return (brief) string representation of the current stage
void routeOutput(const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const
Called on writing vehroute output.
const MSEdge * getFromEdge() const
SUMOTime myWaitingSince
The time since which this person is waiting for a ride.
std::string myVehicleLine
void saveState(std::ostringstream &out)
Saves the current state into the given stream.
const MSEdge * myWaitingEdge
SUMOTime myIntendedDepart
std::string getStageSummary(const bool isPerson) const
return string summary of the current stage
void setVehicle(SUMOVehicle *v)
std::string myVehicleType
double getDistance() const
get travel distance in this stage
const std::set< std::string > myLines
the lines to choose from
SUMOTime getWaitingTime(SUMOTime now) const
time spent waiting for a ride
SUMOTime myTimeLoss
While driving, this is the timeLoss of the vehicle when the ride started, after arrival this is the t...
double getArrivalPos() const
return default value for undefined arrivalPos
SUMOVehicle * myVehicle
The taken vehicle.
void abort(MSTransportable *t)
abort this stage (TraCI)
MSStageDriving(const MSEdge *origin, const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines, const std::string &group="", const std::string &intendedVeh="", SUMOTime intendedDepart=-1)
constructor
virtual MSStoppingPlace * getOriginStop() const
returns the origin stop (if any). only needed for MSStageTrip
Definition: MSStage.h:85
const MSEdge * getDestination() const
returns the destination edge
Definition: MSStage.cpp:70
virtual double getEdgePos(SUMOTime now) const
Definition: MSStage.cpp:88
MSStoppingPlace * myDestinationStop
the stop to reach by getting transported (if any)
Definition: MSStage.h:221
const std::string myGroup
The id of the group of transportables traveling together.
Definition: MSStage.h:236
virtual const std::string setArrived(MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
logs end of the step
Definition: MSStage.cpp:131
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
Definition: MSStage.h:80
MSStageType getStageType() const
Definition: MSStage.h:114
SUMOTime myArrived
the time at which this stage ended
Definition: MSStage.h:230
double getEdgeAngle(const MSEdge *e, double at) const
get angle of the edge at a certain position
Definition: MSStage.cpp:153
virtual const MSEdge * getEdge() const
Returns the current edge.
Definition: MSStage.cpp:76
static const double ROADSIDE_OFFSET
the offset for computing positions when standing at an edge
Definition: MSStage.h:239
double myArrivalPos
the position at which we want to arrive
Definition: MSStage.h:224
Position getEdgePosition(const MSEdge *e, double at, double offset) const
get position on edge e at length at with orthogonal offset
Definition: MSStage.cpp:142
const MSEdge * myDestination
the next edge to reach by getting transported
Definition: MSStage.h:218
SUMOTime myDeparted
the time at which this stage started
Definition: MSStage.h:227
A lane area vehicles can halt at.
double getWaitingPositionOnLane(MSTransportable *t) const
Returns the lane position corresponding to getWaitPosition()
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
const MSLane & getLane() const
Returns the lane this stop is located at.
const std::string & getMyName() const
virtual Position getWaitPosition(MSTransportable *person) const
Returns the next free waiting place for pedestrians / containers.
void abortWaitingForVehicle(MSTransportable *t)
let the given transportable abort waiting for a vehicle (when removing stage via TraCI)
void addWaiting(const MSEdge *edge, MSTransportable *person)
adds a transportable to the list of transportables waiting for a vehicle on the specified edge
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
bool isPerson() const
Whether it is a person.
int getNumStages() const
Return the total number stages in this persons plan.
SUMOVehicle * getVehicle(const std::string &id) const
Returns the vehicle with the given id.
void unregisterOneWaiting(const bool isPerson)
decreases the count of vehicles waiting for a transport to allow recognition of person / container re...
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:77
double getAngle() const
Returns the vehicle's direction in radians.
Definition: MSVehicle.h:700
const std::string & getID() const
Returns the name of the vehicle type.
Definition: MSVehicleType.h:90
const std::string & getID() const
Returns the id.
Definition: Named.h:73
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:60
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:239
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:36
static const Position INVALID
used to indicate that a position is valid
Definition: Position.h:282
virtual double getSpeed() const =0
Returns the object's current speed.
virtual const MSVehicleType & getVehicleType() const =0
Returns the object's "vehicle" type.
virtual SUMOVehicleClass getVClass() const =0
Returns the object's access class.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
virtual const MSLane * getLane() const =0
Returns the lane the object is currently at.
virtual const MSEdge * getEdge() const =0
Returns the edge the object is currently at.
virtual double getPositionOnLane() const =0
Get the object's position along the lane.
Representation of a vehicle.
Definition: SUMOVehicle.h:58
virtual void removeTransportable(MSTransportable *t)=0
removes a person or container
virtual bool stopsAtEdge(const MSEdge *edge) const =0
Returns whether the vehicle stops at the given edge.
virtual SUMOTime getTimeLoss() const =0
virtual bool stopsAt(MSStoppingPlace *stop) const =0
Returns whether the vehicle stops at the given stopping place.
virtual bool hasDeparted() const =0
Returns whether this vehicle has departed.
virtual double getOdometer() const =0
Returns the distance that was already driven by this vehicle.
virtual void addTransportable(MSTransportable *transportable)=0
Adds a person or container to this vehicle.
virtual double getArrivalPos() const =0
Returns this vehicle's desired arrivalPos for its current route (may change on reroute)
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
std::string line
The vehicle's line (mainly for public transport)
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
#define M_PI
Definition: odrSpiral.cpp:40