Struct PlannerSolution
Defined in File ProblemDefinition.h
Struct Documentation
-
struct PlannerSolution
Representation of a solution to a planning problem.
Public Functions
-
inline PlannerSolution(const PathPtr &path)
Construct a solution that consists of a path and its attributes (whether it is approximate and the difference to the desired goal)
-
inline bool operator==(const PlannerSolution &p) const
Return true if two solutions are the same.
-
bool operator<(const PlannerSolution &b) const
Define a ranking for solutions.
-
inline void setApproximate(double difference)
Specify that the solution is approximate and set the difference to the goal.
-
inline void setOptimized(const OptimizationObjectivePtr &opt, Cost cost, bool meetsObjective)
Set the optimization objective used to optimize this solution, the cost of the solution and whether it was optimized or not.
-
inline void setPlannerName(const std::string &name)
Set the name of the planner used to compute this solution.
Public Members
-
int index_ = {-1}
When multiple solutions are found, each is given a number starting at 0, so that the order in which the solutions was found can be retrieved.
-
double length_
For efficiency reasons, keep the length of the path as well.
-
bool approximate_ = {false}
True if goal was not achieved, but an approximate solution was found.
-
double difference_ = {0.}
The achieved difference between the found solution and the desired goal.
-
bool optimized_ = {false}
True if the solution was optimized to meet the specified optimization criterion.
-
OptimizationObjectivePtr opt_
Optimization objective that was used to optimize this solution.
-
std::string plannerName_
Name of planner type that generated this solution, as received from Planner::getName()
-
inline PlannerSolution(const PathPtr &path)