41 #ifdef CHECK_MEMORY_LEAKS 43 #endif // CHECK_MEMORY_LEAKS 50 :
ROEdge(id, from, to, index, priority) {}
78 (*i).second->add(begTime, endTime, probability);
93 if (avoid.count(i->first) == 0) {
94 if ((veh == 0 || !(*i).first->prohibits(veh)) && (*i).second->describesTime(time)) {
95 dist.
add((*i).second->getValue(time), (*i).first);
124 for (i = 0; i < defs.size(); ++i) {
132 for (
size_t j = 0; j < defs.size(); ++j) {
133 value += tmp[i * defs.size() + j];
FollowerUsageCont myFollowingDefs
Storage for the probabilities of using a certain follower over time.
Represents a generic random distribution.
bool add(SUMOReal prob, T val, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
ROJTREdge(const std::string &id, RONode *from, RONode *to, unsigned int index, const int priority)
Constructor.
ROJTREdge * chooseNext(const ROVehicle *const veh, SUMOReal time, const std::set< const ROEdge * > &avoid) const
Returns the next edge to use.
void setTurnDefaults(const std::vector< SUMOReal > &defs)
Sets the turning definition defaults.
std::vector< SUMOReal > myParsedTurnings
The defaults for turnings.
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
const std::string & getID() const
Returns the id.
A vehicle as used by router.
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding edges prohibit the given vehicle to pass them.
T get(MTRand *which=0) const
Draw a sample of the distribution.
An edge the jtr-router may route through.
void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
A basic edge for routing applications.
SUMOReal getOverallProb() const
Return the sum of the probabilites assigned to the members.
virtual void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
bool prohibits(const ROVehicle *const vehicle) const
Returns whether this edge prohibits the given vehicle to pass it.
Base class for nodes used by the router.
void addFollowerProbability(ROJTREdge *follower, SUMOReal begTime, SUMOReal endTime, SUMOReal probability)
adds the information about the percentage of using a certain follower