20 #ifndef MSTransportable_h
21 #define MSTransportable_h
105 virtual bool isWaitingFor(
const std::string& line)
const;
187 const std::string&
getID()
const;
205 return (*myStep)->getDestination();
210 return (*(
myStep + 1))->getDestination();
215 return (*myStep)->getEdge();
220 return (*myStep)->getFromEdge();
240 return (*myStep)->getStageType();
245 return (*myStep)->getStageDescription();
269 return (*myStep)->isWaitingFor(line);
274 return (*myStep)->isWaiting4Vehicle();
void setArrived(SUMOTime now)
logs end of the step
void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
StageType getStageType() const
bool isWaiting4Vehicle() const
Whether the container waits for a vehicle.
const SUMOVehicleParameter & getParameter() const
virtual SUMOReal getWaitingSeconds() const
the time this container spent waiting in seconds
virtual const MSEdge * getEdge() const =0
Returns the current edge.
virtual SUMOReal getEdgePos(SUMOTime now) const =0
Stage & operator=(const Stage &)
Invalidated assignment operator.
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.
MSTransportablePlan::iterator myStep
the iterator over the route
virtual SUMOReal getAngle() const
return the current angle of the container
MSTransportable(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportablePlan *plan)
constructor
virtual SUMOReal getAngle(SUMOTime now) const =0
returns the angle of the transportable
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.
SUMOTime getDesiredDepart() const
Returns the desired departure time.
const SUMOVehicleParameter * myParameter
the plan of the container
bool myWriteEvents
Whether events shall be written.
const MSEdge & getDestination() const
returns the destination edge
A road/street connecting two junctions.
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a container
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
Stage(const MSEdge &destination, StageType type)
constructor
virtual SUMOReal getSpeed() const =0
the speed of the transportable
SUMOTime myArrived
the time at which this stage ended
const MSEdge * getEdge() const
Returns the current edge.
SUMOTime myDeparted
the time at which this stage started
void setDeparted(SUMOTime now)
logs depart time of the current stage
virtual void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)=0
proceeds to the next step
virtual bool isWaitingFor(const std::string &line) const
Whether the transportable waits for a vehicle of the line specified.
A point in 2D or 3D with translation and scaling methods.
const MSVehicleType * myVType
This container's type. (mainly used for drawing related information Note sure if it is really necessa...
StageType getCurrentStageType() const
the current stage type of the container
virtual ~MSTransportable()
destructor
virtual void routeOutput(OutputDevice &os) const =0
Called on writing vehroute output.
virtual std::string getStageDescription() const =0
return string representation of the current stage
const MSEdge & getDestination() const
Returns the current destination.
const MSEdge * getFromEdge() const
Returns the departure edge.
virtual SUMOReal getSpeed() const
the current speed of the container
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 &container, SUMOTime t, OutputDevice &os) const =0
Called for writing the events output (end of an action)
bool isWaitingFor(const std::string &line) const
Whether the container waits for a vehicle of the line specified.
const MSEdge & getNextDestination() const
Returns the destination after the current destination.
virtual Position getPosition() const
Return the Network coordinate of the container.
Static storage of an output device and its base (abstract) implementation.
void setDeparted(SUMOTime now)
logs end of the step
MSTransportablePlan * myPlan
the plan of the container
virtual void beginEventOutput(const MSTransportable &container, SUMOTime t, OutputDevice &os) const =0
Called for writing the events output (begin of an action)
virtual void tripInfoOutput(OutputDevice &os) const =0
Called on writing tripinfo output.
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
Representation of a lane in the micro simulation.
virtual const MSEdge * getFromEdge() const =0