McCormick

(class from pyomo.contrib.mcpp.pyomo_mcpp)

class pyomo.contrib.mcpp.pyomo_mcpp.McCormick(expression, improved_var_bounds=None)[source]

Bases: object

This class takes the constructed expression from MCPP_Visitor and allows for MC methods to be performed on pyomo expressions.

__repn__(self): returns a display of an MC expression in the form: F: [lower interval : upper interval ] [convex underestimator : concave overestimator ] [ (convex subgradient) : (concave subgradient]

lower(self): returns a float of the lower interval bound that is valid across the entire domain

upper(self): returns a float of the upper interval bound that is valid across the entire domain

concave(self): returns a float of the concave overestimator at the current value() of each variable.

convex(self): returns a float of the convex underestimator at the current value() of each variable.

##Note: In order to describe the concave and convex relaxations over the entire domain, it is necessary to use changePoint() to repeat the calculation at different points.

subcc(self): returns a ComponentMap() that maps the pyomo variables to the subgradients of the McCormick concave overestimators at the current value() of each variable.

subcv(self): returns a ComponentMap() that maps the pyomo variables to the subgradients of the McCormick convex underestimators at the current value() of each variable.

def changePoint(self, var, point): updates the current value() on the pyomo side and the current point on the MC++ side.

__init__(expression, improved_var_bounds=None)[source]

Methods

__init__(expression[, improved_var_bounds])

changePoint(var, point)

concave()

convex()

lower()

subcc()

subcv()

upper()

warn_if_var_missing_value()

Member Documentation