Eclipse SUMO - Simulation of Urban MObility
MSContainer.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // The class for modelling container-movements
17 /****************************************************************************/
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <string>
26 #include <vector>
29 #include <utils/common/ToString.h>
30 #include <utils/geom/GeomHelper.h>
31 #include "MSNet.h"
32 #include "MSEdge.h"
33 #include "MSLane.h"
34 #include "MSContainer.h"
36 #include "MSTransportableControl.h"
37 #include "MSInsertionControl.h"
38 #include "MSVehicle.h"
39 #include "MSVehicleControl.h"
41 
42 // ===========================================================================
43 // method definitions
44 // ===========================================================================
45 /* -------------------------------------------------------------------------
46  * MSContainer::MSContainerStage_Driving - methods
47  * ----------------------------------------------------------------------- */
49  MSStoppingPlace* toStop, const double arrivalPos, const std::vector<std::string>& lines) :
50  MSTransportable::Stage_Driving(destination, toStop,
51  SUMOVehicleParameter::interpretEdgePos(
52  arrivalPos, destination->getLength(), SUMO_ATTR_ARRIVALPOS, "container getting transported to " + destination->getID()),
53  lines) {
54 }
55 
56 
58 
61  return new MSContainerStage_Driving(myDestination, myDestinationStop, myArrivalPos, std::vector<std::string>(myLines.begin(), myLines.end()));
62 }
63 
64 void
66  if (previous->getDestinationStop() != nullptr) {
67  // the arrival stop may have an access point
68  myWaitingEdge = &previous->getDestinationStop()->getLane().getEdge();
69  } else {
70  myWaitingEdge = previous->getEdge();
71  }
72  myWaitingPos = previous->getEdgePos(now);
73  myWaitingSince = now;
74  SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(container, myWaitingEdge, myWaitingPos);
75  if (availableVehicle != nullptr && availableVehicle->getParameter().departProcedure == DEPART_CONTAINER_TRIGGERED && !availableVehicle->hasDeparted()) {
76  setVehicle(availableVehicle);
77  myVehicle->addContainer(container);
78  net->getInsertionControl().add(myVehicle);
79  net->getVehicleControl().removeWaiting(myWaitingEdge, myVehicle);
81  } else {
82  net->getContainerControl().addWaiting(myWaitingEdge, container);
83  myWaitingEdge->addContainer(container);
84  }
85 }
86 
87 
88 std::string
90  return isWaiting4Vehicle() ? "waiting for " + joinToString(myLines, ",") : "transport";
91 }
92 
93 
94 std::string
96  const std::string dest = (getDestinationStop() == nullptr ?
97  " edge '" + getDestination()->getID() + "'" :
98  " stop '" + getDestinationStop()->getID() + "'");
99  return isWaiting4Vehicle() ?
100  "waiting for " + joinToString(myLines, ",") + " then transported to " + dest :
101  "transported to " + dest;
102 }
103 
104 
105 
106 void
109  const SUMOTime departed = myDeparted >= 0 ? myDeparted : now;
110  os.openTag("transport");
111  os.writeAttr("waitingTime", time2string(departed - myWaitingSince));
112  os.writeAttr("vehicle", myVehicleID);
113  os.writeAttr("depart", myDeparted >= 0 ? time2string(myDeparted) : "-1");
114  os.writeAttr("arrival", myArrived >= 0 ? time2string(myArrived) : "-1");
115  os.writeAttr("arrivalPos", toString(myArrivalPos));
116  os.writeAttr("duration", myArrived >= 0 ? time2string(myArrived - myDeparted) :
117  (myDeparted >= 0 ? time2string(now - myDeparted) : "-1"));
118  os.writeAttr("routeLength", myVehicleDistance);
119  os.closeTag();
120 }
121 
122 
123 void
124 MSContainer::MSContainerStage_Driving::routeOutput(OutputDevice& os, const bool withRouteLength) const {
126  os.writeAttr(SUMO_ATTR_LINES, myLines).closeTag();
127  if (withRouteLength) {
128  os.writeAttr("routeLength", myVehicleDistance);
129  }
130 }
131 
132 
133 
134 /* -------------------------------------------------------------------------
135  * MSContainer::MSContainerStage_Tranship - methods
136  * ----------------------------------------------------------------------- */
138  MSStoppingPlace* toStop,
139  double speed,
140  double departPos, double arrivalPos) :
141  MSTransportable::Stage(route.back(), toStop, SUMOVehicleParameter::interpretEdgePos(
142  arrivalPos, route.back()->getLength(), SUMO_ATTR_ARRIVALPOS,
143  "container getting transhipped to " + route.back()->getID()),
144  MOVING_WITHOUT_VEHICLE), myRoute(route),
145  mySpeed(speed), myContainerState(nullptr), myCurrentInternalEdge(nullptr) {
147  departPos, myRoute.front()->getLength(), SUMO_ATTR_DEPARTPOS,
148  "container getting transhipped from " + myRoute.front()->getID());
149 }
150 
152 }
153 
156  return new MSContainerStage_Tranship(myRoute, myDestinationStop, mySpeed, myDepartPos, myArrivalPos);
157 }
158 
159 void
161  myDeparted = now;
162  //MSCModel_NonInteracting moves the container straight from start to end in
163  //a single step and assumes that moveToNextEdge is only called once)
164  //therefor we define that the container is already on its destination edge
165  myRouteStep = myRoute.end() - 1;
166  myDepartPos = previous->getEdgePos(now);
167  myContainerState = MSCModel_NonInteracting::getModel()->add(container, this, now);
168  (*myRouteStep)->addContainer(container);
169 }
170 
171 const MSEdge*
173  if (myCurrentInternalEdge != nullptr) {
174  return myCurrentInternalEdge;
175  } else {
176  return *myRouteStep;
177  }
178 }
179 
180 const MSEdge*
182  return myRoute.front();
183 }
184 
185 const MSEdge*
187  return myRoute.back();
188 }
189 
190 double
192  return myContainerState->getEdgePos(*this, now);
193 }
194 
195 Position
197  return myContainerState->getPosition(*this, now);
198 }
199 
200 double
202  return myContainerState->getAngle(*this, now);
203 }
204 
205 SUMOTime
207  return 0;
208 }
209 
210 double
212  return myContainerState->getSpeed(*this);
213 }
214 
215 
218  return myRoute;
219 }
220 
221 double
223  if (myArrived >= 0) {
224  const SUMOTime duration = myArrived - myDeparted;
225  return mySpeed * STEPS2TIME(duration);
226  } else {
227  return -1;
228  }
229 }
230 
231 void
233  os.openTag("tranship");
234  os.writeAttr("depart", time2string(myDeparted));
235  os.writeAttr("departPos", myDepartPos);
236  os.writeAttr("arrival", time2string(myArrived));
237  os.writeAttr("arrivalPos", myArrivalPos);
238  os.writeAttr("duration", myArrived >= 0 ? time2string(myArrived - myDeparted) : "-1");
239  os.writeAttr("routeLength", getDistance());
240  os.writeAttr("maxSpeed", mySpeed);
241  os.closeTag();
242 }
243 
244 
245 void
247  os.openTag("tranship").writeAttr(SUMO_ATTR_EDGES, myRoute);
248  os.writeAttr(SUMO_ATTR_SPEED, mySpeed);
249  if (withRouteLength) {
250  os.writeAttr("routeLength", mySpeed * (myArrived - myDeparted));
251  }
252  os.closeTag();
253 }
254 
255 
256 void
258  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "departure")
259  .writeAttr("agent", c.getID()).writeAttr("link", myRoute.front()->getID()).closeTag();
260 }
261 
262 
263 void
265  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival")
266  .writeAttr("agent", c.getID()).writeAttr("link", myRoute.back()->getID()).closeTag();
267 }
268 
269 bool
271  ((MSEdge*)getEdge())->removeContainer(container);
272  if (myRouteStep == myRoute.end() - 1) {
273  if (myDestinationStop != nullptr) {
274  myDestinationStop->addTransportable(container); //jakob
275  }
276  if (!container->proceed(MSNet::getInstance(), currentTime)) {
278  }
279  return true;
280  } else {
281  if (nextInternal == nullptr) {
282  ++myRouteStep;
283  myCurrentInternalEdge = nullptr;
284  } else {
285  myCurrentInternalEdge = nextInternal;
286  }
287  ((MSEdge*) getEdge())->addContainer(container);
288  return false;
289  }
290 }
291 
292 std::string
294  const std::string dest = (getDestinationStop() == nullptr ?
295  " edge '" + getDestination()->getID() + "'" :
296  " stop '" + getDestinationStop()->getID() + "'");
297  return "transhipped to " + dest;
298 }
299 
300 /* -------------------------------------------------------------------------
301  * MSContainer - methods
302  * ----------------------------------------------------------------------- */
304  : MSTransportable(pars, vtype, plan) {
305 }
306 
307 
309 }
310 
311 
312 bool
314  Stage* prior = *myStep;
315  prior->setArrived(net, this, time);
316  // must be done before increasing myStep to avoid invalid state for rendering
317  prior->getEdge()->removeContainer(this);
318  myStep++;
319  if (myStep != myPlan->end()) {
320  (*myStep)->proceed(net, this, time, prior);
321  return true;
322  } else {
323  // cleanup
324  if (prior->getDestinationStop() != nullptr) {
325  prior->getDestinationStop()->removeTransportable(this);
326  }
327  return false;
328  }
329 }
330 
331 
332 void
334  os.openTag("containerinfo").writeAttr("id", getID()).writeAttr("depart", time2string(getDesiredDepart()));
335  for (MSTransportablePlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) {
336  (*i)->tripInfoOutput(os, this);
337  }
338  os.closeTag();
339 }
340 
341 
342 void
343 MSContainer::routeOutput(OutputDevice& os, const bool withRouteLength) const {
345  if (myStep == myPlan->end()) {
346  os.writeAttr("arrival", time2string(MSNet::getInstance()->getCurrentTimeStep()));
347  }
348  for (MSTransportablePlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) {
349  (*i)->routeOutput(os, withRouteLength);
350  }
351  os.closeTag();
352  os.lf();
353 }
354 
355 
356 /****************************************************************************/
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:66
MSStoppingPlace::getLane
const MSLane & getLane() const
Returns the lane this stop is located at.
Definition: MSStoppingPlace.cpp:58
MSContainer::MSContainerStage_Tranship::getWaitingTime
SUMOTime getWaitingTime(SUMOTime now) const
Returns the time the container spent waiting.
Definition: MSContainer.cpp:206
MSContainer::MSContainerStage_Driving::clone
Stage * clone() const
Definition: MSContainer.cpp:60
MSContainer::MSContainerStage_Driving::routeOutput
virtual void routeOutput(OutputDevice &os, const bool withRouteLength) const
Called on writing vehroute output.
Definition: MSContainer.cpp:124
ToString.h
SUMO_ATTR_DEPART
Definition: SUMOXMLDefinitions.h:432
MSStoppingPlace
A lane area vehicles can halt at.
Definition: MSStoppingPlace.h:60
MSTransportable::getDestination
const MSEdge * getDestination() const
Returns the current destination.
Definition: MSTransportable.h:618
MSNet.h
MSContainer::proceed
virtual bool proceed(MSNet *net, SUMOTime time)
Definition: MSContainer.cpp:313
SUMOVehicle::getParameter
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
OptionsCont.h
MSTransportable::Stage_Driving
Definition: MSTransportable.h:436
MSCModel_NonInteracting.h
MSNet::getContainerControl
virtual MSTransportableControl & getContainerControl()
Returns the container control.
Definition: MSNet.cpp:806
MSVehicleControl::removeWaiting
void removeWaiting(const MSEdge *const edge, const SUMOVehicle *vehicle)
Removes a vehicle from the list of waiting vehicles for the given edge.
Definition: MSVehicleControl.cpp:398
MSTransportableControl::erase
virtual void erase(MSTransportable *transportable)
removes a single transportable
Definition: MSTransportableControl.cpp:86
MSNet
The simulated network and simulation perfomer.
Definition: MSNet.h:92
MSNet::getInsertionControl
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:390
MSTransportable::Stage
Definition: MSTransportable.h:74
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:61
SUMO_ATTR_LINES
Definition: SUMOXMLDefinitions.h:773
ConstMSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:73
MSContainer::MSContainer
MSContainer(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportablePlan *plan)
constructor
Definition: MSContainer.cpp:303
SUMOVehicleParameter::departProcedure
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
Definition: SUMOVehicleParameter.h:479
MSStoppingPlace::removeTransportable
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
Definition: MSStoppingPlace.cpp:199
SUMO_ATTR_SPEED
Definition: SUMOXMLDefinitions.h:385
SUMO_ATTR_ARRIVALPOS
Definition: SUMOXMLDefinitions.h:438
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
MSTransportable::Stage::setArrived
virtual void setArrived(MSNet *net, MSTransportable *transportable, SUMOTime now)
logs end of the step
Definition: MSTransportable.cpp:114
MSTransportable::Stage::getEdgePos
virtual double getEdgePos(SUMOTime now) const
Definition: MSTransportable.cpp:76
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:291
MSEdge.h
MSContainer::MSContainerStage_Tranship::getSpeed
double getSpeed() const
Returns the speed of the container.
Definition: MSContainer.cpp:211
MSTransportable
Definition: MSTransportable.h:59
MSInsertionControl.h
MSTransportable::proceed
virtual bool proceed(MSNet *net, SUMOTime time)=0
SUMO_TAG_CONTAINER
Definition: SUMOXMLDefinitions.h:317
MSContainer::MSContainerStage_Driving::tripInfoOutput
virtual void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
Definition: MSContainer.cpp:107
MSVehicle.h
OutputDevice::closeTag
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Definition: OutputDevice.cpp:254
MSContainer::~MSContainer
virtual ~MSContainer()
destructor
Definition: MSContainer.cpp:308
MSTransportable::Stage::getEdge
virtual const MSEdge * getEdge() const
Returns the current edge.
Definition: MSTransportable.cpp:64
SUMO_ATTR_TO
Definition: SUMOXMLDefinitions.h:638
MSContainer::MSContainerStage_Tranship::myRoute
std::vector< const MSEdge * > myRoute
The route of the container.
Definition: MSContainer.h:210
MSContainer::MSContainerStage_Tranship::proceed
virtual void proceed(MSNet *net, MSTransportable *container, SUMOTime now, Stage *previous)
proceeds to the next step
Definition: MSContainer.cpp:160
OutputDevice::writeAttr
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:256
MSTransportable::getEdge
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSTransportable.h:628
MSContainer::MSContainerStage_Tranship::MSContainerStage_Tranship
MSContainerStage_Tranship(const std::vector< const MSEdge * > &route, MSStoppingPlace *toStop, double speed, double departPos, double arrivalPos)
constructor
Definition: MSContainer.cpp:137
MSTransportableControl.h
MSContainer::routeOutput
virtual void routeOutput(OutputDevice &os, const bool withRouteLength) const
Called on writing vehroute output.
Definition: MSContainer.cpp:343
MSContainer::MSContainerStage_Tranship::getFromEdge
const MSEdge * getFromEdge() const
Returns first edge of the containers route.
Definition: MSContainer.cpp:181
MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving
~MSContainerStage_Driving()
destructor
Definition: MSContainer.cpp:57
MSCModel_NonInteracting::add
CState * add(MSTransportable *container, MSContainer::MSContainerStage_Tranship *stage, SUMOTime now)
register the given container as a transhiped container
Definition: MSCModel_NonInteracting.cpp:71
MSNet::getCurrentTimeStep
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:284
STEPS2TIME
#define STEPS2TIME(x)
Definition: SUMOTime.h:57
SUMO_ATTR_EDGES
the edges of a route
Definition: SUMOXMLDefinitions.h:428
OutputDevice.h
MSContainer::MSContainerStage_Tranship::moveToNextEdge
bool moveToNextEdge(MSTransportable *container, SUMOTime currentTime, MSEdge *nextInternal=0)
move forward and return whether the container arrived
Definition: MSContainer.cpp:270
MSContainer::MSContainerStage_Driving::proceed
virtual void proceed(MSNet *net, MSTransportable *container, SUMOTime now, Stage *previous)
proceeds to the next step
Definition: MSContainer.cpp:65
MSContainer::tripInfoOutput
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSContainer.cpp:333
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
time2string
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:65
MSTransportable::isWaiting4Vehicle
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
Definition: MSTransportable.h:722
MSContainer::MSContainerStage_Driving::getStageDescription
std::string getStageDescription() const
returns the stage description as a string
Definition: MSContainer.cpp:89
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:76
MSInsertionControl::add
void add(SUMOVehicle *veh)
Adds a single vehicle for departure.
Definition: MSInsertionControl.cpp:71
MSContainer::MSContainerStage_Driving
Definition: MSContainer.h:70
MSContainer.h
MSEdge::removeContainer
virtual void removeContainer(MSTransportable *container) const
Remove container from myContainers.
Definition: MSEdge.h:626
MSContainer::MSContainerStage_Tranship::~MSContainerStage_Tranship
~MSContainerStage_Tranship()
destructor
Definition: MSContainer.cpp:151
SUMO_ATTR_FROM
Definition: SUMOXMLDefinitions.h:637
MSLane::getEdge
MSEdge & getEdge() const
Returns the lane's edge.
Definition: MSLane.h:670
MSContainer::MSContainerStage_Tranship::tripInfoOutput
virtual void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
Definition: MSContainer.cpp:232
MSContainer::MSContainerStage_Tranship::clone
Stage * clone() const
Definition: MSContainer.cpp:155
OutputDevice::openTag
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definition: OutputDevice.cpp:240
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
MSContainer::MSContainerStage_Tranship::myDepartPos
double myDepartPos
the depart position
Definition: MSContainer.h:216
MSContainer::MSContainerStage_Tranship::getEdges
ConstMSEdgeVector getEdges() const
the edges of the current stage
Definition: MSContainer.cpp:217
MSTransportable::MSTransportablePlan
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
Definition: MSTransportable.h:588
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:168
SUMOVehicle::hasDeparted
virtual bool hasDeparted() const =0
Returns whether this vehicle has departed.
MSTransportableControl::addWaiting
void addWaiting(const MSEdge *edge, MSTransportable *person)
adds a transportable to the list of transportables waiting for a vehicle on the specified edge
Definition: MSTransportableControl.cpp:146
MSContainer::MSContainerStage_Tranship::routeOutput
virtual void routeOutput(OutputDevice &os, const bool withRouteLength) const
Called on writing vehroute output.
Definition: MSContainer.cpp:246
MSTransportable::getDesiredDepart
SUMOTime getDesiredDepart() const
Returns the desired departure time.
Definition: MSTransportable.cpp:699
OutputDevice::lf
void lf()
writes a line feed if applicable
Definition: OutputDevice.h:234
MSTransportable::getID
const std::string & getID() const
returns the id of the transportable
Definition: MSTransportable.cpp:694
joinToString
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:247
MSContainer::MSContainerStage_Tranship::getEdgePos
double getEdgePos(SUMOTime now) const
Returns the offset from the start of the current edge measured in its natural direction.
Definition: MSContainer.cpp:191
MSContainer::MSContainerStage_Tranship::getDistance
double getDistance() const
get travel distance in this stage
Definition: MSContainer.cpp:222
config.h
MSContainer::MSContainerStage_Tranship::getStageSummary
std::string getStageSummary() const
return string summary of the current stage
Definition: MSContainer.cpp:293
MSTransportable::myStep
MSTransportablePlan::iterator myStep
the iterator over the route
Definition: MSTransportable.h:811
GeomHelper.h
MSTransportable::MOVING_WITHOUT_VEHICLE
Definition: MSTransportable.h:64
MSTransportable::Stage::getDestinationStop
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
Definition: MSTransportable.h:86
MSTransportable::myPlan
MSTransportablePlan * myPlan
the plan of the transportable
Definition: MSTransportable.h:808
SUMO_ATTR_DEPARTPOS
Definition: SUMOXMLDefinitions.h:434
MSContainer::MSContainerStage_Tranship
Definition: MSContainer.h:108
MSVehicleControl::getWaitingVehicle
SUMOVehicle * getWaitingVehicle(MSTransportable *transportable, const MSEdge *const edge, const double position)
Definition: MSVehicleControl.cpp:409
MSContainer::MSContainerStage_Tranship::getAngle
double getAngle(SUMOTime now) const
Returns the angle of the container.
Definition: MSContainer.cpp:201
MSTransportable::getFromEdge
const MSEdge * getFromEdge() const
Returns the departure edge.
Definition: MSTransportable.h:633
MSLane.h
MSContainer::MSContainerStage_Tranship::beginEventOutput
virtual void beginEventOutput(const MSTransportable &c, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSContainer.cpp:257
DEPART_CONTAINER_TRIGGERED
The departure is container triggered.
Definition: SUMOVehicleParameter.h:100
MSContainer::MSContainerStage_Tranship::getToEdge
const MSEdge * getToEdge() const
Returns last edge of the containers route.
Definition: MSContainer.cpp:186
MSStoppingPlace.h
MSVehicleControl.h
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:77
MSContainer::MSContainerStage_Driving::MSContainerStage_Driving
MSContainerStage_Driving(const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines)
constructor
Definition: MSContainer.cpp:48
SUMOVehicleParameter::interpretEdgePos
static double interpretEdgePos(double pos, double maximumValue, SumoXMLAttr attr, const std::string &id)
Interprets negative edge positions and fits them onto a given edge.
Definition: SUMOVehicleParameter.cpp:510
MSNet::getVehicleControl
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:337
MSCModel_NonInteracting::getModel
static MSCModel_NonInteracting * getModel()
Definition: MSCModel_NonInteracting.cpp:62
MSContainer::MSContainerStage_Driving::getStageSummary
std::string getStageSummary() const
return string summary of the current stage
Definition: MSContainer.cpp:95
MSVehicleControl::unregisterOneWaiting
void unregisterOneWaiting(const bool isPerson)
decreases the count of vehicles waiting for a transport to allow recognition of person / container re...
Definition: MSVehicleControl.h:441
MSContainer::MSContainerStage_Tranship::getPosition
Position getPosition(SUMOTime now) const
Returns the position of the container.
Definition: MSContainer.cpp:196
MSContainer::MSContainerStage_Tranship::endEventOutput
virtual void endEventOutput(const MSTransportable &c, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSContainer.cpp:264
MSContainer::MSContainerStage_Tranship::getEdge
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSContainer.cpp:172