内部表示GDP转换

(类来自 pyomo.contrib.piecewise.transform.inner_representation_gdp)

class pyomo.contrib.piecewise.transform.inner_representation_gdp.InnerRepresentationGDPTransformation[source]

基础类: PiecewiseLinearTransformationBase

通过将分段线性函数表示为析取式,将涉及分段线性表达式的模型转换为GDP,其中线性函数定义的单纯形以“内部”表示形式表示——作为其极点的凸组合。定义凸组合的乘数对于每个析取式是局部的,因此在每个单纯形中每个极点都有一个乘数。

This transformation can be called in one of two ways:
  1. 默认情况下,'descend_into_expressions' 为 False。这种方式在计算上更高效,但依赖于在表达式中使用的 PiecewiseLinearFunctions 被声明在同一个 Block 中(如果你希望保持模型的原始层次结构)。在这种模式下,目标必须是 Blocks 和/或 PiecewiseLinearFunctions。

  2. 当‘descend_into_expressions’为True时。这种方法的计算效率较低,但会通过查找在约束和目标表达式中使用的PiecewiseLinearFunctions,并将它们的转换对应项放在拥有其父表达式的组件的同一父块上,从而尊重层次结构。在这种模式下,目标必须是块、约束和/或目标。

__init__()

方法

__init__()

apply(model, **kwds)

已弃用。

apply_to(model, **kwds)

将转换应用于给定的模型。

create_using(model, **kwds)

使用此转换创建一个新模型

属性

CONFIG

成员文档

apply(model, **kwds)

已弃用。

自版本4.3.11323起已弃用:Transformation.apply() 已被弃用。请使用 Transformation.apply_to() 进行原地转换,或使用 Transformation.create_using() 创建新的独立转换模型实例。

apply_to(model, **kwds)

将转换应用于给定的模型。

create_using(model, **kwds)

使用此转换创建一个新模型