| |
- LP_solve_exact(A, b, c=None, box=None)
- Exactly solve an LP min{cx : Ax <= b, x in box}.
Call:
opt = LP_solve_exact(A,b[,c,box])
Input:
A - `m x n`-matrix
b - array of length m
c [optional] - array of size n
box [optional] - list of pairs, with length n;
(low_i, up_i) implies constraint low_i <= x_i <= up_i
Output:
opt - array of length n; optimal (or just feasible if c = None) solution
- get_box(value, digits)
- Obtain enclosing interval for given value and accuracy.
Call:
box = get_box(value, digits)
Input:
value [number]
digits [positive integer] - accuracy in binary digits
Output:
box: pair of sympy-fractions, giving lower and upper bound for value
such that upper - lower <= 2^-digits
|