![]() |
Eclipse SUMO - Simulation of Urban MObility
|
GUI-version of the transportable control for building gui persons and containers. More...
#include <GUITransportableControl.h>
Public Types | |
| typedef std::map< std::string, MSTransportable * >::const_iterator | constVehIt |
| Definition of the internal transportables map iterator. More... | |
| typedef std::vector< MSTransportable * > | TransportableVector |
| Definition of a list of transportables. More... | |
Public Member Functions | |
| void | abortAnyWaitingForVehicle () |
| aborts the plan for any transportable that is still waiting for a ride More... | |
| void | abortWaiting (MSTransportable *t) |
| aborts waiting stage of transportable More... | |
| void | abortWaitingForVehicle (MSTransportable *t) |
| let the given transportable abort waiting for a vehicle (when removing stage via TraCI) More... | |
| bool | add (MSTransportable *transportable) |
| Adds a single transportable, returns false if an id clash occurred. More... | |
| void | addWaiting (const MSEdge *edge, MSTransportable *person) |
| adds a transportable to the list of transportables waiting for a vehicle on the specified edge More... | |
| bool | boardAnyWaiting (MSEdge *edge, SUMOVehicle *vehicle, const SUMOVehicleParameter::Stop &stop, SUMOTime &timeToBoardNextPerson, SUMOTime &stopDuration) |
| board any applicable persons Boards any people who wait on that edge for the given vehicle and removes them from myWaiting More... | |
| virtual MSTransportable * | buildContainer (const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan) const |
| Builds a new container. More... | |
| virtual MSTransportable * | buildPerson (const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, std::mt19937 *rng) const |
| Builds a new person. More... | |
| void | checkWaiting (MSNet *net, const SUMOTime time) |
| checks whether any transportables waiting time is over More... | |
| virtual void | erase (MSTransportable *transportable) |
| removes a single transportable More... | |
| MSTransportable * | get (const std::string &id) const |
| Returns the named transportable, if existing. More... | |
| int | getActiveCount () |
| return the number of active transportable objects More... | |
| GUITransportableControl () | |
| constructor More... | |
| bool | hasNonWaiting () const |
| checks whether any transportable is still engaged in walking / stopping More... | |
| bool | hasTransportables () const |
| checks whether any transportable waits to finish her plan More... | |
| void | insertPersonIDs (std::vector< GUIGlID > &into) |
| Returns the list of all known persons by gl-id. More... | |
| bool | loadAnyWaiting (MSEdge *edge, SUMOVehicle *vehicle, const SUMOVehicleParameter::Stop &stop, SUMOTime &timeToLoadNextContainer, SUMOTime &stopDuration) |
| load any applicable containers Loads any container that is waiting on that edge for the given vehicle and removes them from myWaiting More... | |
| constVehIt | loadedBegin () const |
| Returns the begin of the internal transportables map. More... | |
| constVehIt | loadedEnd () const |
| Returns the end of the internal transportables map. More... | |
| void | registerJammed () |
| register a jammed transportable More... | |
| void | setWaitEnd (SUMOTime time, MSTransportable *transportable) |
| sets the arrival time for a waiting transportable More... | |
| int | size () const |
| Returns the number of known transportables. More... | |
| virtual | ~GUITransportableControl () |
| destructor More... | |
Retrieval of transportable statistics (always accessable) | |
| int | getLoadedNumber () const |
| Returns the number of build transportables. More... | |
| int | getRunningNumber () const |
| Returns the number of build and inserted, but not yet deleted transportables. More... | |
| int | getJammedNumber () const |
| Returns the number of times a transportables was jammed. More... | |
| int | getWaitingForVehicleNumber () const |
| Returns the number of vehicles waiting for a ride. More... | |
Protected Attributes | |
| bool | myHaveNewWaiting |
| whether a new transportable waiting for a vehicle has been added in the last step More... | |
| int | myJammedNumber |
| The number of jammed transportables. More... | |
| int | myLoadedNumber |
| The number of build transportables. More... | |
| int | myRunningNumber |
| The number of transportables within the network (build and inserted but not removed) More... | |
| std::map< std::string, MSTransportable * > | myTransportables |
| all currently created transportables by id More... | |
| std::map< SUMOTime, TransportableVector > | myWaiting4Departure |
| Transportables waiting for departure. More... | |
| std::map< const MSEdge *, TransportableVector > | myWaiting4Vehicle |
| the lists of waiting transportables More... | |
| int | myWaitingForVehicleNumber |
| The number of transportables waiting for vehicles. More... | |
| std::map< SUMOTime, TransportableVector > | myWaitingUntil |
| the lists of walking / stopping transportables More... | |
GUI-version of the transportable control for building gui persons and containers.
Definition at line 37 of file GUITransportableControl.h.
|
inherited |
Definition of the internal transportables map iterator.
Definition at line 57 of file MSTransportableControl.h.
|
inherited |
Definition of a list of transportables.
Definition at line 54 of file MSTransportableControl.h.
| GUITransportableControl::GUITransportableControl | ( | ) |
constructor
Definition at line 36 of file GUITransportableControl.cpp.
|
virtual |
destructor
Definition at line 39 of file GUITransportableControl.cpp.
|
inherited |
aborts the plan for any transportable that is still waiting for a ride
Definition at line 255 of file MSTransportableControl.cpp.
References MSTransportableControl::erase(), MSTransportable::getCurrentStage(), MSTransportable::getID(), MSTransportable::Stage_Driving::getWaitingDescription(), MSTransportableControl::myWaiting4Vehicle, MSEdge::removeContainer(), MSEdge::removePerson(), and WRITE_WARNING.
Referenced by MSNet::simulationState().
|
inherited |
aborts waiting stage of transportable
Definition at line 291 of file MSTransportableControl.cpp.
References MSTransportableControl::myWaiting4Departure, and MSTransportableControl::myWaitingUntil.
Referenced by MSTransportable::Stage_Waiting::abort().
|
inherited |
let the given transportable abort waiting for a vehicle (when removing stage via TraCI)
Definition at line 278 of file MSTransportableControl.cpp.
References MSTransportable::getEdge(), and MSTransportableControl::myWaiting4Vehicle.
Referenced by MSTransportable::Stage_Driving::abort().
|
inherited |
Adds a single transportable, returns false if an id clash occurred.
| [in] | transportable | The transportable to add |
Definition at line 61 of file MSTransportableControl.cpp.
References DELTA_T, SUMOVehicleParameter::depart, MSTransportable::getParameter(), SUMOVehicleParameter::id, MSTransportableControl::myLoadedNumber, MSTransportableControl::myTransportables, and MSTransportableControl::myWaiting4Departure.
Referenced by libsumo::Person::add().
|
inherited |
adds a transportable to the list of transportables waiting for a vehicle on the specified edge
Definition at line 145 of file MSTransportableControl.cpp.
References MSTransportableControl::myHaveNewWaiting, MSTransportableControl::myWaiting4Vehicle, and MSTransportableControl::myWaitingForVehicleNumber.
Referenced by MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
inherited |
board any applicable persons Boards any people who wait on that edge for the given vehicle and removes them from myWaiting
| [in] | the | edge on which the boarding should take place |
| [in] | the | vehicle which is taking on passengers / goods |
| [in] | the | stop at which the vehicle is stopping |
Definition at line 153 of file MSTransportableControl.cpp.
References SUMOVehicle::addPerson(), DELTA_T, SUMOVehicleParameter::Stop::endPos, MSVehicleType::getBoardingDuration(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSVehicleType::getPersonCapacity(), SUMOVehicle::getPersonNumber(), SUMOTrafficObject::getVehicleType(), MSTransportableControl::myWaiting4Vehicle, MSTransportableControl::myWaitingForVehicleNumber, MSEdge::removePerson(), and SUMOVehicleParameter::Stop::startPos.
Referenced by MSVehicle::processNextStop(), and MEVehicle::processStop().
|
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 MSTransportableControl.
Definition at line 52 of file GUITransportableControl.cpp.
|
virtual |
Builds a new person.
| [in] | pars | The parameter |
| [in] | vtype | The type (reusing vehicle type container here) |
| [in] | plan | This person's plan |
| [in] | rng | The RNG to compute the optional speed deviation |
Reimplemented from MSTransportableControl.
Definition at line 44 of file GUITransportableControl.cpp.
References MSVehicleType::computeChosenSpeedDeviation().
checks whether any transportables waiting time is over
Definition at line 117 of file MSTransportableControl.cpp.
References MSTransportableControl::erase(), MSTransportableControl::myHaveNewWaiting, MSTransportableControl::myRunningNumber, MSTransportableControl::myWaiting4Departure, and MSTransportableControl::myWaitingUntil.
Referenced by MSNet::simulationStep().
|
virtualinherited |
removes a single transportable
Definition at line 85 of file MSTransportableControl.cpp.
References OutputDevice::getDeviceByOption(), MSTransportable::getID(), OptionsCont::getOptions(), MSTransportableControl::myRunningNumber, MSTransportableControl::myTransportables, MSTransportable::routeOutput(), and MSTransportable::tripInfoOutput().
Referenced by MSTransportableControl::abortAnyWaitingForVehicle(), MSTransportableControl::checkWaiting(), MSPerson::MSPersonStage_Access::ProceedCmd::execute(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice_Vehroutes::generateOutputForUnfinished(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), MSDevice_Transportable::notifyLeave(), MSDevice_Transportable::notifyMove(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSPerson::MSPersonStage_Walking::proceed(), and MSDevice_Transportable::~MSDevice_Transportable().
|
inherited |
Returns the named transportable, if existing.
| [in] | id | The id of the transportable |
Definition at line 75 of file MSTransportableControl.cpp.
References MSTransportableControl::myTransportables.
Referenced by libsumo::Person::getPerson(), libsumo::Polygon::getTrafficObject(), TraCIServer::postProcessSimulationStep(), and TraCIServerAPI_Person::processSet().
|
inherited |
return the number of active transportable objects
Definition at line 249 of file MSTransportableControl.cpp.
References MSTransportableControl::myRunningNumber, MSTransportableControl::myWaiting4Departure, and MSTransportableControl::myWaitingForVehicleNumber.
Referenced by libsumo::Simulation::getMinExpectedNumber().
|
inlineinherited |
Returns the number of times a transportables was jammed.
Definition at line 195 of file MSTransportableControl.h.
References MSTransportableControl::myJammedNumber.
Referenced by MSNet::generateStatistics(), and GUINet::getParameterWindow().
|
inlineinherited |
Returns the number of build transportables.
Definition at line 180 of file MSTransportableControl.h.
References MSTransportableControl::myLoadedNumber.
Referenced by MSNet::generateStatistics(), and GUINet::getParameterWindow().
|
inlineinherited |
Returns the number of build and inserted, but not yet deleted transportables.
Definition at line 188 of file MSTransportableControl.h.
References MSTransportableControl::myRunningNumber.
Referenced by MSNet::generateStatistics(), GUINet::getParameterWindow(), GUIApplicationWindow::handleEvent_SimulationStep(), and MSNet::simulationStep().
|
inlineinherited |
Returns the number of vehicles waiting for a ride.
Definition at line 201 of file MSTransportableControl.h.
References MSTransportableControl::myWaitingForVehicleNumber.
Referenced by GUIApplicationWindow::checkGamingEventsDRT().
|
inherited |
checks whether any transportable is still engaged in walking / stopping
Definition at line 243 of file MSTransportableControl.cpp.
References MSTransportableControl::myHaveNewWaiting, MSTransportableControl::myRunningNumber, MSTransportableControl::myWaiting4Departure, and MSTransportableControl::myWaitingForVehicleNumber.
Referenced by MSNet::simulationState().
|
inherited |
checks whether any transportable waits to finish her plan
Definition at line 237 of file MSTransportableControl.cpp.
References MSTransportableControl::myTransportables.
Referenced by MSNet::simulationStep().
| void GUITransportableControl::insertPersonIDs | ( | std::vector< GUIGlID > & | into | ) |
Returns the list of all known persons by gl-id.
| [fill] | into The list to fill with vehicle ids |
Definition at line 58 of file GUITransportableControl.cpp.
References MSTransportableControl::myTransportables, and MSTransportable::WAITING_FOR_DEPART.
|
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 198 of file MSTransportableControl.cpp.
References SUMOVehicle::addContainer(), SUMOVehicleParameter::Stop::endPos, MSVehicleType::getContainerCapacity(), SUMOVehicle::getContainerNumber(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSVehicleType::getLoadingDuration(), SUMOTrafficObject::getVehicleType(), MSTransportableControl::myWaiting4Vehicle, MSTransportableControl::myWaitingForVehicleNumber, MSEdge::removeContainer(), and SUMOVehicleParameter::Stop::startPos.
Referenced by MSVehicle::processNextStop(), and MEVehicle::processStop().
|
inlineinherited |
Returns the begin of the internal transportables map.
Definition at line 149 of file MSTransportableControl.h.
References MSTransportableControl::myTransportables.
Referenced by MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice_Vehroutes::generateOutputForUnfinished(), and libsumo::Person::getIDList().
|
inlineinherited |
Returns the end of the internal transportables map.
Definition at line 157 of file MSTransportableControl.h.
References MSTransportableControl::myTransportables.
Referenced by MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice_Vehroutes::generateOutputForUnfinished(), and libsumo::Person::getIDList().
|
inlineinherited |
register a jammed transportable
Definition at line 170 of file MSTransportableControl.h.
References MSTransportableControl::myJammedNumber.
Referenced by MSPModel_Striping::PState::walk().
|
inherited |
sets the arrival time for a waiting transportable
Definition at line 106 of file MSTransportableControl.cpp.
References DELTA_T, MSTransportableControl::myWaiting4Departure, and MSTransportableControl::myWaitingUntil.
Referenced by MSTransportable::Stage_Waiting::proceed().
|
inlineinherited |
Returns the number of known transportables.
Definition at line 165 of file MSTransportableControl.h.
References MSTransportableControl::myTransportables.
Referenced by libsumo::Person::getIDCount().
|
protectedinherited |
whether a new transportable waiting for a vehicle has been added in the last step
Definition at line 233 of file MSTransportableControl.h.
Referenced by MSTransportableControl::addWaiting(), MSTransportableControl::checkWaiting(), and MSTransportableControl::hasNonWaiting().
|
protectedinherited |
The number of jammed transportables.
Definition at line 227 of file MSTransportableControl.h.
Referenced by MSTransportableControl::getJammedNumber(), and MSTransportableControl::registerJammed().
|
protectedinherited |
The number of build transportables.
Definition at line 221 of file MSTransportableControl.h.
Referenced by MSTransportableControl::add(), and MSTransportableControl::getLoadedNumber().
|
protectedinherited |
The number of transportables within the network (build and inserted but not removed)
Definition at line 224 of file MSTransportableControl.h.
Referenced by MSTransportableControl::checkWaiting(), MSTransportableControl::erase(), MSTransportableControl::getActiveCount(), MSTransportableControl::getRunningNumber(), and MSTransportableControl::hasNonWaiting().
|
protectedinherited |
all currently created transportables by id
Definition at line 209 of file MSTransportableControl.h.
Referenced by MSTransportableControl::add(), MSTransportableControl::erase(), MSTransportableControl::get(), MSTransportableControl::hasTransportables(), insertPersonIDs(), MSTransportableControl::loadedBegin(), MSTransportableControl::loadedEnd(), MSTransportableControl::size(), and MSTransportableControl::~MSTransportableControl().
|
protectedinherited |
Transportables waiting for departure.
Definition at line 212 of file MSTransportableControl.h.
Referenced by MSTransportableControl::abortWaiting(), MSTransportableControl::add(), MSTransportableControl::checkWaiting(), MSTransportableControl::getActiveCount(), MSTransportableControl::hasNonWaiting(), and MSTransportableControl::setWaitEnd().
|
protectedinherited |
the lists of waiting transportables
Definition at line 218 of file MSTransportableControl.h.
Referenced by MSTransportableControl::abortAnyWaitingForVehicle(), MSTransportableControl::abortWaitingForVehicle(), MSTransportableControl::addWaiting(), MSTransportableControl::boardAnyWaiting(), MSTransportableControl::loadAnyWaiting(), and MSTransportableControl::~MSTransportableControl().
|
protectedinherited |
The number of transportables waiting for vehicles.
Definition at line 230 of file MSTransportableControl.h.
Referenced by MSTransportableControl::addWaiting(), MSTransportableControl::boardAnyWaiting(), MSTransportableControl::getActiveCount(), MSTransportableControl::getWaitingForVehicleNumber(), MSTransportableControl::hasNonWaiting(), and MSTransportableControl::loadAnyWaiting().
|
protectedinherited |
the lists of walking / stopping transportables
Definition at line 215 of file MSTransportableControl.h.
Referenced by MSTransportableControl::abortWaiting(), MSTransportableControl::checkWaiting(), and MSTransportableControl::setWaitEnd().