Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
1.9k stars 490 forks source link

Adding ParameterizedLinearRepn and corresponding walker #3268

Open emma58 opened 1 month ago

emma58 commented 1 month ago

Fixes # .

Summary/Motivation:

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:

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:

  1. I agree my contributions are submitted under the BSD license.
  2. 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.