CheckLP

scalation.optimization.linear_opt.CheckLP
class CheckLP(a: MatrixD, b: VectorD, c: VectorD)

The CheckLP class checks the solution to Linear Programming (LP) problems. Given a constraint matrix 'a', limit/RHS vector 'b' and cost vector 'c', determine if the values for the solution/decision vector 'x' minimizes the objective function 'f(x)', while satisfying all of the constraints, i.e.,

minimize f(x) = c x subject to a x <= b, x >= 0

Check the feasibility and optimality of the solution.

Value parameters

a

the M-by-N constraint matrix

b

the M-length limit/RHS vector (make b_i negative for ">=" constraint => surplus)

c

the N-length cost vector

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def isCorrect(x: VectorD, y: VectorD, f: Double): Boolean

Check whether the solution is correct, feasible and optimal.

Check whether the solution is correct, feasible and optimal.

Value parameters

f

the optimum (minimum) value of the objective function

x

the N-length primal solution vector

y

the M-length dual solution vector

Attributes

def isDualFeasible(y: VectorD): Boolean

Determine whether the solution dual feasible 'y <= 0 and y a <= c'.

Determine whether the solution dual feasible 'y <= 0 and y a <= c'.

Value parameters

y

the M-length dual solution vector

Attributes

def isOptimal(x: VectorD, y: VectorD, f: Double): Boolean

Check whether the optimum objective function value f == c x == y b.

Check whether the optimum objective function value f == c x == y b.

Value parameters

f

the optimum (minimum) value of the objective function

x

the N-length primal solution vector

y

the M-length dual solution vector

Attributes

def isPrimalFeasible(x: VectorD): Boolean

Determine whether the solution primal feasible 'x >= 0 and a x [<= | >=] b'.

Determine whether the solution primal feasible 'x >= 0 and a x [<= | >=] b'.

Value parameters

x

the N-length primal solution vector

Attributes