pub struct Problem<F> { /* private fields */ }Expand description
A linear program in augmented/slack form (with only equality constraints).
Any linear program can be expressed in normal form (with only inequality constraints), slack form (with only equality constraints), or as a mixture of both. For more details on these forms, see the Wiki on linear programming. The slack form is most suited for algorithms such as the simplex algorithm and interior point methods.
To construct a slack form problem from a generic problem, use ProblemBuilder::new or Problem::target.
Variables throughout this module use the following naming convention for a slack problem:
min_x c ' x
st A ' x == b
x >= 0With c the cost vector or target function, and constraints given by matrix A and vector b.
Implementations§
Source§impl<F: Float> Problem<F>
impl<F: Float> Problem<F>
Sourcepub fn target(c: &Array1<F>) -> ProblemBuilder<'_, F>
pub fn target(c: &Array1<F>) -> ProblemBuilder<'_, F>
Build a problem in slack form using the builder pattern.
Specify the cost vector c for which we will minimize c'x.
Returns a ProblemBuilder object that can be further configured with equality and inequality constraints.