56 typedef std::map<std::string, MSTransportable*>::const_iterator
constVehIt;
272 void loadState(
const std::string& state);
A road/street connecting two junctions.
The simulated network and simulation perfomer.
The pedestrian (and also sometimes container) movement model.
void loadState(const std::string &state)
Reconstruct the current state.
MSPModel * getMovementModel()
Returns the default movement model for this kind of transportables.
int getRunningNumber() const
Returns the number of build and inserted, but not yet deleted transportables.
void setWaitEnd(SUMOTime time, MSTransportable *transportable)
sets the arrival time for a waiting transportable
int getDepartedNumber() const
bool hasTransportables() const
checks whether any transportable waits to finish her plan
std::map< std::string, MSTransportable * >::const_iterator constVehIt
Definition of the internal transportables map iterator.
constVehIt loadedBegin() const
Returns the begin of the internal transportables map.
int myWaitingForDepartureNumber
The number of transportables waiting for departure.
int getWaitingForVehicleNumber() const
Returns the number of transportables waiting for a ride.
int getEndedNumber() const
Returns the number of transportables that exited the simulation.
void fixLoadCount()
decrement counter to avoid double counting transportables loaded from state
void forceDeparture()
register forced (traci) departure
void checkWaiting(MSNet *net, const SUMOTime time)
checks whether any transportables waiting time is over
int size() const
Returns the number of known transportables.
MSPModel * getNonInteractingModel()
Returns the non interacting movement model (for tranship and "beaming")
MSPModel * myMovementModel
int getArrivedNumber() const
Returns the number of transportables that arrived at their destination.
void saveState(OutputDevice &out)
Saves the current state into the given stream.
MSTransportableControl(const bool isPerson)
Constructor.
int getLoadedNumber() const
Returns the number of build transportables.
int getWaitingUntilNumber() const
Returns the number of transportables waiting for a specified amount of time.
MSTransportableControl & operator=(const MSTransportableControl &src)=delete
invalidated assignment operator
int myLoadedNumber
The number of build transportables.
constVehIt loadedEnd() const
Returns the end of the internal transportables map.
std::map< std::string, MSTransportable * > myTransportables
all currently created transportables by id
void abortWaiting(MSTransportable *t)
aborts waiting stage of transportable
void abortWaitingForVehicle(MSTransportable *t)
let the given transportable abort waiting for a vehicle (when removing stage via TraCI)
void abortAnyWaitingForVehicle()
aborts the plan for any transportable that is still waiting for a ride
bool hasNonWaiting() const
checks whether any transportable is still engaged in walking / stopping
virtual MSTransportable * buildContainer(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan) const
Builds a new container.
int myArrivedNumber
The number of transportables that arrived at their destination.
virtual MSTransportable * buildPerson(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, SumoRNG *rng) const
Builds a new person.
int getMovingNumber() const
Returns the number of transportables moving by themselvs (i.e. walking)
void addWaiting(const MSEdge *edge, MSTransportable *person)
adds a transportable to the list of transportables waiting for a vehicle on the specified edge
int myEndedNumber
The number of transportables that exited the simulation.
int getJammedNumber() const
Returns the number of times a transportables was jammed.
std::map< const MSEdge *, TransportableVector > myWaiting4Vehicle
the lists of waiting transportables
int myWaitingUntilNumber
The number of transportables waiting for a specified time.
void clearState()
Resets transportables when quick-loading state.
virtual void erase(MSTransportable *transportable)
removes a single transportable
int myDiscardedNumber
The number of discarded transportables.
std::map< SUMOTime, TransportableVector > myWaitingUntil
the lists of walking / stopping transportables
bool add(MSTransportable *transportable)
Adds a single transportable, returns false if an id clash occurred.
bool myHaveNewWaiting
whether a new transportable waiting for a vehicle has been added in the last step
virtual ~MSTransportableControl()
Destructor.
int myJammedNumber
The number of jammed transportables.
bool boardAnyWaiting(const MSEdge *edge, SUMOVehicle *vehicle, SUMOTime &timeToBoardNextPerson, SUMOTime &stopDuration)
board any applicable persons Boards any people who wait on that edge for the given vehicle and remove...
std::map< SUMOTime, TransportableVector > myWaiting4Departure
Transportables waiting for departure.
bool loadAnyWaiting(const MSEdge *edge, SUMOVehicle *vehicle, SUMOTime &timeToLoadNextContainer, SUMOTime &stopDuration)
load any applicable containers Loads any container that is waiting on that edge for the given vehicle...
void registerJammed()
register a jammed transportable
std::vector< MSTransportable * > TransportableVector
Definition of a list of transportables.
int myRunningNumber
The number of transportables within the network (build and inserted but not removed)
int myWaitingForVehicleNumber
The number of transportables waiting for vehicles.
MSTransportable * get(const std::string &id) const
Returns the named transportable, if existing.
MSPModel * myNonInteractingModel
int getActiveCount()
return the number of active transportable objects
int getRidingNumber() const
Returns the number of transportables riding a vehicle.
std::vector< MSStage * > MSTransportablePlan
the structure holding the plan of a transportable
The car-following model and parameter.
Static storage of an output device and its base (abstract) implementation.
Representation of a vehicle.
Structure representing possible vehicle parameter.