Drake
Drake C++ Documentation
GraphOfConvexSetsOptions Struct Reference

#include <drake/geometry/optimization/graph_of_convex_sets.h>

Public Member Functions

template<typename Archive >
void Serialize (Archive *a)
 Passes this object to an Archive. More...
 

Public Attributes

std::optional< bool > convex_relaxation {std::nullopt}
 Flag to solve the relaxed version of the problem. More...
 
std::optional< intmax_rounded_paths {std::nullopt}
 Maximum number of distinct paths to compare during random rounding; only the lowest cost path is returned. More...
 
std::optional< bool > preprocessing {std::nullopt}
 Performs a preprocessing step to remove edges that cannot lie on the path from source to target. More...
 
int max_rounding_trials {100}
 Maximum number of trials to find a novel path during random rounding. More...
 
double flow_tolerance {1e-5}
 Tolerance for ignoring flow along a given edge during random rounding. More...
 
int rounding_seed {0}
 Random seed to use for random rounding. More...
 
const solvers::SolverInterfacesolver {nullptr}
 Optimizer to be used to solve the MIP, the relaxation of the shortest path optimization problem and the convex restriction if no restriction_solver is provided. More...
 
const solvers::SolverInterfacerestriction_solver {nullptr}
 Optimizer to be used in SolveConvexRestriction(), which is also called during the rounding stage of SolveShortestPath() given the relaxation. More...
 
const solvers::SolverInterfacepreprocessing_solver {nullptr}
 Optimizer to be used in the preprocessing stage of GCS, which is performed when SolveShortestPath is called when the preprocessing setting has been set to true. More...
 
solvers::SolverOptions solver_options {}
 Options passed to the solver when solving the generated problem. More...
 
std::optional< solvers::SolverOptionsrestriction_solver_options
 Optional solver options to be used in SolveConvexRestriction(), which is also used during the rounding stage of SolveShortestPath() given the relaxation. More...
 
std::optional< solvers::SolverOptionspreprocessing_solver_options
 Optional solver options to be used by preprocessing_solver in the preprocessing stage of GCS, which is used in SolveShortestPath. More...
 
Parallelism parallelism {Parallelism::Max()}
 Some steps in GCS can be parallelized. More...
 

Member Function Documentation

◆ Serialize()

void Serialize ( Archive *  a)

Passes this object to an Archive.

Refer to YAML Serialization for background. Note: This only serializes options that are YAML built-in types.

Member Data Documentation

◆ convex_relaxation

std::optional<bool> convex_relaxation {std::nullopt}

Flag to solve the relaxed version of the problem.

As discussed in the paper, we know that this relaxation cannot solve the original NP-hard problem for all instances, but there are also many instances for which the convex relaxation is tight. If convex_relaxation=nullopt, then each GCS method is free to choose an appropriate default.

◆ flow_tolerance

double flow_tolerance {1e-5}

Tolerance for ignoring flow along a given edge during random rounding.

If convex_relaxation is false or max_rounded_paths is less than or equal to zero, this option is ignored.

◆ max_rounded_paths

std::optional<int> max_rounded_paths {std::nullopt}

Maximum number of distinct paths to compare during random rounding; only the lowest cost path is returned.

If convex_relaxation is false or this is less than or equal to zero, rounding is not performed. If max_rounded_paths=nullopt, then each GCS method is free to choose an appropriate default.

◆ max_rounding_trials

int max_rounding_trials {100}

Maximum number of trials to find a novel path during random rounding.

If convex_relaxation is false or max_rounded_paths is less than or equal to zero, this option is ignored.

◆ parallelism

Parallelism parallelism {Parallelism::Max()}

Some steps in GCS can be parallelized.

This is the maximum number of threads used in all places in the algorithm.

Note
Some solvers will choose their own level of parallelization, independent of this setting. To limit the number of threads, add solvers::CommonSolverOption::kMaxThreads to the solver_options.

◆ preprocessing

std::optional<bool> preprocessing {std::nullopt}

Performs a preprocessing step to remove edges that cannot lie on the path from source to target.

In most cases, preprocessing causes a net reduction in computation by reducing the size of the optimization solved. Note that this preprocessing is not exact. There may be edges that cannot lie on the path from source to target that this does not detect. If preprocessing=nullopt, then each GCS method is free to choose an appropriate default.

◆ preprocessing_solver

const solvers::SolverInterface* preprocessing_solver {nullptr}

Optimizer to be used in the preprocessing stage of GCS, which is performed when SolveShortestPath is called when the preprocessing setting has been set to true.

If not set, the interface at .solver will be used, if provided, otherwise the best solver for the given problem is selected. Note that if the solver cannot handle the type of optimization problem generated, then calling the solvers::SolverInterface::Solve() method will throw.

◆ preprocessing_solver_options

std::optional<solvers::SolverOptions> preprocessing_solver_options
Initial value:
{
std::nullopt}

Optional solver options to be used by preprocessing_solver in the preprocessing stage of GCS, which is used in SolveShortestPath.

If preprocessing_solver is set but this parameter is not then solver_options is used. For instance, one might want to print solver logs for the main optimization, but not from the many smaller preprocessing optimizations.

◆ restriction_solver

const solvers::SolverInterface* restriction_solver {nullptr}

Optimizer to be used in SolveConvexRestriction(), which is also called during the rounding stage of SolveShortestPath() given the relaxation.

If not set, the interface at .solver will be used, if provided, otherwise the best solver for the given problem is selected. Note that if the solver cannot handle the type of optimization problem generated, then calling the solvers::SolverInterface::Solve() method will throw.

◆ restriction_solver_options

std::optional<solvers::SolverOptions> restriction_solver_options
Initial value:
{
std::nullopt}

Optional solver options to be used in SolveConvexRestriction(), which is also used during the rounding stage of SolveShortestPath() given the relaxation.

If not set, solver_options is used. For instance, one might want to set tighter (i.e., lower) tolerances for running the relaxed problem and looser (i.e., higher) tolerances for final solves during rounding.

◆ rounding_seed

int rounding_seed {0}

Random seed to use for random rounding.

If convex_relaxation is false or max_rounded_paths is less than or equal to zero, this option is ignored.

◆ solver

const solvers::SolverInterface* solver {nullptr}

Optimizer to be used to solve the MIP, the relaxation of the shortest path optimization problem and the convex restriction if no restriction_solver is provided.

If not set, the best solver for the given problem is selected. Note that if the solver cannot handle the type of optimization problem generated, the calling solvers::SolverInterface::Solve() method will throw.

◆ solver_options

solvers::SolverOptions solver_options {}

Options passed to the solver when solving the generated problem.


The documentation for this struct was generated from the following file: