With eventual bilevel programming applications in mind, this PR adds a ParameterizedLinearRepn object that has the same structure as LinearRepn but allows for an argument wrt to specify a list of Vars that will be treated as data for the purposes of creating the repn.
Changes proposed in this PR:
Adds ParameterizedLinearRepn component that inherits from LinearRepn but has to re-implement everything that assumes that constants and coefficients are numbers rather than expressions.
Adds ParameterizedLinearRepnVisitor that inherits from LinearRepnVisitor but adds a "pseudo-constant" expression type and new exitNode handlers for psuedo-constants (i.e., Pyomo expressions that we are treating as constant mathematically)
Adds handling for nan in assertExpressionsEqual
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:
I agree my contributions are submitted under the BSD license.
I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
Fixes # .
Summary/Motivation:
With eventual bilevel programming applications in mind, this PR adds a
ParameterizedLinearRepn
object that has the same structure asLinearRepn
but allows for an argumentwrt
to specify a list of Vars that will be treated as data for the purposes of creating the repn.Changes proposed in this PR:
ParameterizedLinearRepn
component that inherits fromLinearRepn
but has to re-implement everything that assumes that constants and coefficients are numbers rather than expressions.ParameterizedLinearRepnVisitor
that inherits fromLinearRepnVisitor
but adds a "pseudo-constant" expression type and new exitNode handlers for psuedo-constants (i.e., Pyomo expressions that we are treating as constant mathematically)assertExpressionsEqual
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: