DebugAMPLRepn

(class from pyomo.repn.ampl)

class pyomo.repn.ampl.DebugAMPLRepn(const, linear, nonlinear)[source]

Bases: AMPLRepn

An AMPLRepn that uses the “debug” (annotated) NL format

This is identical to the AMPLRepn class, except it is built using the TextNLDebugTemplate formatting template. This format includes descriptions of the operators and variable / expression names in the NL text.

__init__(const, linear, nonlinear)

Methods

__init__(const, linear, nonlinear)

append(other)

Append a child result from acceptChildResult

compile_nonlinear_fragment()

compile_repn([prefix, args, named_exprs])

duplicate()

to_expr(var_map)

Attributes

const

linear

mult

named_exprs

nl

nonlinear

Member Documentation

append(other)

Append a child result from acceptChildResult

Notes

This method assumes that the operator was “+”. It is implemented so that we can directly use an AMPLRepn() as a data object in the expression walker (thereby avoiding the function call for a custom callback)