20 #ifndef MSTransportable_h
21 #define MSTransportable_h
120 virtual bool isWaitingFor(
const std::string& line)
const;
206 SUMOReal pos,
const std::string& actType,
const bool initial);
289 const SUMOReal arrivalPos,
const std::vector<std::string>& lines);
372 const std::string&
getID()
const;
390 return (*myStep)->getDestination();
395 return (*(
myStep + 1))->getDestination();
400 return (*myStep)->getEdge();
405 return (*myStep)->getFromEdge();
425 return (*myStep)->getStageType();
430 return (*myStep)->getStageDescription();
454 return (*myStep)->isWaitingFor(line);
459 return (*myStep)->isWaiting4Vehicle();
464 return (*myStep)->getVehicle();
virtual void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)
proceeds to the next step
bool isWaitingFor(const std::string &line) const
Whether the person waits for a vehicle of the line specified.
void setArrived(SUMOTime now)
logs end of the step
virtual void tripInfoOutput(OutputDevice &os) const =0
Called on writing tripinfo output.
std::string myActType
The type of activity.
virtual void beginEventOutput(const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0
Called for writing the events output (begin of an action)
SUMOReal getSpeed() const
the speed of the transportable
StageType getStageType() const
A lane area vehicles can halt at.
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
Stage(const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, StageType type)
constructor
const SUMOVehicleParameter & getParameter() const
virtual SUMOReal getWaitingSeconds() const
the time this transportable spent waiting in seconds
virtual const MSEdge * getEdge() const =0
Returns the current edge.
const MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
SUMOTime getUntil() const
SUMOReal getAngle(SUMOTime now) const
returns the angle of the transportable
virtual SUMOReal getEdgePos(SUMOTime now) const =0
SUMOVehicle * getVehicle() const
The vehicle associated with this transportable.
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
Stage & operator=(const Stage &)
Invalidated assignment operator.
const std::set< std::string > myLines
the lines to choose from
const std::string & getID() const
returns the id of the transportable
MSTransportable & operator=(const MSTransportable &)
Invalidated assignment operator.
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
virtual bool proceed(MSNet *net, SUMOTime time)=0
virtual bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
virtual SUMOReal getEdgePos() const
Return the position on the edge.
SUMOReal getAngle(SUMOTime now) const
returns the angle of the transportable
MSTransportablePlan::iterator myStep
the iterator over the route
virtual SUMOReal getAngle() const
return the current angle of the transportable
SUMOVehicle * getVehicle() const
The vehicle the person is riding or 0.
MSTransportable(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportablePlan *plan)
constructor
virtual SUMOReal getAngle(SUMOTime now) const =0
returns the angle of the transportable
Stage_Driving & operator=(const Stage_Driving &)
Invalidated assignment operator.
SUMOReal getEdgeAngle(const MSEdge *e, SUMOReal at) const
get angle of the edge at a certain position
The simulated network and simulation perfomer.
The car-following model and parameter.
virtual SUMOVehicle * getVehicle() const
Whether the transportable waits for a vehicle.
SUMOTime getDesiredDepart() const
Returns the desired departure time.
const SUMOVehicleParameter * myParameter
the plan of the transportable
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
bool myWriteEvents
Whether events shall be written.
const MSEdge & getDestination() const
returns the destination edge
SUMOTime myWaitingSince
The time since which this person is waiting for a ride.
Stage_Driving(const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, const std::vector< std::string > &lines)
constructor
const MSEdge * getFromEdge() const
A road/street connecting two junctions.
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
Position getLanePosition(const MSLane *lane, SUMOReal at, SUMOReal offset) const
get position on lane at length at with orthogonal offset
virtual Position getPosition(SUMOTime now) const =0
returns the position of the transportable
Position getEdgePosition(const MSEdge *e, SUMOReal at, SUMOReal offset) const
get position on edge e at length at with orthogonal offset
const MSVehicleType & getVehicleType() const
virtual SUMOReal getSpeed() const =0
the speed of the transportable
SUMOTime myArrived
the time at which this stage ended
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
const MSEdge * getEdge() const
Returns the current edge.
SUMOTime myDeparted
the time at which this stage started
static const SUMOReal ROADSIDE_OFFSET
the offset for computing positions when standing at an edge
void setDeparted(SUMOTime now)
logs depart time of the current stage
Representation of a vehicle.
virtual bool isWaitingFor(const std::string &line) const
Whether the transportable waits for a vehicle of the line specified.
MSStoppingPlace *const myDestinationStop
the stop to reach by getting transported (if any)
SUMOReal getEdgePos(SUMOTime now) const
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
A point in 2D or 3D with translation and scaling methods.
const MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
void setVehicle(SUMOVehicle *v)
const MSEdge * getEdge() const
Returns the current edge.
StageType getCurrentStageType() const
the current stage type of the transportable
virtual void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)=0
proceeds to the next step
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
virtual ~MSTransportable()
destructor
SUMOReal myArrivalPos
the position at which we want to arrive
virtual void routeOutput(OutputDevice &os) const =0
Called on writing vehroute output.
Stage_Waiting(const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType, const bool initial)
constructor
Position getPosition(SUMOTime now) const
returns the position of the transportable
virtual ~Stage_Driving()
destructor
SUMOTime myWaitingUntil
the time until the person is waiting
SUMOVehicle * myVehicle
The taken vehicle.
virtual std::string getStageDescription() const =0
return string representation of the current stage
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
std::string getStageDescription() const
return string representation of the current stage
const MSEdge & getDestination() const
Returns the current destination.
SUMOTime getWaitingTime(SUMOTime now) const
time spent waiting for a ride
SUMOReal getEdgePos(SUMOTime now) const
Stage_Waiting & operator=(const Stage_Waiting &)
Invalidated assignment operator.
const MSEdge * getFromEdge() const
Returns the departure edge.
virtual SUMOReal getSpeed() const
the current speed of the transportable
StageType myType
The type of this stage.
Structure representing possible vehicle parameter.
virtual SUMOTime getWaitingTime(SUMOTime now) const =0
the time this transportable spent waiting
virtual void endEventOutput(const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0
Called for writing the events output (end of an action)
SUMOReal getSpeed() const
the speed of the transportable
SUMOReal getArrivalPos() const
bool isWaitingFor(const std::string &line) const
Whether the transportable waits for a vehicle of the line specified.
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
const MSEdge * getFromEdge() const
const MSEdge & getNextDestination() const
Returns the destination after the current destination.
virtual Position getPosition() const
Return the Network coordinate of the transportable.
Static storage of an output device and its base (abstract) implementation.
void setDeparted(SUMOTime now)
logs end of the step
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
MSTransportablePlan * myPlan
the plan of the transportable
virtual ~Stage_Waiting()
destructor
virtual void tripInfoOutput(OutputDevice &os) const =0
Called on writing tripinfo output.
Position getPosition(SUMOTime now) const
returns the position of the transportable
const MSEdge * myWaitingEdge
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
virtual ~Stage()
destructor
virtual void routeOutput(OutputDevice &os) const =0
Called on writing vehroute output.
const MSEdge & myDestination
the next edge to reach by getting transported
const MSEdge * getEdge() const
Returns the current edge.
Representation of a lane in the micro simulation.
SUMOTime myWaitingDuration
the time the person is waiting
SUMOTime myWaitingStart
the time the person is waiting
virtual const MSEdge * getFromEdge() const =0