22 #ifndef SUMOAbstractRouter_h 23 #define SUMOAbstractRouter_h 52 template<
class E,
class V>
81 virtual void compute(
const E* from,
const E* to,
const V*
const vehicle,
82 SUMOTime msTime, std::vector<const E*>& into) = 0;
85 const V*
const v,
SUMOTime msTime)
const = 0;
128 template<
class E,
class V>
131 inline bool operator()(
const E* edge,
const V* vehicle)
const {
132 if (std::find(myProhibited.begin(), myProhibited.end(), edge) != myProhibited.end()) {
135 return edge->prohibits(vehicle);
139 myProhibited = toProhibit;
147 template<
class E,
class V>
std::vector< E * > myProhibited
long long int myQueryTimeSum
SUMOReal(* Operation)(const E *const, const V *const, SUMOReal)
Type of the function that is used to retrieve the edge effort.
virtual SUMOAbstractRouter * clone() const =0
bool operator()(const E *, const V *) const
bool myBulkMode
whether we are currently operating several route queries in a bulk
Operation myOperation
The object's operation to perform.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
long long int myQueryStartTime
the time spent querying in milliseconds
SUMOAbstractRouter & operator=(const SUMOAbstractRouter &s)
Invalidated assignment operator.
virtual ~SUMOAbstractRouter()
Destructor.
bool operator()(const E *edge, const V *vehicle) const
long long int myNumQueries
long long int myQueryVisits
counters for performance logging
void prohibit(const std::vector< E * > &toProhibit)
virtual SUMOReal recomputeCosts(const std::vector< const E * > &edges, const V *const v, SUMOTime msTime) const =0
virtual void compute(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into)=0
Builds the route between the given edges using the minimum effort at the given time The definition of...
void endQuery(int visits)
static long getCurrentMillis()
Returns the current time in milliseconds.
#define WRITE_MESSAGE(msg)
SUMOReal getEffort(const E *const e, const V *const v, SUMOReal t) const
const std::string myType
the type of this router
SUMOAbstractRouter(Operation operation, const std::string &type)
Constructor.
void setBulkMode(const bool mode)