NonNegativeTransformation

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

class pyomo.core.plugins.transform.nonnegative_transform.NonNegativeTransformation(**kwds)[source]

Bases: IsomorphicTransformation

Creates a new, equivalent model by forcing all variables to lie in the nonnegative orthant by introducing auxiliary variables.

__init__(**kwds)[source]

Methods

__init__(**kwds)

apply(model, **kwds)

DEPRECATED.

apply_to(model, **kwds)

Apply the transformation to the given model.

boundsConstraintRule(lb, ub, attr, vars, model)

Produces 'lb < x^+ - x^- < ub' style constraints.

create_using(model, **kwds)

Create a new model with this transformation

delayedExprMapRule(ruleMap, model[, ndx])

Rule intended to return expressions from a lookup table.

exprMapRule(ruleMap, model[, ndx])

Rule intended to return expressions from a lookup table

noConstraint(*args)

sumRule(attr, vars, model)

Returns a sum expression.

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.

static boundsConstraintRule(lb, ub, attr, vars, model)[source]

Produces ‘lb < x^+ - x^- < ub’ style constraints. Designed to be made a closer through functools.partial, across lb, ub, attr, and vars. vars is a {varname: coefficient} dictionary. attr is the base variable name; that is, X[1] would be referenced by

model.__getattribute__(‘X’)[1]

and so attr=’X’, and 1 is a key of vars.

create_using(model, **kwds)

Create a new model with this transformation

static delayedExprMapRule(ruleMap, model, ndx=None)[source]

Rule intended to return expressions from a lookup table. Each entry in the lookup table is a functor that needs to be evaluated before returning.

static exprMapRule(ruleMap, model, ndx=None)[source]

Rule intended to return expressions from a lookup table

static sumRule(attr, vars, model)[source]

Returns a sum expression.