WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
sleipnir::SolverConfig Struct Reference

Solver configuration. More...

#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/sleipnir/include/sleipnir/optimization/SolverConfig.hpp>

Public Attributes

double tolerance = 1e-8
 The solver will stop once the error is below this tolerance.
 
int maxIterations = 5000
 The maximum number of solver iterations before returning a solution.
 
double acceptableTolerance = 1e-6
 The solver will stop once the error is below this tolerance for acceptableIterations iterations.
 
int maxAcceptableIterations = 15
 The solver will stop once the error is below acceptableTolerance for this many iterations.
 
std::chrono::duration< double > timeout
 The maximum elapsed wall clock time before returning a solution.
 
bool feasibleIPM = false
 Enables the feasible interior-point method.
 
bool diagnostics = false
 Enables diagnostic prints.
 
bool spy = false
 Enables writing sparsity patterns of H, Aₑ, and Aᵢ to files named H.spy, A_e.spy, and A_i.spy respectively during solve.
 

Detailed Description

Solver configuration.

Member Data Documentation

◆ acceptableTolerance

double sleipnir::SolverConfig::acceptableTolerance = 1e-6

The solver will stop once the error is below this tolerance for acceptableIterations iterations.

This is useful in cases where the solver might not be able to achieve the desired level of accuracy due to floating-point round-off.

◆ diagnostics

bool sleipnir::SolverConfig::diagnostics = false

Enables diagnostic prints.

◆ feasibleIPM

bool sleipnir::SolverConfig::feasibleIPM = false

Enables the feasible interior-point method.

When the inequality constraints are all feasible, step sizes are reduced when necessary to prevent them becoming infeasible again. This is useful when parts of the problem are ill-conditioned in infeasible regions (e.g., square root of a negative value). This can slow or prevent progress toward a solution though, so only enable it if necessary.

◆ maxAcceptableIterations

int sleipnir::SolverConfig::maxAcceptableIterations = 15

The solver will stop once the error is below acceptableTolerance for this many iterations.

◆ maxIterations

int sleipnir::SolverConfig::maxIterations = 5000

The maximum number of solver iterations before returning a solution.

◆ spy

bool sleipnir::SolverConfig::spy = false

Enables writing sparsity patterns of H, Aₑ, and Aᵢ to files named H.spy, A_e.spy, and A_i.spy respectively during solve.

Use tools/spy.py to plot them.

◆ timeout

std::chrono::duration<double> sleipnir::SolverConfig::timeout
Initial value:
{
std::numeric_limits<double>::infinity()}

The maximum elapsed wall clock time before returning a solution.

◆ tolerance

double sleipnir::SolverConfig::tolerance = 1e-8

The solver will stop once the error is below this tolerance.


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