SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
Data Structures | |
class | MSContainerStage |
class | MSContainerStage_Driving |
class | MSContainerStage_Tranship |
class | MSContainerStage_Waiting |
Public Types | |
typedef std::vector < MSContainerStage * > | MSContainerPlan |
the structure holding the plan of a container More... | |
enum | StageType { DRIVING = 0, WAITING = 1, TRANSHIP = 2 } |
Public Member Functions | |
virtual SUMOReal | getAngle () const |
return the current angle of the container More... | |
MSContainerStage * | getCurrentStage () const |
Return the current stage. More... | |
std::string | getCurrentStageDescription () const |
Returns the current stage description as a string. More... | |
StageType | getCurrentStageType () const |
the current stage type of the container More... | |
virtual MSContainerStop * | getDepartContainerStop () const |
SUMOTime | getDesiredDepart () const |
Returns the desired departure time. More... | |
const MSEdge & | getDestination () const |
Returns the current destination. More... | |
const MSEdge * | getEdge () const |
Returns the current edge. More... | |
virtual SUMOReal | getEdgePos () const |
Return the position on the edge. More... | |
const MSEdge * | getFromEdge () const |
Returns the departure edge. More... | |
const std::string & | getID () const |
returns the container id More... | |
const MSEdge & | getNextDestination () const |
Returns the destination after the current destination. More... | |
const SUMOVehicleParameter & | getParameter () const |
virtual Position | getPosition () const |
Return the Network coordinate of the container. More... | |
virtual SUMOReal | getSpeed () const |
the current speed of the container More... | |
const MSVehicleType & | getVehicleType () const |
virtual SUMOReal | getWaitingSeconds () const |
the time this container spent waiting in seconds More... | |
bool | isWaiting4Vehicle () const |
Whether the container waits for a vehicle. More... | |
bool | isWaitingFor (const std::string &line) const |
Whether the container waits for a vehicle of the line specified. More... | |
MSContainer (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSContainerPlan *plan) | |
constructor More... | |
bool | proceed (MSNet *net, SUMOTime time) |
void | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. More... | |
void | setDeparted (SUMOTime now) |
logs depart time of the current stage More... | |
void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
virtual | ~MSContainer () |
destructor More... | |
Data Fields | |
const MSEdge * | lastDestination |
the last destination of the route of the container More... | |
Static Public Attributes | |
static const SUMOReal | ROADSIDE_OFFSET |
the offset for computing container positions when standing at an edge More... | |
Protected Attributes | |
const SUMOVehicleParameter * | myParameter |
the plan of the container More... | |
MSContainerPlan * | myPlan |
the plan of the container More... | |
MSContainerPlan::iterator | myStep |
the iterator over the route More... | |
const MSVehicleType * | myVType |
This container's type. (mainly used for drawing related information Note sure if it is really necessary. More... | |
bool | myWriteEvents |
Whether events shall be written. More... | |
Private Member Functions | |
MSContainer (const MSContainer &) | |
Invalidated copy constructor. More... | |
MSContainer & | operator= (const MSContainer &) |
Invalidated assignment operator. More... | |
The class holds a simulated container together with its movement stages
Definition at line 69 of file MSContainer.h.
typedef std::vector<MSContainerStage*> MSContainer::MSContainerPlan |
the structure holding the plan of a container
Definition at line 553 of file MSContainer.h.
Enumerator | |
---|---|
DRIVING | |
WAITING | |
TRANSHIP |
Definition at line 71 of file MSContainer.h.
MSContainer::MSContainer | ( | const SUMOVehicleParameter * | pars, |
const MSVehicleType * | vtype, | ||
MSContainerPlan * | plan | ||
) |
constructor
Definition at line 470 of file MSContainer.cpp.
References getDestination(), lastDestination, myPlan, and myStep.
|
virtual |
|
private |
Invalidated copy constructor.
|
virtual |
return the current angle of the container
Reimplemented in GUIContainer.
Definition at line 525 of file MSContainer.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIContainer::getAngle(), and MSFCDExport::write().
|
inline |
Return the current stage.
Definition at line 641 of file MSContainer.h.
References myStep.
Referenced by MSEdge::container_by_position_sorter::operator()().
|
inline |
Returns the current stage description as a string.
Definition at line 636 of file MSContainer.h.
Referenced by GUIContainer::getParameterWindow().
|
inline |
the current stage type of the container
Definition at line 631 of file MSContainer.h.
Referenced by GUIContainer::getColorValue(), and GUIContainer::getPosition().
|
virtual |
Definition at line 540 of file MSContainer.cpp.
SUMOTime MSContainer::getDesiredDepart | ( | ) | const |
Returns the desired departure time.
Definition at line 505 of file MSContainer.cpp.
References SUMOVehicleParameter::depart, and myParameter.
Referenced by MSContainerControl::erase(), and routeOutput().
|
inline |
Returns the current destination.
Definition at line 596 of file MSContainer.h.
Referenced by GUIContainer::getParameterWindow(), MSContainer(), MSDevice_Container::notifyLeave(), MSDevice_Container::notifyMove(), MSContainer::MSContainerStage_Driving::routeOutput(), and MSContainer::MSContainerStage_Waiting::routeOutput().
|
inline |
Returns the current edge.
Definition at line 606 of file MSContainer.h.
Referenced by MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSContainer::MSContainerStage_Driving::getEdgePos(), GUIContainer::getParameterWindow(), GUIContainer::getPosition(), and MSContainer::MSContainerStage_Tranship::moveToNextEdge().
|
virtual |
Return the position on the edge.
Reimplemented in GUIContainer.
Definition at line 515 of file MSContainer.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIContainer::getEdgePos(), and MSFCDExport::write().
|
inline |
Returns the departure edge.
Definition at line 611 of file MSContainer.h.
Referenced by GUIContainer::getParameterWindow(), and MSContainer::MSContainerStage_Driving::routeOutput().
const std::string & MSContainer::getID | ( | ) | const |
returns the container id
Definition at line 485 of file MSContainer.cpp.
References SUMOVehicleParameter::id, and myParameter.
Referenced by MSContainerControl::abortWaiting(), MSVehicle::addContainer(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSContainerControl::erase(), GUIContainer::getParameterWindow(), MSDevice_Container::notifyLeave(), MSEdge::container_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::MSContainerStage_Waiting::routeOutput(), MSContainerControl::setTranship(), MSContainerControl::unsetTranship(), and MSFCDExport::write().
|
inline |
Returns the destination after the current destination.
Definition at line 601 of file MSContainer.h.
|
inline |
Definition at line 677 of file MSContainer.h.
References myParameter.
Referenced by GUIContainer::setFunctionalColor().
|
virtual |
Return the Network coordinate of the container.
Reimplemented in GUIContainer.
Definition at line 520 of file MSContainer.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIContainer::getPosition(), and MSFCDExport::write().
|
virtual |
the current speed of the container
Reimplemented in GUIContainer.
Definition at line 535 of file MSContainer.cpp.
Referenced by GUIContainer::getSpeed(), and MSFCDExport::write().
|
inline |
Definition at line 681 of file MSContainer.h.
References myVType.
Referenced by GUIContainer::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsPoly(), and GUIContainer::setFunctionalColor().
|
virtual |
the time this container spent waiting in seconds
Reimplemented in GUIContainer.
Definition at line 530 of file MSContainer.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and STEPS2TIME.
Referenced by GUIContainer::getWaitingSeconds().
|
inline |
Whether the container waits for a vehicle.
Definition at line 673 of file MSContainer.h.
Referenced by GUIContainer::getColorValue(), GUIContainer::getPosition(), MSContainer::MSContainerStage_Driving::getStageDescription(), and MSContainer::MSContainerStage_Driving::getWaitingTime().
|
inline |
Whether the container waits for a vehicle of the line specified.
Definition at line 668 of file MSContainer.h.
|
private |
Invalidated assignment operator.
Definition at line 490 of file MSContainer.cpp.
References myPlan, myStep, MSEdge::removeContainer(), and SUMOReal.
Referenced by MSContainer::MSContainerStage_Tranship::moveToNextEdge(), MSDevice_Container::notifyLeave(), and MSDevice_Container::notifyMove().
void MSContainer::routeOutput | ( | OutputDevice & | os | ) | const |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Definition at line 552 of file MSContainer.cpp.
References getDesiredDepart(), MSContainer::MSContainerStage_Waiting::getUntil(), myPlan, and WAITING.
Referenced by MSContainerControl::erase().
void MSContainer::setDeparted | ( | SUMOTime | now | ) |
logs depart time of the current stage
Definition at line 510 of file MSContainer.cpp.
void MSContainer::tripInfoOutput | ( | OutputDevice & | os | ) | const |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Definition at line 545 of file MSContainer.cpp.
References myPlan.
Referenced by MSContainerControl::erase().
const MSEdge* MSContainer::lastDestination |
the last destination of the route of the container
Definition at line 556 of file MSContainer.h.
Referenced by MSContainer().
|
protected |
the plan of the container
Definition at line 560 of file MSContainer.h.
Referenced by getDesiredDepart(), getID(), getParameter(), and ~MSContainer().
|
protected |
the plan of the container
Definition at line 567 of file MSContainer.h.
Referenced by MSContainer(), proceed(), routeOutput(), tripInfoOutput(), and ~MSContainer().
|
protected |
the iterator over the route
Definition at line 570 of file MSContainer.h.
Referenced by getCurrentStage(), MSContainer(), and proceed().
|
protected |
This container's type. (mainly used for drawing related information Note sure if it is really necessary.
Definition at line 564 of file MSContainer.h.
Referenced by getVehicleType().
|
protected |
Whether events shall be written.
Definition at line 573 of file MSContainer.h.
|
static |
the offset for computing container positions when standing at an edge
Definition at line 78 of file MSContainer.h.
Referenced by MSContainer::MSContainerStage_Driving::getPosition(), and MSContainer::MSContainerStage_Waiting::getPosition().