 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
38 :
ROEdge(id, from, to, index, priority) {}
60 double endTime,
double probability) {
66 (*i).second->add(begTime, endTime, probability);
81 if (avoid.count(i->first) == 0) {
82 if ((veh ==
nullptr || !(*i).first->prohibits(veh)) && (*i).second->describesTime(time)) {
83 dist.
add((*i).first, (*i).second->getValue(time));
111 for (
int i = 0; i < (int)defs.size(); ++i) {
119 for (
int j = 0; j < (int)defs.size(); ++j) {
120 value += tmp[i * defs.size() + j];
bool add(T val, double prob, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding edges prohibit the given vehicle to pass them.
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
FollowerUsageCont myFollowingDefs
Storage for the probabilities of using a certain follower over time.
void setTurnDefaults(const std::vector< double > &defs)
Sets the turning definition defaults.
A vehicle as used by router.
std::vector< double > myParsedTurnings
The defaults for turnings.
T get(std::mt19937 *which=0) const
Draw a sample of the distribution.
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
An edge the jtr-router may route through.
Represents a generic random distribution.
void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
void addFollowerProbability(ROJTREdge *follower, double begTime, double endTime, double probability)
adds the information about the percentage of using a certain follower
bool prohibits(const ROVehicle *const vehicle) const
Returns whether this edge prohibits the given vehicle to pass it.
A basic edge for routing applications.
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
Base class for nodes used by the router.
ROJTREdge * chooseNext(const ROVehicle *const veh, double time, const std::set< const ROEdge * > &avoid) const
Returns the next edge to use.
ROJTREdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
const std::string & getID() const
Returns the id.