调试AMPL表示
(类来自 pyomo.repn.ampl)
- class pyomo.repn.ampl.DebugAMPLRepn(const, linear, nonlinear)[source]
基础:
AMPLRepn一个使用“调试”(注释)NL格式的AMPLRepn
这与
AMPLRepn类相同,只是它使用了TextNLDebugTemplate格式化模板构建。这种格式包括NL文本中操作符和变量/表达式名称的描述。- __init__(const, linear, nonlinear)
方法
__init__(const, linear, nonlinear)append(other)从acceptChildResult追加一个子结果
compile_nonlinear_fragment()compile_repn([prefix, args, named_exprs])duplicate()to_expr(var_map)属性
constlinearmultnamed_exprsnlnonlinear成员文档
- append(other)
从acceptChildResult追加一个子结果
注释
该方法假设运算符为“+”。它的实现使得我们可以直接在表达式遍历器中使用AMPLRepn()作为数据对象(从而避免为自定义回调进行函数调用)。