126 void setID(
const std::string& newID);
137 std::mt19937*
getRNG()
const;
147 return (*myStep)->getDestination();
152 return (*(
myStep + 1))->getDestination();
157 return (*myStep)->getEdge();
162 return (*myStep)->getLane();
167 return (*myStep)->getFromEdge();
192 return (*myStep)->getStageType();
197 assert(
myStep + next < myPlan->end());
199 return (*(
myStep + next))->getStageType();
207 return (*myStep)->getStageDescription(
myAmPerson);
218 assert(
myStep + next < myPlan->end());
224 assert(
myStep + next < myPlan->end());
226 return (*(
myStep + next))->getEdges();
251 return (*myStep)->isWaitingFor(vehicle);
256 return (*myStep)->isWaiting4Vehicle();
261 return (*myStep)->getVehicle();
275 return myPlan->back()->getArrivalPos();
280 return myPlan->back()->getEdges().back();
322 inline const std::vector<MSTransportableDevice*>&
getDevices()
const {
332 void loadState(
const std::string& state);
std::vector< const MSEdge * > ConstMSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
#define UNUSED_PARAMETER(x)
A road/street connecting two junctions.
Representation of a lane in the micro simulation.
The simulated network and simulation perfomer.
A lane area vehicles can halt at.
Abstract in-person device.
double getChosenSpeedFactor() const
virtual double getEdgePos() const
Return the position on the edge.
bool hasDeparted() const
return whether the transportable has started it's plan
SUMOVehicleClass getVClass() const
Returns the object's access class.
SUMOTime getWaitingTime() const
const MSEdge * getArrivalEdge() const
returns the final arrival edge
double getAcceleration() const
Returns the object's acceleration.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
MSTransportable & operator=(const MSTransportable &)
Invalidated assignment operator.
virtual double getAngle() const
return the current angle of the transportable
MSStageType getStageType(int next) const
the stage type for the nth next stage
bool myWriteEvents
Whether events shall be written.
void routeOutput(OutputDevice &os, const bool withRouteLength) const
Called on writing vehroute output.
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
virtual double getSpeed() const
the current speed of the transportable
PositionVector getBoundingBox() const
return the bounding box of the person
std::string getStageSummary(int stageIndex) const
return textual summary for the given stage
double getBackPositionOnLane(const MSLane *) const
Get the object's back position along the given lane.
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
MSTransportableDevice * getDevice(const std::type_info &type) const
Returns a device of the given type if it exists or 0.
void setDeparted(SUMOTime now)
logs depart time of the current stage
void setSpeed(double speed)
sets the walking speed (ignored in other stages)
virtual bool proceed(MSNet *net, SUMOTime time, const bool vehicleArrived=false)
MSTransportablePlan::iterator myStep
the iterator over the route
MSTransportablePlan * myPlan
the plan of the transportable
bool isStopped() const
Returns whether the object is at a stop.
MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
const MSVehicleType & getVehicleType() const
Returns the object's "vehicle" type.
bool isPerson() const
Whether it is a person.
virtual Position getPosition() const
Return the Network coordinate of the transportable.
const SUMOVehicleParameter * myParameter
the plan of the transportable
double getPreviousSpeed() const
Returns the object's previous speed.
std::mt19937 * getRNG() const
returns the associated RNG
ConstMSEdgeVector getEdges(int next) const
Return the edges of the nth next stage.
Position getPosition(const double) const
Return current position (x/y, cartesian)
double getArrivalPos() const
returns the final arrival pos
double getPositionOnLane() const
Get the object's position along the lane.
const MSEdge * getNextDestination() const
Returns the destination after the current destination.
void saveState(OutputDevice &out)
Saves the current state into the given stream.
const MSEdge * getFromEdge() const
Returns the departure edge.
bool isContainer() const
Whether it is a container.
void removeStage(int next)
removes the nth next stage
virtual ~MSTransportable()
destructor
int getNumStages() const
Return the total number stages in this persons plan.
MSStageType getCurrentStageType() const
the current stage type of the transportable
void rerouteParkingArea(MSStoppingPlace *orig, MSStoppingPlace *replacement)
adapt plan when the vehicle reroutes and now stops at replacement instead of orig
const MSEdge * getEdge() const
Returns the current edge.
void loadState(const std::string &state)
Reconstructs the current state.
MSStage * getCurrentStage() const
Return the current stage.
std::vector< MSTransportableDevice * > myDevices
The devices this transportable has.
MSStage * getNextStage(int next) const
Return the current stage.
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
MSTransportable(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportablePlan *plan, const bool isPerson)
constructor
bool hasArrived() const
return whether the person has reached the end of its plan
double getSlope() const
Returns the slope of the road at object's position in degrees.
void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
void appendStage(MSStage *stage, int next=-1)
Appends the given stage to the current plan.
const MSLane * getLane() const
Returns the current lane (may be nullptr)
MSTransportable(const MSTransportable &)
Invalidated copy constructor.
MSVehicleType & getSingularType()
Replaces the current vehicle type with a new one used by this vehicle only.
const std::vector< MSTransportableDevice * > & getDevices() const
Returns this vehicle's devices.
SUMOVehicle * getVehicle() const
The vehicle associated with this transportable.
virtual void checkAccess(const MSStage *const prior, const bool isDisembark=true)
std::vector< MSStage * > MSTransportablePlan
the structure holding the plan of a transportable
const MSEdge * getDestination() const
Returns the current destination.
void setID(const std::string &newID)
set the id (inherited from Named but forbidden for transportables)
virtual double getSpeedFactor() const
the current speed factor of the transportable (where applicable)
void replaceVehicleType(MSVehicleType *type)
Replaces the current vehicle type by the one given.
bool isWaitingFor(const SUMOVehicle *vehicle) const
Whether the transportable waits for the given vehicle in the current step.
SUMOTime getDesiredDepart() const
Returns the desired departure time.
double getMaxSpeed() const
Returns the object's maximum speed.
The car-following model and parameter.
Static storage of an output device and its base (abstract) implementation.
A point in 2D or 3D with translation and scaling methods.
Representation of a vehicle, person, or container.
Representation of a vehicle.
Structure representing possible vehicle parameter.