FixedVarPropagator
(类来自 pyomo.contrib.preprocessing.plugins.equality_propagate)
- class pyomo.contrib.preprocessing.plugins.equality_propagate.FixedVarPropagator(**kwds)[source]
-
传播变量固定以处理类型为 \(x = y\) 的等式。
如果 \(x\) 是固定的且 \(y\) 不是固定的,那么这个转换将把 \(y\) 固定为 \(x\) 的值。
这种转换也可以作为临时转换执行,转换后的变量会被保存,以后可以取消固定。
以下关键字参数是为
apply_to和create_using函数指定的。- Keyword Arguments:
tmp (bool, default=False) – 如果为True,则存储转换后的变量集及其旧状态,以便以后可以恢复。
- __init__(**kwds)
方法
__init__(**kwds)apply(model, **kwds)已弃用。
apply_to(model, **kwds)将转换应用于给定的模型。
create_using(model, **kwds)使用此转换创建一个新模型
revert(instance)恢复由转换固定的变量。
属性
CONFIG成员文档
- apply(model, **kwds)
已弃用。
自版本4.3.11323起已弃用:Transformation.apply() 已被弃用。请使用 Transformation.apply_to() 进行原地转换,或使用 Transformation.create_using() 创建新的独立转换模型实例。
- apply_to(model, **kwds)
将转换应用于给定的模型。
- create_using(model, **kwds)
使用此转换创建一个新模型