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