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