NonlinearToPWL

(class from pyomo.contrib.piecewise.transform.nonlinear_to_pwl)

class pyomo.contrib.piecewise.transform.nonlinear_to_pwl.NonlinearToPWL[source]

Bases: Transformation

Convert nonlinear constraints and objectives to piecewise-linear approximations.

__init__()[source]

Methods

__init__()

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

get_src_component(cons)

get_transformed_component(cons)

get_transformed_nonlinear_constraints(model)

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of general (not quadratic) nonlinear Constraints that were approximated with PiecewiseLinearFunctions

get_transformed_nonlinear_objectives(model)

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of general (not quadratic) nonlinear Constraints that were approximated with PiecewiseLinearFunctions

get_transformed_quadratic_constraints(model)

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of quadratic Constraints that were approximated with PiecewiseLinearFunctions

get_transformed_quadratic_objectives(model)

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of quadratic Constraints that were approximated with PiecewiseLinearFunctions

Attributes

CONFIG

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

get_transformed_nonlinear_constraints(model)[source]

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of general (not quadratic) nonlinear Constraints that were approximated with PiecewiseLinearFunctions

get_transformed_nonlinear_objectives(model)[source]

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of general (not quadratic) nonlinear Constraints that were approximated with PiecewiseLinearFunctions

get_transformed_quadratic_constraints(model)[source]

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of quadratic Constraints that were approximated with PiecewiseLinearFunctions

get_transformed_quadratic_objectives(model)[source]

Given a model that has been transformed with contrib.piecewise.nonlinear_to_pwl, return the list of quadratic Constraints that were approximated with PiecewiseLinearFunctions