#include <route_planner_base.h>
|
virtual std::vector< long long int > | computeBestRoute (const F2CGraph2D &cov_graph, bool show_log, long int time_limit_seconds, bool use_guided_local_search=true) const |
|
virtual F2CGraph2D | createCoverageGraph (const F2CCells &cells, const F2CSwathsByCells &swaths_by_cells, F2CGraph2D &shortest_graph, double d_tol, bool redirect_swaths=true) const |
|
virtual F2CGraph2D | createShortestGraph (const F2CCells &cells, const F2CSwathsByCells &swaths_by_cells, double d_tol) const |
|
virtual F2CRoute | genRoute (const F2CCells &cells, const F2CSwathsByCells &swaths_by_cells, bool show_log=false, double d_tol=1e-4, bool redirect_swaths=true, long int time_limit_seconds=1, bool search_for_optimum=false) |
|
void | setStartAndEndPoint (const F2CPoint &p) |
| Set the start and the end of the route. More...
|
|
virtual F2CRoute | transformSolutionToRoute (const std::vector< long long int > &route_ids, const F2CSwathsByCells &swaths_by_cells, const F2CGraph2D &coverage_graph, F2CGraph2D &shortest_graph) const |
| Tranform index of points to an actual Route. More...
|
|
virtual | ~RoutePlannerBase ()=default |
|
Definition at line 23 of file route_planner_base.h.
◆ ~RoutePlannerBase()
virtual f2c::rp::RoutePlannerBase::~RoutePlannerBase |
( |
| ) |
|
|
virtualdefault |
◆ computeBestRoute()
std::vector< long long int > f2c::rp::RoutePlannerBase::computeBestRoute |
( |
const F2CGraph2D & |
cov_graph, |
|
|
bool |
show_log, |
|
|
long int |
time_limit_seconds, |
|
|
bool |
use_guided_local_search = true |
|
) |
| const |
|
virtual |
Use the optimizer to generate the index of the points of the best coverage route.
- Parameters
-
cov_graph | Graph representing the coverage problem |
show_log | Whether to show optimization logs |
time_limit_seconds | Maximum time to spend on optimization |
use_guided_local_search | If true, uses guided local search which may take longer but can find more optimal solutions. If false, uses automatic search which is faster but may find less optimal solutions. |
Definition at line 149 of file route_planner_base.cpp.
◆ createCoverageGraph()
Create graph to compute the cost of covering the swaths in a given order.
- Parameters
-
cells | Headland swath rings used to travel through the headlands |
swaths_by_cells | Swaths to be covered. |
shortest_graph | Graph to compute the shortest path between two nodes. |
d_tol | Tolerance distance to consider if two points are the same. |
Definition at line 91 of file route_planner_base.cpp.
◆ createShortestGraph()
Create graph to compute the shortest path between two points in the headlands.
- Parameters
-
cells | Headland swath rings used to travel through the headlands |
swaths_by_cells | Swaths to be covered. |
d_tol | Tolerance distance to consider if two points are the same. |
Definition at line 40 of file route_planner_base.cpp.
◆ genRoute()
F2CRoute f2c::rp::RoutePlannerBase::genRoute |
( |
const F2CCells & |
cells, |
|
|
const F2CSwathsByCells & |
swaths_by_cells, |
|
|
bool |
show_log = false , |
|
|
double |
d_tol = 1e-4 , |
|
|
bool |
redirect_swaths = true , |
|
|
long int |
time_limit_seconds = 1 , |
|
|
bool |
search_for_optimum = false |
|
) |
| |
|
virtual |
Generate route to cover the swaths on a field. If two consecutive swaths are far away, the route connects both through the headland.
- Parameters
-
cells | Headland swath rings used to travel through the headlands |
swaths_by_cells | Swaths to be covered. |
show_log | Show log from the optimizer |
d_tol | Tolerance distance to consider if two points are the same. |
redirect_swaths | Whether to allow redirecting swaths |
time_limit_seconds | Maximum time to spend on optimization |
search_for_optimum | If true, uses guided local search which may take longer but can find more optimal solutions. If false, uses automatic search which is faster but may find less optimal solutions. |
- Returns
- Route that covers all the swaths
Definition at line 21 of file route_planner_base.cpp.
◆ setStartAndEndPoint()
void f2c::rp::RoutePlannerBase::setStartAndEndPoint |
( |
const F2CPoint & |
p | ) |
|
◆ transformSolutionToRoute()
F2CRoute f2c::rp::RoutePlannerBase::transformSolutionToRoute |
( |
const std::vector< long long int > & |
route_ids, |
|
|
const F2CSwathsByCells & |
swaths_by_cells, |
|
|
const F2CGraph2D & |
coverage_graph, |
|
|
F2CGraph2D & |
shortest_graph |
|
) |
| const |
|
virtual |
◆ r_start_end
std::optional<F2CPoint> f2c::rp::RoutePlannerBase::r_start_end |
|
protected |
The documentation for this class was generated from the following files: