Collocation_Discretization_Transformation

(class from pyomo.dae.plugins.colloc)

class pyomo.dae.plugins.colloc.Collocation_Discretization_Transformation[source]

Bases: Transformation

__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

reduce_collocation_points(instance[, var, ...])

This method will add additional constraints to a model to reduce the number of free collocation points (degrees of freedom) for a particular variable.

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

reduce_collocation_points(instance, var=None, ncp=None, contset=None)[source]

This method will add additional constraints to a model to reduce the number of free collocation points (degrees of freedom) for a particular variable.

Parameters:
  • instance (Pyomo model) – The discretized Pyomo model to add constraints to

  • var (pyomo.environ.Var) – The Pyomo variable for which the degrees of freedom will be reduced

  • ncp (int) – The new number of free collocation points for var. Must be less that the number of collocation points used in discretizing the model.

  • contset (pyomo.dae.ContinuousSet) – The ContinuousSet that was discretized and for which the var will have a reduced number of degrees of freedom