[−][src]Struct osqp::Problem
An instance of the OSQP solver.
Implementations
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
) -> Result<Problem, SetupError>
[src]
P: T,
q: &[f64],
A: U,
l: &[f64],
u: &[f64],
settings: &Settings
) -> Result<Problem, SetupError>
Initialises the solver and validates the problem.
Returns an error if the problem is non-convex or the solver cannot be initialised.
Panics if any of the matrix or vector dimensions are incompatible, if P
or A
are not
valid CSC matrices, or if P
is not structurally upper triangular.
pub fn update_lin_cost(&mut self, q: &[f64])
[src]
Sets the linear part of the cost function to q
.
Panics if the length of q
is not the same as the number of problem variables.
pub fn update_bounds(&mut self, l: &[f64], u: &[f64])
[src]
Sets the lower and upper bounds of the constraints to l
and u
.
Panics if the length of l
or u
is not the same as the number of problem constraints.
pub fn update_lower_bound(&mut self, l: &[f64])
[src]
Sets the lower bound of the constraints to l
.
Panics if the length of l
is not the same as the number of problem constraints.
pub fn update_upper_bound(&mut self, u: &[f64])
[src]
Sets the upper bound of the constraints to u
.
Panics if the length of u
is not the same as the number of problem constraints.
pub fn warm_start(&mut self, x: &[f64], y: &[f64])
[src]
Warm starts the primal variables at x
and the dual variables at y
.
Panics if the length of x
is not the same as the number of problem variables or the
length of y
is not the same as the number of problem constraints.
pub fn warm_start_x(&mut self, x: &[f64])
[src]
Warm starts the primal variables at x
.
Panics if the length of x
is not the same as the number of problem variables.
pub fn warm_start_y(&mut self, y: &[f64])
[src]
Warms start the dual variables at y
.
Panics if the length of y
is not the same as the number of problem constraints.
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.
Panics if the sparsity structure of P
differs from the sparsity structure of the P
matrix provided to Problem::new
.
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.
Panics if the sparsity structure of A
differs from the sparsity structure of the A
matrix provided to Problem::new
.
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.
Panics if the sparsity structure of P
or A
differs from the sparsity structure of the
P
or A
matrices provided to Problem::new
.
pub fn solve<'a>(&'a mut self) -> Status<'a>
[src]
Attempts to solve the quadratic program.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,