LP_exact
index
/home/hennich/.tmp/SONC_polynomial_optimization/python/LP_exact.py

Define constants and basic functions.

 
Modules
       
cdd
math
numpy
shutil
subprocess
sympy

 
Classes
       
builtins.object
LP

 
class LP(builtins.object)
    Class to solve an LP exactly.
 
  Methods defined here:
__init__(self, A, b, c=None, box=None)
Create LP problem min{cx : Ax <= b, x in box}.
solve_cdd(self)
Solve the LP via cdd.
solve_soplex(self)
Solve the LP: min c*x s.t. A*x = b, x >= 0.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
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

 
Data
        LP_solver_found = True
cdd_found = True