wmpy.optimization.scipyoptimizer.ScipyOptimizer¶
- class ScipyOptimizer(epsilon=0.01)[source]¶
Bases:
objectDefault constructor.
- Parameters:
epsilon (
float) – small float constant used to enforce strict inequality constraints
Methods
Returns the largest axis-aligned hyperrectangle fully enclosed in the polytope by solving the convex optimization problem on 2N variables described here:
Returns the smallest axis-aligned hyperrectangle fully enclosing the polytope by making 2N calls to an LP solver.
Solves the constrained optimization problem where:
- compute_inner_box(polytope)[source]¶
Returns the largest axis-aligned hyperrectangle fully enclosed in the polytope by solving the convex optimization problem on 2N variables described here:
The result is stored for future uses.
- compute_outer_box(polytope)[source]¶
Returns the smallest axis-aligned hyperrectangle fully enclosing the polytope by making 2N calls to an LP solver.
The result is stored for future uses.
- optimize(polytope, polynomial, maximize=True)[source]¶
Solves the constrained optimization problem where:
polynomial is the objective function
polytope is the convex domain
Either polynomial is maximized (default) or minimized.
- Parameters:
polytope (
Polytope) – convex integration boundspolynomial (
Polynomial) – the objective functionmaximize (
bool) – Boolean flag (optional, def: True)
- Return type:
ndarray- Returns:
A numpy array corresponding to the arg{max/min}.