InitMidpoint

(class from pyomo.contrib.preprocessing.plugins.init_vars)

class pyomo.contrib.preprocessing.plugins.init_vars.InitMidpoint(**kwds)[source]

Bases: IsomorphicTransformation

Initialize non-fixed variables to the midpoint of their bounds.

  • If the variable does not have bounds, set the value to zero.

  • If the variable is missing one bound, set the value to that of the existing bound.

__init__(**kwds)

Methods

__init__(**kwds)

apply(model, **kwds)

DEPRECATED.

apply_to(model, **kwds)

Apply the transformation to the given model.

create_using(model, **kwds)

Create a new model with this transformation

Member Documentation

apply(model, **kwds)

DEPRECATED.

Deprecated since version 4.3.11323: Transformation.apply() has been deprecated. Please use either Transformation.apply_to() for in-place transformations or Transformation.create_using() for transformations that create a new, independent transformed model instance.

apply_to(model, **kwds)

Apply the transformation to the given model.

create_using(model, **kwds)

Create a new model with this transformation