85 static int numSegmentsFor(
const double length,
const double slength);
bool changeSegment(MEVehicle *veh, SUMOTime leaveTime, MESegment *const toSegment, const bool ignoreLink=false)
change to the next segment this handles combinations of the following cases: (ending / continuing rou...
MELoop(const SUMOTime recheckInterval)
SUMO constructor.
MESegment * nextSegment(MESegment *s, MEVehicle *v)
Retrieve next segment.
A vehicle from the mesoscopic point of view.
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
const SUMOTime myFullRecheckInterval
the interval at which to recheck at full segments (<=0 means asap)
std::vector< MESegment * > myEdges2FirstSegments
mapping from internal edge ids to their initial segments
void buildSegmentsFor(const MSEdge &e, const OptionsCont &oc)
Build the segments for a given edge.
void teleportVehicle(MEVehicle *veh, MESegment *const toSegment)
teleports a vehicle or continues a teleport
void removeLeaderCar(MEVehicle *v)
Removes the given car from the leading vehicles.
A road/street connecting two junctions.
The main mesocopic simulation loop.
std::map< SUMOTime, std::vector< MEVehicle * > > myLeaderCars
leader cars in the segments sorted by exit time
static void setApproaching(MEVehicle *veh, MSLink *link)
registers vehicle with the given link
A single mesoscopic segment (cell)
A storage for options typed value containers)
MELoop & operator=(const MELoop &)
Invalidated assignment operator.
const SUMOTime myLinkRecheckInterval
the interval at which to recheck at blocked junctions (<=0 means asap)
void checkCar(MEVehicle *veh)
Check whether the vehicle may move.
The class responsible for building and deletion of vehicles.
static int numSegmentsFor(const double length, const double slength)
Compute number of segments per edge (best value stay close to the configured segment length) ...
void simulate(SUMOTime tMax)
Perform simulation up to the given time.
void addLeaderCar(MEVehicle *veh, MSLink *link)
Adds the given car to the leading vehicles.