22 #ifndef SUMOAbstractRouter_h
23 #define SUMOAbstractRouter_h
52 template<
class E,
class V>
80 virtual void compute(
const E* from,
const E* to,
const V*
const vehicle,
81 SUMOTime msTime, std::vector<const E*>& into) = 0;
84 const V*
const v,
SUMOTime msTime)
const = 0;
87 virtual void prepare(
const E*,
const V*,
bool) {
125 template<
class E,
class V>
128 inline bool operator()(
const E* edge,
const V* vehicle)
const {
132 return edge->prohibits(vehicle);
144 template<
class E,
class V>
SUMOLong myQueryStartTime
the time spent querying in milliseconds
std::vector< E * > myProhibited
bool operator()(const E *, const V *) const
virtual SUMOAbstractRouter * clone() const =0
SUMOReal(* Operation)(const E *const, const V *const, SUMOReal)
Type of the function that is used to retrieve the edge effort.
void prohibit(const std::vector< E * > &toProhibit)
virtual void prepare(const E *, const V *, bool)
Operation myOperation
The object's operation to perform.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
SUMOAbstractRouter & operator=(const SUMOAbstractRouter &s)
Invalidated assignment operator.
virtual ~SUMOAbstractRouter()
Destructor.
bool operator()(const E *edge, const V *vehicle) const
SUMOLong myQueryVisits
counters for performance logging
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.