SUMO - Simulation of Urban MObility
|
GUI-version of the container control for building gui containers. More...
#include <GUIContainerControl.h>
Public Types | |
typedef std::vector < MSContainer * > | ContainerVector |
Public Member Functions | |
void | abortWaiting () |
aborts the plan for any container that is still waiting for a ride More... | |
bool | add (const std::string &id, MSContainer *container) |
adds a single container, returns false if an id clash occured More... | |
void | addWaiting (const MSEdge *edge, MSContainer *container) |
adds a container to the list of containers waiting for a vehicle on the specified edge More... | |
virtual MSContainer * | buildContainer (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSContainer::MSContainerPlan *plan) const |
Builds a new container. More... | |
void | checkWaitingContainers (MSNet *net, const SUMOTime time) |
checks whether any containers waiting time is over More... | |
virtual void | erase (MSContainer *container) |
removes a single container More... | |
GUIContainerControl () | |
constructor More... | |
bool | hasContainers () const |
checks whether any container waits to finish her plan More... | |
bool | hasNonWaiting () const |
checks whether any container is still engaged in walking / stopping More... | |
bool | loadAnyWaiting (MSEdge *edge, MSVehicle *vehicle, MSVehicle::Stop *stop) |
load any applicable containers Loads any container that is waiting on that edge for the given vehicle and removes them from myWaiting More... | |
void | setDeparture (SUMOTime time, MSContainer *container) |
sets the arrival time for a waiting container More... | |
void | setTranship (MSContainer *c) |
adds a container to myTranship More... | |
void | setWaitEnd (SUMOTime time, MSContainer *container) |
sets the arrival time for a waiting container More... | |
void | unsetTranship (MSContainer *c) |
removes a container from myTranship More... | |
virtual | ~GUIContainerControl () |
destructor More... | |
GUI-version of the container control for building gui containers.
Definition at line 44 of file GUIContainerControl.h.
|
inherited |
Definition at line 60 of file MSContainerControl.h.
GUIContainerControl::GUIContainerControl | ( | ) |
constructor
Definition at line 46 of file GUIContainerControl.cpp.
|
virtual |
destructor
Definition at line 49 of file GUIContainerControl.cpp.
|
inherited |
aborts the plan for any container that is still waiting for a ride
Definition at line 220 of file MSContainerControl.cpp.
References MSContainerControl::erase(), MSContainer::getID(), MSContainerControl::myWaiting4Vehicle, MSEdge::removeContainer(), and WRITE_WARNING.
Referenced by MSNet::simulationState().
|
inherited |
adds a single container, returns false if an id clash occured
Definition at line 63 of file MSContainerControl.cpp.
References MSContainerControl::myContainers.
|
inherited |
adds a container to the list of containers waiting for a vehicle on the specified edge
Definition at line 142 of file MSContainerControl.cpp.
References MSContainerControl::myWaiting4Vehicle.
Referenced by MSContainer::MSContainerStage_Driving::proceed().
|
virtual |
Builds a new container.
[in] | pars | The parameter |
[in] | vtype | The type (reusing vehicle type container here) |
[in] | plan | This container's plan |
Reimplemented from MSContainerControl.
Definition at line 54 of file GUIContainerControl.cpp.
checks whether any containers waiting time is over
Definition at line 117 of file MSContainerControl.cpp.
References MSContainerControl::erase(), MSContainerControl::myWaiting4Departure, and MSContainerControl::myWaitingUntil.
Referenced by MSNet::simulationStep().
|
virtualinherited |
removes a single container
Definition at line 73 of file MSContainerControl.cpp.
References OutputDevice::closeTag(), MSContainer::getDesiredDepart(), OutputDevice::getDeviceByOption(), MSContainer::getID(), MSNet::getInstance(), OptionsCont::getOptions(), MSContainerControl::myContainers, OutputDevice::openTag(), MSContainer::routeOutput(), time2string(), MSContainer::tripInfoOutput(), and OutputDevice::writeAttr().
Referenced by MSContainerControl::abortWaiting(), MSContainerControl::checkWaitingContainers(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), MSDevice_Container::notifyLeave(), and MSDevice_Container::notifyMove().
|
inherited |
checks whether any container waits to finish her plan
Definition at line 193 of file MSContainerControl.cpp.
References MSContainerControl::myContainers.
|
inherited |
checks whether any container is still engaged in walking / stopping
Definition at line 199 of file MSContainerControl.cpp.
References MSContainerControl::myTranship, MSContainerControl::myWaiting4Departure, and MSContainerControl::myWaitingUntil.
Referenced by MSNet::simulationState().
|
inherited |
load any applicable containers Loads any container that is waiting on that edge for the given vehicle and removes them from myWaiting
[in] | the | edge on which the loading should take place |
[in] | the | vehicle which is taking on containers |
Definition at line 157 of file MSContainerControl.cpp.
References MSVehicle::addContainer(), MSVehicle::Stop::duration, MSVehicle::Stop::endPos, MSVehicleType::getContainerCapacity(), MSVehicle::getContainerNumber(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSVehicleType::getLoadingDuration(), MSBaseVehicle::getParameter(), MSBaseVehicle::getVehicleType(), SUMOVehicleParameter::id, SUMOVehicleParameter::line, MSContainerControl::myWaiting4Vehicle, MSEdge::removeContainer(), MSVehicle::Stop::startPos, and MSVehicle::Stop::timeToLoadNextContainer.
Referenced by MSVehicle::processNextStop().
|
inherited |
sets the arrival time for a waiting container
Definition at line 97 of file MSContainerControl.cpp.
References DELTA_T, and MSContainerControl::myWaiting4Departure.
Referenced by MSRouteHandler::closeContainer().
|
inherited |
adds a container to myTranship
Definition at line 205 of file MSContainerControl.cpp.
References MSContainer::getID(), and MSContainerControl::myTranship.
Referenced by MSContainer::MSContainerStage_Tranship::proceed().
|
inherited |
sets the arrival time for a waiting container
Definition at line 107 of file MSContainerControl.cpp.
References DELTA_T, and MSContainerControl::myWaitingUntil.
Referenced by MSContainer::MSContainerStage_Waiting::proceed().
|
inherited |
removes a container from myTranship
Definition at line 211 of file MSContainerControl.cpp.
References MSContainer::getID(), and MSContainerControl::myTranship.
Referenced by MSContainer::MSContainerStage_Tranship::moveToNextEdge().