Struct osqp::Problem
[−]
[src]
pub struct Problem { /* fields omitted */ }
An instance of the OSQP solver.
Methods
impl Problem
[src]
pub fn update_rho(&mut self, value: f64)
[src]
Sets the ADMM step rho.
pub fn update_max_iter(&mut self, value: u32)
[src]
Sets the maximum number of ADMM iterations.
Panics on 32-bit platforms if the value is above i32::max_value()
.
pub fn update_eps_abs(&mut self, value: f64)
[src]
Sets the absolute convergence tolerance.
pub fn update_eps_rel(&mut self, value: f64)
[src]
Sets the relative convergence tolerance.
pub fn update_eps_prim_inf(&mut self, value: f64)
[src]
Sets the primal infeasibility tolerance.
pub fn update_eps_dual_inf(&mut self, value: f64)
[src]
Sets the dual infeasibility tolerance.
pub fn update_alpha(&mut self, value: f64)
[src]
Sets the linear solver relaxation parameter.
pub fn update_delta(&mut self, value: f64)
[src]
Sets the polishing regularization parameter.
pub fn update_polish(&mut self, value: bool)
[src]
Enables polishing the ADMM solution.
pub fn update_polish_refine_iter(&mut self, value: u32)
[src]
Sets the number of iterative refinement steps to use when polishing.
Panics on 32-bit platforms if the value is above i32::max_value()
.
pub fn update_verbose(&mut self, value: bool)
[src]
Enables writing progress to stdout.
pub fn update_scaled_termination(&mut self, value: bool)
[src]
Enables scaled termination criteria.
pub fn update_check_termination(&mut self, value: Option<u32>)
[src]
Sets the number of ADMM iterations between termination checks.
If None
termination checking is disabled.
Panics on 32-bit platforms if the value is above i32::max_value()
.
pub fn update_warm_start(&mut self, value: bool)
[src]
Enables warm starting the primal and dual variables from the previous solution.
pub fn update_time_limit(&mut self, value: Option<Duration>)
[src]
Sets the solve time limit.
impl Problem
[src]
pub fn new<'a, 'b, T: Into<CscMatrix<'a>>, U: Into<CscMatrix<'b>>>(
P: T,
q: &[f64],
A: U,
l: &[f64],
u: &[f64],
settings: &Settings
) -> Problem
[src]
P: T,
q: &[f64],
A: U,
l: &[f64],
u: &[f64],
settings: &Settings
) -> Problem
Initialises the solver and validates the problem.
Panics if the problem is invalid.
pub fn update_lin_cost(&mut self, q: &[f64])
[src]
Sets the linear part of the cost function to q
.
pub fn update_bounds(&mut self, l: &[f64], u: &[f64])
[src]
Sets the lower and upper bounds of the constraints to l
and u
.
pub fn update_lower_bound(&mut self, l: &[f64])
[src]
Sets the lower bound of the constraints to l
.
pub fn update_upper_bound(&mut self, u: &[f64])
[src]
Sets the upper bound of the constraints to u
.
pub fn warm_start(&mut self, x: &[f64], y: &[f64])
[src]
Warm starts the primal variables at x
and the dual variables at y
.
pub fn warm_start_x(&mut self, x: &[f64])
[src]
Warm starts the primal variables at x
.
pub fn warm_start_y(&mut self, y: &[f64])
[src]
Warms start the dual variables at y
.
pub fn update_P<'a, T: Into<CscMatrix<'a>>>(&mut self, P: T)
[src]
Updates the elements of matrix P
without changing its sparsity structure.
pub fn update_A<'a, T: Into<CscMatrix<'a>>>(&mut self, A: T)
[src]
Updates the elements of matrix A
without changing its sparsity structure.
pub fn update_P_A<'a, 'b, T: Into<CscMatrix<'a>>, U: Into<CscMatrix<'b>>>(
&mut self,
P: T,
A: U
)
[src]
&mut self,
P: T,
A: U
)
Updates the elements of matrices P
and A
without changing either's sparsity structure.
pub fn solve<'a>(&'a mut self) -> Status<'a>
[src]
Attempts to solve the quadratic program.