Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MESegment.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// A single mesoscopic segment (cell)
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <vector>
24#include <cassert>
26#include <utils/common/Named.h>
29
30
31// ===========================================================================
32// class declarations
33// ===========================================================================
34class SUMOVehicle;
35class MSEdge;
36class MSLink;
39class MEVehicle;
40class OutputDevice;
41
42
43// ===========================================================================
44// class definitions
45// ===========================================================================
50class MESegment : public Named {
51public:
52 static const double DO_NOT_PATCH_JAM_THRESHOLD;
53 static const int PARKING_QUEUE = -1;
55 static const std::string OVERRIDE_TLS_PENALTIES;
56
72
85
86
87protected:
88 class Queue {
89 public:
90 Queue(const SVCPermissions permissions) : myPermissions(permissions) {}
91 inline int size() const {
92 return (int)myVehicles.size();
93 }
94 inline const std::vector<MEVehicle*>& getVehicles() const {
95 return myVehicles;
96 }
98 inline std::vector<MEVehicle*>& getModifiableVehicles() {
99 return myVehicles;
100 }
101 inline double getOccupancy() const {
102 return myOccupancy;
103 }
104 inline void setOccupancy(const double occ) {
105 myOccupancy = occ;
106 }
107 inline bool allows(SUMOVehicleClass vclass) const {
108 return (myPermissions & vclass) == vclass;
109 }
110
113 return myEntryBlockTime;
114 }
115
117 inline void setEntryBlockTime(SUMOTime entryBlockTime) {
118 myEntryBlockTime = entryBlockTime;
119 }
120
121 inline SUMOTime getBlockTime() const {
122 return myBlockTime;
123 }
124 inline void setBlockTime(SUMOTime t) {
125 myBlockTime = t;
126 }
127
129 myPermissions = p;
130 }
131
132 void addDetector(MSMoveReminder* data);
133
134 void addReminders(MEVehicle* veh) const;
135
136 private:
139
140 std::vector<MEVehicle*> myVehicles;
141
143 double myOccupancy = 0.;
144
147
150
152 std::vector<MSMoveReminder*> myDetectorData;
153
154 };
155
156public:
167 MESegment(const std::string& id,
168 const MSEdge& parent, MESegment* next,
169 const double length, const double speed,
170 const int idx,
171 const bool multiQueue,
172 const MesoEdgeType& edgeType);
173
175 void initSegment(const MesoEdgeType& edgeType, const MSEdge& parent, const double capacity);
176
179
185 void addDetector(MSMoveReminder* data, int queueIndex = -1);
186
192 // void removeDetector(MSMoveReminder* data);
193
199 void prepareDetectorForWriting(MSMoveReminder& data, int queueIndex = -1);
201
210 SUMOTime hasSpaceFor(const MEVehicle* const veh, const SUMOTime entryTime, int& qIdx, const bool init = false) const;
211
213 virtual void updateEntryBlockTime(SUMOTime /*time*/) {}
214
216 virtual std::string getQueueExtraState(int /*qIdx*/) const {
217 return "";
218 }
219 virtual void loadQueueExtraState(int /*qIdx*/, const std::string& /*state*/, SUMOTime /*offset*/) {}
220
227 bool initialise(MEVehicle* veh, SUMOTime time);
228
233 inline int getCarNumber() const {
234 return myNumVehicles;
235 }
236
238 inline int numQueues() const {
239 return (int)myQueues.size();
240 }
244 inline const std::vector<MEVehicle*>& getQueue(int index) const {
245 assert(index < (int)myQueues.size());
246 return myQueues[index].getVehicles();
247 }
248
250 void updateMesoPositions() const;
251
256
257 inline SUMOTime getQueueBlockTime(int index) const {
258 assert(index < (int)myQueues.size());
259 return myQueues[index].getBlockTime();
260 }
261
266 inline int getIndex() const {
267 return myIndex;
268 }
269
274 inline MESegment* getNextSegment() const {
275 return myNextSegment;
276 }
277
282 inline double getLength() const {
283 return myLength;
284 }
285
290 inline double getCapacity() const {
291 return myCapacity;
292 }
293
298 inline double getBruttoOccupancy() const {
299 double occ = 0.;
300 for (const Queue& q : myQueues) {
301 occ += q.getOccupancy();
302 }
303 return occ;
304 }
305
309 inline double getRelativeOccupancy() const {
311 }
312
317 inline double getRelativeJamThreshold() const {
318 return myJamThreshold / myCapacity;
319 }
320
331 double getMeanSpeed(bool useCache) const;
332
334 double getVehicleMaxSpeed(const MEVehicle& veh, int queueIndex) const;
335
337 void resetCachedSpeeds();
338
340 inline double getMeanSpeed() const {
341 return getMeanSpeed(true);
342 }
343
344
345 void writeVehicles(OutputDevice& of) const;
346
355
365 MSLink* getLink(const MEVehicle* veh, bool tlsPenalty = false) const;
366
374 int isOpen(const MEVehicle* veh) const;
375
383 virtual void send(MEVehicle* veh, MESegment* const next, const int nextQIdx, SUMOTime time, const MSMoveReminder::Notification reason);
384
392 void receive(MEVehicle* veh, const int qIdx, SUMOTime time, const bool isDepart = false, const bool isTeleport = false, const bool newEdge = false);
393
394
400 bool vaporizeAnyCar(SUMOTime currentTime, const MSDetectorFileOutput* filter);
401
405 inline const MSEdge& getEdge() const {
406 return myEdge;
407 }
408
409
414 void setSpeed(double newSpeed, SUMOTime currentTime, double jamThresh = DO_NOT_PATCH_JAM_THRESHOLD, int qIdx = -1);
415
419 SUMOTime getEventTime() const;
420
422 inline double getEventTimeSeconds() const {
423 return STEPS2TIME(getEventTime());
424 }
425
427 inline double getLastHeadwaySeconds() const {
429 }
430
432 inline SUMOTime getLastHeadway() const {
433 return myLastHeadway;
434 }
435
437 void setLastHeadway(SUMOTime headway) {
438 myLastHeadway = headway;
439 }
440
442 inline double getEntryBlockTimeSeconds() const {
444 for (const Queue& q : myQueues) {
445 t = MIN2(t, q.getEntryBlockTime());
446 }
447 return STEPS2TIME(t);
448 }
449
451 double getWaitingSeconds() const;
452
455
465 void saveState(OutputDevice& out) const;
466
468 void clearState();
469
484 void loadState(const std::vector<SUMOVehicle*>& vehs, const SUMOTime blockTime, const SUMOTime entryBlockTime, const int queIdx);
486
487
490 std::vector<const MEVehicle*> getVehicles() const;
491
495 double getFlow() const;
496
498 static inline bool isInvalid(const MESegment* segment) {
499 return segment == nullptr || segment == &myVaporizationTarget;
500 }
501
503 SUMOTime getNextInsertionTime(SUMOTime earliestEntry) const;
504
506 inline int remainingVehicleCapacity(const double vehLength) const {
507 int cap = 0;
508 for (const Queue& q : myQueues) {
509 if (q.getOccupancy() == 0. && myQueueCapacity < vehLength) {
510 // even small segments can hold at least one vehicle
511 cap += 1;
512 } else {
513 cap += (int)((myQueueCapacity - q.getOccupancy()) / vehLength);
514 }
515 }
516 return cap;
517 }
518
521 return myTau_ff;
522 }
523
525 void addReminders(MEVehicle* veh) const;
526
531 SUMOTime getLinkPenalty(const MEVehicle* veh) const;
532
534 void updatePermissions();
535
538 myTLSPenalty = false;
539 }
540
541 void setStartOffset(double offset) {
542 myStartOffset = offset;
543 }
544
546 inline SUMOTime getMinTauWithVehLength(double lengthWithGap, double vehicleTau) const {
547 return (SUMOTime)((double)myTau_ff * vehicleTau + lengthWithGap * myTau_length);
548 }
549
551 inline SUMOTime getTauWithVehLength(int qIdx, double lengthWithGap, double vehicleTau) const {
552 assert(qIdx >= 0 && qIdx < (int)myQueues.size());
553 const SUMOTime tau = myQueues[qIdx].getOccupancy() < myJamThreshold ? myTau_ff : myTau_jf;
554 return tauWithVehLength(tau, lengthWithGap, vehicleTau);
555 }
556
557protected:
559 bool overtake(const MEVehicle* veh) const;
560
561 void setSpeedForQueue(double newSpeed, SUMOTime currentTime,
562 SUMOTime blockTime, const std::vector<MEVehicle*>& vehs);
563
566 SUMOTime newArrival(const MEVehicle* const v, double newSpeed, SUMOTime currentTime);
567
569 bool hasBlockedLeader() const;
570
575 void recomputeJamThreshold(double jamThresh);
576
578 double jamThresholdForSpeed(double speed, double jamThresh) const;
579
581 bool limitedControlOverride(const MSLink* link) const;
582
584 inline SUMOTime tauWithVehLength(SUMOTime tau, double lengthWithGap, double vehicleTau) const {
585 return (SUMOTime)((double)tau * vehicleTau + lengthWithGap * myTau_length);
586 }
587
588 SUMOTime getTauJJ(double nextQueueSize, double nextQueueCapacity, double nextJamThreshold) const;
589
591 virtual SUMOTime computeHeadway(Queue& q, const Queue& qNext, const MESegment* const next, const MEVehicle* veh) const;
592
594 virtual bool hasSpaceForInsertion(const Queue& q, int qIdx, double newOccupancy, SUMOTime entryTime) const;
595
597 virtual bool hasTravelingGaps(int /*qIdx*/, SUMOTime /*time*/) const {
598 return false;
599 }
600
602 typedef std::map<std::pair<const MSEdge*, std::vector<int> >, std::vector<std::pair<double, int> > > SearchedMap;
603
612 void addDownstreamFollowers(const MSEdge& edge, const std::vector<int>& reach, const double dist, const double lookahead, const int depth, SearchedMap& searched);
613
614protected:
617
620
622 const double myLength;
623
625 const int myIndex;
626
629
632
635
637 bool myCheckMinorPenalty; // for legacy compatibility (#7802, 7804)
639
642
645
647 long long int myOvertakeKey = 0;
649
652
654 double myCapacity = 0.;
655
657 double myQueueCapacity = 0.;
658
661
663 std::vector<Queue> myQueues;
664
667
669 std::map<const MSEdge*, int> myFollowerMap;
670
672 int myLookahead = 1;
673
676
677 /* @brief segment for signifying vaporization. This segment has invalid
678 * data and should only be used as a unique pointer */
681
683
685 mutable double myMeanSpeed;
686
689
692
693private:
695 double myStartOffset = 0;
696
699
702
704 MESegment(const std::string& id);
705};
long long int SUMOTime
Definition GUI.h:36
#define STEPS2TIME(x)
Definition SUMOTime.h:58
#define SUMOTime_MAX
Definition SUMOTime.h:34
#define SUMOTime_MIN
Definition SUMOTime.h:35
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
T MIN2(T a, T b)
Definition StdDefs.h:80
int size() const
Definition MESegment.h:91
void setOccupancy(const double occ)
Definition MESegment.h:104
MEVehicle * remove(MEVehicle *v)
Definition MESegment.cpp:74
void setBlockTime(SUMOTime t)
Definition MESegment.h:124
SUMOTime getBlockTime() const
Definition MESegment.h:121
double myOccupancy
The occupied space (in m) in the queue.
Definition MESegment.h:143
bool allows(SUMOVehicleClass vclass) const
Definition MESegment.h:107
std::vector< MEVehicle * > & getModifiableVehicles()
Definition MESegment.h:98
void addReminders(MEVehicle *veh) const
Definition MESegment.cpp:99
SUMOTime myBlockTime
The block time.
Definition MESegment.h:149
void addDetector(MSMoveReminder *data)
Definition MESegment.cpp:91
void setEntryBlockTime(SUMOTime entryBlockTime)
set the next time at which a vehicle may enter this queue
Definition MESegment.h:117
SUMOTime myEntryBlockTime
The block time for vehicles who wish to enter this queue.
Definition MESegment.h:146
double getOccupancy() const
Definition MESegment.h:101
std::vector< MSMoveReminder * > myDetectorData
The data collection for all kinds of detectors.
Definition MESegment.h:152
std::vector< MEVehicle * > myVehicles
Definition MESegment.h:140
const std::vector< MEVehicle * > & getVehicles() const
Definition MESegment.h:94
Queue(const SVCPermissions permissions)
Definition MESegment.h:90
SUMOTime getEntryBlockTime() const
return the next time at which a vehicle may enter this queue
Definition MESegment.h:112
void setPermissions(SVCPermissions p)
Definition MESegment.h:128
SVCPermissions myPermissions
The vClass permissions for this queue.
Definition MESegment.h:138
A single mesoscopic segment (cell)
Definition MESegment.h:50
void addReminders(MEVehicle *veh) const
add this lanes MoveReminders to the given vehicle
double myQueueCapacity
The number of lanes represented by the queue * the length of the lane.
Definition MESegment.h:657
double getVehicleMaxSpeed(const MEVehicle &veh, int queueIndex) const
Maximum vehicle speed for the given queue, accounting for internal junction segments.
SUMOTime tauWithVehLength(SUMOTime tau, double lengthWithGap, double vehicleTau) const
convert net time gap (leader back to follower front) to gross time gap (leader front to follower fron...
Definition MESegment.h:584
SUMOTime myTau_ff
The time headway parameters, see the Eissfeldt thesis.
Definition MESegment.h:631
int isOpen(const MEVehicle *veh) const
Returns whether the vehicle may use the next link.
double getEntryBlockTimeSeconds() const
get the earliest entry time in seconds
Definition MESegment.h:442
bool initialise(MEVehicle *veh, SUMOTime time)
Inserts (emits) vehicle into the segment.
std::vector< Queue > myQueues
The car queues. Vehicles are inserted in the front and removed in the back.
Definition MESegment.h:663
double getBruttoOccupancy() const
Returns the occupany of the segment (the sum of the vehicle lengths + minGaps)
Definition MESegment.h:298
SUMOTime myLastHeadway
the last headway
Definition MESegment.h:675
static const int PARKING_QUEUE
Definition MESegment.h:53
bool limitedControlOverride(const MSLink *link) const
whether the given link may be passed because the option meso-junction-control.limited is set
void addDetector(MSMoveReminder *data, int queueIndex=-1)
Adds a data collector for a detector to this segment.
double getLastHeadwaySeconds() const
get the last headway time in seconds
Definition MESegment.h:427
double getRelativeOccupancy() const
Returns the relative occupany of the segment (percentage of road used))
Definition MESegment.h:309
void overrideTLSPenalty()
whether the traffic light should use normal junction control despite penalty options
Definition MESegment.h:537
void clearState()
Remove all vehicles before quick-loading state.
void receive(MEVehicle *veh, const int qIdx, SUMOTime time, const bool isDepart=false, const bool isTeleport=false, const bool newEdge=false)
Adds the vehicle to the segment, adapting its parameters.
static SVCPermissions myMultiModalWarnings
Definition MESegment.h:682
SUMOTime getLinkPenalty(const MEVehicle *veh) const
Returns the penalty time for passing a link (if using gMesoTLSPenalty > 0 or gMesoMinorPenalty > 0)
void setStartOffset(double offset)
Definition MESegment.h:541
void writeVehicles(OutputDevice &of) const
std::map< const MSEdge *, int > myFollowerMap
The follower edge to allowed que index mapping for multi queue segments.
Definition MESegment.h:669
SUMOTime getTauWithVehLength(int qIdx, double lengthWithGap, double vehicleTau) const
like getMinTauWithVehLength but using the jam-state dependent net time gap of the given queue (as in ...
Definition MESegment.h:551
MSLink * getLink(const MEVehicle *veh, bool tlsPenalty=false) const
Returns the link the given car will use when passing the next junction.
SUMOTime myMesoPositionUpdateTime
The time step of the last interpolated position update.
Definition MESegment.h:691
int myNumVehicles
The cached value for the number of vehicles.
Definition MESegment.h:666
void setSpeedForQueue(double newSpeed, SUMOTime currentTime, SUMOTime blockTime, const std::vector< MEVehicle * > &vehs)
double getLength() const
Returns the length of the segment in meters.
Definition MESegment.h:282
SUMOTime getLastHeadway() const
get the last headway time
Definition MESegment.h:432
MESegment(const MESegment &)
Invalidated copy constructor.
SUMOTime hasSpaceFor(const MEVehicle *const veh, const SUMOTime entryTime, int &qIdx, const bool init=false) const
Returns whether the given vehicle would still fit into the segment.
const std::vector< MEVehicle * > & getQueue(int index) const
Returns the cars in the queue with the given index for visualization.
Definition MESegment.h:244
void updatePermissions()
called when permissions change due to Rerouter or TraCI
void invalidateMesoPositions() const
Invalidate the cached interpolated positions.
Definition MESegment.h:253
long long int myOvertakeKey
this segment's part of the overtaking draws (hash of edge id and segment index in the upper 32 bits)
Definition MESegment.h:647
MESegment & operator=(const MESegment &)
Invalidated assignment operator.
void saveState(OutputDevice &out) const
Saves the state of this segment into the given stream.
void initSegment(const MesoEdgeType &edgeType, const MSEdge &parent, const double capacity)
set model parameters (may be updated from additional file after network loading is complete)
void resetCachedSpeeds()
reset myLastMeanSpeedUpdate
virtual bool hasTravelingGaps(int, SUMOTime) const
whether space vacated by vehicles that left the given queue has not yet reached the upstream end
Definition MESegment.h:597
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
Definition MESegment.h:405
static MESegment myVaporizationTarget
Definition MESegment.h:680
int numQueues() const
return the number of queues
Definition MESegment.h:238
void updateMesoPositions() const
Update interpolated positions for all vehicles on this segment.
int myLookahead
The number of route edges after myEdge to look up in myFollowerMap.
Definition MESegment.h:672
double myStartOffset
Distance from the start of the edge for position interpolation.
Definition MESegment.h:695
void addDownstreamFollowers(const MSEdge &edge, const std::vector< int > &reach, const double dist, const double lookahead, const int depth, SearchedMap &searched)
add the queues leading to the successors of the given downstream edge to myFollowerMap
virtual std::string getQueueExtraState(int) const
model specific queue state (e.g. the gap times of meso-ltm) for saving / loading
Definition MESegment.h:216
double myJamThreshold
The space (in m) which needs to be occupied before the segment is considered jammed.
Definition MESegment.h:660
const int myIndex
Running number of the segment in the edge.
Definition MESegment.h:625
virtual void updateEntryBlockTime(SUMOTime)
update entry blockTime for all queues
Definition MESegment.h:213
virtual void send(MEVehicle *veh, MESegment *const next, const int nextQIdx, SUMOTime time, const MSMoveReminder::Notification reason)
Removes the vehicle from the segment, adapting its parameters.
SUMOTime myMinorPenalty
Definition MESegment.h:638
double myMeanSpeed
the mean speed on this segment. Updated at event time or on demand
Definition MESegment.h:685
bool myCheckMinorPenalty
penalty for minor links
Definition MESegment.h:637
virtual SUMOTime computeHeadway(Queue &q, const Queue &qNext, const MESegment *const next, const MEVehicle *veh) const
compute current headway depending on traffic state
void setLastHeadway(SUMOTime headway)
restores the last headway time (when loading state)
Definition MESegment.h:437
double jamThresholdForSpeed(double speed, double jamThresh) const
compute jam threshold for the given speed and jam-threshold option
virtual void loadQueueExtraState(int, const std::string &, SUMOTime)
Definition MESegment.h:219
SUMOTime myLastMeanSpeedUpdate
the time at which myMeanSpeed was last updated
Definition MESegment.h:688
SUMOTime myTau_jf
Definition MESegment.h:631
void setSpeed(double newSpeed, SUMOTime currentTime, double jamThresh=DO_NOT_PATCH_JAM_THRESHOLD, int qIdx=-1)
reset mySpeed and patch the speed of all vehicles in it. Also set/recompute myJamThreshold
MESegment * myNextSegment
The next segment of this edge, 0 if this is the last segment of this edge.
Definition MESegment.h:619
double getRelativeJamThreshold() const
Returns the relative occupany of the segment (percentage of road used)) at which the segment is consi...
Definition MESegment.h:317
bool hasBlockedLeader() const
whether a leader in any queue is blocked
int remainingVehicleCapacity(const double vehLength) const
return the remaining physical space on this segment
Definition MESegment.h:506
double getWaitingSeconds() const
Get the waiting time for vehicles in all queues.
const double myLength
The segment's length.
Definition MESegment.h:622
SUMOTime getMinimumHeadwayTime() const
return the minimum headway-time with which vehicles may enter or leave this segment
Definition MESegment.h:520
SUMOTime getEventTime() const
Returns the (planned) time at which the next vehicle leaves this segment.
const MSEdge & myEdge
The microsim edge this segment belongs to.
Definition MESegment.h:616
static const std::string OVERRIDE_TLS_PENALTIES
special param value
Definition MESegment.h:55
MEVehicle * removeCar(MEVehicle *v, SUMOTime leaveTime, const MSMoveReminder::Notification reason)
Removes the given car from the edge's que.
std::vector< const MEVehicle * > getVehicles() const
returns all vehicles (for debugging)
double getCapacity() const
Returns the sum of the lengths of all usable lanes of the segment in meters.
Definition MESegment.h:290
double getEventTimeSeconds() const
Like getEventTime but returns seconds (for visualization)
Definition MESegment.h:422
static MSEdge myDummyParent
Definition MESegment.h:679
@ PROCEED_NO
the vehicle must stay on the current segment
Definition MESegment.h:79
@ PROCEED_NO_TLS
vehicle want's to change to right lane
Definition MESegment.h:81
@ PROCEED_UNKNOWN
mayProceed was not called
Definition MESegment.h:75
@ PROCEED_NO_STOP
vehicle want's to change to right lane
Definition MESegment.h:83
@ PROCEED_YES
the vehicle may proceed to the next segment
Definition MESegment.h:77
void recomputeJamThreshold(double jamThresh)
compute a value for myJamThreshold if jamThresh is negative, compute a value which allows free flow a...
int getIndex() const
Returns the running index of the segment in the edge (0 is the most upstream).
Definition MESegment.h:266
double getMeanSpeed() const
wrapper to satisfy the FunctionBinding signature
Definition MESegment.h:340
SUMOTime getQueueBlockTime(int index) const
Definition MESegment.h:257
int getCarNumber() const
Returns the total number of cars on the segment.
Definition MESegment.h:233
bool overtake(const MEVehicle *veh) const
whether veh overtakes the queue's last vehicle, drawn from a number specific to vehicle and segment
void loadState(const std::vector< SUMOVehicle * > &vehs, const SUMOTime blockTime, const SUMOTime entryBlockTime, const int queIdx)
Loads the state of this segment with the given parameters.
double myTau_length
Headway parameter for computing gross time headyway from net time headway, length and edge speed.
Definition MESegment.h:651
SUMOTime myTau_jj
Definition MESegment.h:631
SUMOTime newArrival(const MEVehicle *const v, double newSpeed, SUMOTime currentTime)
compute the new arrival time when switching speed
bool myJunctionControl
Whether junction control is enabled.
Definition MESegment.h:641
virtual bool hasSpaceForInsertion(const Queue &q, int qIdx, double newOccupancy, SUMOTime entryTime) const
check jam-avoidance constraints during insertion
bool myTLSPenalty
Whether tls penalty is enabled.
Definition MESegment.h:634
static const double DO_NOT_PATCH_JAM_THRESHOLD
Definition MESegment.h:52
SUMOTime getMinTauWithVehLength(double lengthWithGap, double vehicleTau) const
convert net time gap (leader back to follower front) to gross time gap (leader front to follower fron...
Definition MESegment.h:546
double getFlow() const
returns flow based on headway
static bool isInvalid(const MESegment *segment)
whether the given segment is 0 or encodes vaporization
Definition MESegment.h:498
SUMOTime getNextInsertionTime(SUMOTime earliestEntry) const
return a time after earliestEntry at which a vehicle may be inserted at full speed
double myCapacity
The number of lanes represented by the queue * the length of the lane.
Definition MESegment.h:654
bool myOvertaking
Whether overtaking is permitted on this segment.
Definition MESegment.h:644
void prepareDetectorForWriting(MSMoveReminder &data, int queueIndex=-1)
Removes a data collector for a detector from this segment.
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
Definition MESegment.h:274
std::map< std::pair< const MSEdge *, std::vector< int > >, std::vector< std::pair< double, int > > > SearchedMap
the (distance, depth) pairs at which a downstream edge was searched with a given lane reach
Definition MESegment.h:602
bool vaporizeAnyCar(SUMOTime currentTime, const MSDetectorFileOutput *filter)
tries to remove any car from this segment
SUMOTime myTau_fj
Definition MESegment.h:631
SUMOTime getTauJJ(double nextQueueSize, double nextQueueCapacity, double nextJamThreshold) const
A vehicle from the mesoscopic point of view.
Definition MEVehicle.h:42
Base of value-generating classes (detectors)
A road/street connecting two junctions.
Definition MSEdge.h:78
Something on a lane to be noticed about vehicle movement.
Notification
Definition of a vehicle state.
The class responsible for building and deletion of vehicles.
Base class for objects which have an id.
Definition Named.h:53
Static storage of an output device and its base (abstract) implementation.
Representation of a vehicle.
Definition SUMOVehicle.h:63
edge type specific meso parameters
Definition MESegment.h:58