59 into.push_back(device);
91 if (person ==
nullptr || te.time > currentTime) {
98 if (v->getSpeed() == 0. && fabs(v->getPositionOnLane() - te.lanePos) < POSITION_EPS) {
99 v->getLane()->getVehiclesSecure();
102 v->getLane()->releaseVehicles();
107 if (te.speed == 0. && fabs(v->
getPositionOnLane() - te.lanePos) >= POSITION_EPS) {
118 libsumo::Person::moveToXY(person->
getID(), te.edgeOrLane, te.pos.x(), te.pos.y(), te.angle, 7, 0.1);
142 std::vector<MSTransportableDevice_FCDReplay*> devices;
145 if (device !=
nullptr) {
146 devices.push_back(device);
150 if (d->move(currentTime)) {
151 d->getHolder().removeStage(0,
false);
#define WRITE_WARNING(msg)
void removeTransportable(MSTransportable *transportable)
Remove a passenger (TraCI).
static void insertDefaultAssignmentOptions(const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc, const bool isPerson=false)
Adds common command options that allow to assign devices to vehicles.
static bool equippedByDefaultAssignmentOptions(const OptionsCont &oc, const std::string &deviceName, DEVICEHOLDER &v, bool outputOptionSet, const bool isPerson=false)
Determines whether a vehicle should get a certain device.
A road/street connecting two junctions.
std::vector< const SUMOVehicle * > getVehicles() const
return vehicles on this edges lanes or segments
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
virtual MSTransportableControl & getPersonControl()
Returns the person control.
bool moveToNextEdge(MSTransportable *person, SUMOTime currentTime, int prevDir, MSEdge *nextInternal=nullptr, const bool isReplay=false)
move forward and return whether the person arrived
constVehIt loadedBegin() const
Returns the begin of the internal transportables map.
constVehIt loadedEnd() const
Returns the end of the internal transportables map.
std::map< std::string, MSTransportable * >::const_iterator constVehIt
Definition of the internal transportables map iterator.
bool loadAnyWaiting(const MSEdge *edge, SUMOVehicle *vehicle, SUMOTime &timeToLoadNext, SUMOTime &stopDuration, MSTransportable *const force=nullptr)
load any applicable transportables Loads any person / container that is waiting on that edge for the ...
SUMOTime execute(SUMOTime currentTime)
Executes the command.
MSTransportableDevice_FCDReplay(MSTransportable &holder, const std::string &id)
Constructor.
static bool myAmActive
whether an event for pedestrian processing was added
static void buildDevices(MSTransportable &t, std::vector< MSTransportableDevice * > &into)
Build devices for the given vehicle, if needed.
~MSTransportableDevice_FCDReplay()
Destructor.
bool move(SUMOTime currentTime)
static void insertOptions(OptionsCont &oc)
Inserts MSTransportableDevice_FCDReplay-options.
const MSDevice_FCDReplay::Trajectory * myTrajectory
MSTransportable & myHolder
The person that stores the device.
MSTransportableDevice(MSTransportable &holder, const std::string &id)
Constructor.
MSStage * getCurrentStage() const
Return the current stage.
virtual bool proceed(MSNet *net, SUMOTime time, const bool vehicleArrived=false)
SUMOVehicle * getVehicle() const
The vehicle associated with this transportable.
MSStageType getCurrentStageType() const
the current stage type of the transportable
const MSEdge * getEdge() const override
Returns the current edge.
const std::string & getID() const
Returns the id.
A storage for options typed value containers).
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
static OptionsCont & getOptions()
Retrieves the options.
virtual const MSLane * getLane() const =0
Returns the lane the object is currently at.
virtual MSDevice * getDevice(const std::type_info &type) const =0
Returns a device of the given type if it exists or nullptr if not.
virtual double getPositionOnLane() const =0
Get the object's position along the lane.
Representation of a vehicle.
An error which allows to continue.