+
+ /// Marks the node with the given `node_id` as banned, i.e.,
+ /// it will be avoided during path finding.
+ pub fn add_banned(&mut self, node_id: &NodeId) {
+ self.params.banned_nodes.insert(*node_id);
+ }
+
+ /// Removes the node with the given `node_id` from the list of nodes to avoid.
+ pub fn remove_banned(&mut self, node_id: &NodeId) {
+ self.params.banned_nodes.remove(node_id);
+ }
+
+ /// Clears the list of nodes that are avoided during path finding.
+ pub fn clear_banned(&mut self) {
+ self.params.banned_nodes = HashSet::new();
+ }