23 #ifndef __NAVGRAPH_CONSTRAINTS_TIMED_RESERVATION_LIST_EDGE_CONSTRAINT_H_ 24 #define __NAVGRAPH_CONSTRAINTS_TIMED_RESERVATION_LIST_EDGE_CONSTRAINT_H_ 26 #include <navgraph/constraints/static_list_edge_constraint.h> 31 #include <utils/time/time.h> 32 #include <navgraph/navgraph.h> 33 #include <logging/logger.h> 44 std::vector<std::pair<fawkes::NavGraphEdge, fawkes::Time>>
edge_time_list );
48 const std::vector<std::pair<fawkes::NavGraphEdge, fawkes::Time>> &
edge_time_list()
const;
51 void add_edges(
const std::vector<std::pair<fawkes::NavGraphEdge, fawkes::Time>> &edges);
56 virtual bool compute(
void)
throw();
61 std::vector<std::pair<fawkes::NavGraphEdge, fawkes::Time>> edge_time_list_;
65 std::string constraint_name_;
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
Constraint that can be queried to check if an edge is blocked.
NavGraphTimedReservationListEdgeConstraint(Logger *logger, std::string constraint_name, fawkes::Clock *clock)
Constructor.
Fawkes library namespace.
This is supposed to be the central clock in Fawkes.
bool has_edge(const fawkes::NavGraphEdge &edge)
Check if constraint has a specific edge.
virtual ~NavGraphTimedReservationListEdgeConstraint()
Virtual empty destructor.
A class for handling time.
virtual bool blocks(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Check if constraint blocks an edge.
void clear_edges()
Remove all edges.
const std::vector< std::pair< fawkes::NavGraphEdge, fawkes::Time > > & edge_time_list() const
Get list of blocked edges.
Constraint that holds a list of edges to block with timeouts.
void remove_edge(const fawkes::NavGraphEdge &edge)
Remove a single edge from the constraint list.
void add_edges(const std::vector< std::pair< fawkes::NavGraphEdge, fawkes::Time >> &edges)
Add multiple edges to constraint list.
void add_edge(const fawkes::NavGraphEdge &edge, const fawkes::Time valid_time)
Add a single edge to constraint list.