WPILibC++ 2025.1.1
|
Solver configuration. More...
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. | |
Solver configuration.
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.
bool sleipnir::SolverConfig::diagnostics = false |
Enables diagnostic prints.
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.
int sleipnir::SolverConfig::maxAcceptableIterations = 15 |
The solver will stop once the error is below acceptableTolerance
for this many iterations.
int sleipnir::SolverConfig::maxIterations = 5000 |
The maximum number of solver iterations before returning a solution.
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.
std::chrono::duration<double> sleipnir::SolverConfig::timeout |
The maximum elapsed wall clock time before returning a solution.
double sleipnir::SolverConfig::tolerance = 1e-8 |
The solver will stop once the error is below this tolerance.