A solver for parametric linear programs written in Rust. Specifically, it solves programs of the form maximize
λ1(c1x1 + c2x2 + ... c0) +
λ2(c1x1 + c2x2 + ... c0) + ...
and prints resulting inequalities in x.
Input is a file in the root project directory. The file must fit the form described below.
Input consists of the optimization function on the first line then constraints on all further lines.
All terms are separated by whitespace.
Only the coefficients of the terms are supplied by the user.
Parametric input has terms consisting of polynomials in x, so to indicate they are one term
the polynomials are enclosed in square brackets, e.g.
[1 0 -4] [2 3 0] corresponds to λ1(x1 - 4) + λ2(2x1 + 3x2)
In the parametric case, constraints are equalities or inequalities in lambda.
Constant terms are put on the right hand side of the equality or inequality, which can be either "=", ">=" or "<="
Additionally, there is an implicit constraint that all variables have non-negative values, i.e. λi ≥ 0.