NonLinearProgrammingKKT

(class from pyomo.core.plugins.transform.kkt)

class pyomo.core.plugins.transform.kkt.NonLinearProgrammingKKT[source]

Bases: object

__init__()

Methods

__init__()

apply_to(model, **kwds)

Reformulate model with KKT conditions.

get_multiplier_from_object(model, component)

Return the multiplier for the object.

get_object_from_multiplier(model, multiplier_var)

Return the constraint corresponding to a KKT multiplier variable.

Attributes

CONFIG

Member Documentation

apply_to(model, **kwds)[source]

Reformulate model with KKT conditions.

get_multiplier_from_object(model, component)[source]

Return the multiplier for the object. If the object is a normal constraint, a single multiplier is returned. If the object is a ranged constraint or a variable, a tuple containing the lower and upper bound multipliers is returned.

Parameters:
  • model (ConcreteModel) – The model to which the kkt transformation was applied to

  • component (Constraint or Variable)

Returns:

The KKT multiplier(s) corresponding to the component. For ranged constraints/variables, returns (lb_mult, ub_mult), where an entry is ‘None’ if that bound doesn’t exist.

Return type:

VarData | tuple[VarData | None, VarData | None]

get_object_from_multiplier(model, multiplier_var)[source]

Return the constraint corresponding to a KKT multiplier variable. If the multiplier corresponds to an inequality formed by a variable bound, the variable is returned.

Parameters:
  • model (ConcreteModel) – The model on which the kkt transformation was applied

  • multiplier_var (Var) – A KKT multiplier created by the transformation.

Returns:

  • Constraint object

  • Variable

Return type:

Object