Sleipnir C++ API
Loading...
Searching...
No Matches
slp::Options Struct Reference

#include <sleipnir/optimization/solver/options.hpp>

Public Attributes

double tolerance = 1e-8
 The solver will stop once the error is below this tolerance.
 
int max_iterations = 5000
 The maximum number of solver iterations before returning a solution.
 
std::chrono::duration< double > timeout
 The maximum elapsed wall clock time before returning a solution.
 
bool feasible_ipm = false
 
bool diagnostics = false
 
bool spy = false
 

Detailed Description

Solver options.

Member Data Documentation

◆ diagnostics

bool slp::Options::diagnostics = false

Enables diagnostic prints.

Heading Description
iter Iteration number
type Iteration type (normal, accepted second-order correction, rejected second-order correction)
time (ms) Duration of iteration in milliseconds
error Error estimate
cost Cost function value at current iterate
infeas. Constraint infeasibility at current iterate
complement. Complementary slackness at current iterate (sᵀz)
μ Barrier parameter
reg Iteration matrix regularization
primal α Primal step size
dual α Dual step size
Number of line search backtracks

◆ feasible_ipm

bool slp::Options::feasible_ipm = 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.

◆ spy

bool slp::Options::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> slp::Options::timeout
Initial value:
{
std::numeric_limits<double>::infinity()}

The maximum elapsed wall clock time before returning a solution.


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