pyomo icon indicating copy to clipboard operation
pyomo copied to clipboard

Greybox Objectives

Open michaelbynum opened this issue 1 year ago • 4 comments

Summary/Motivation:

This PR adds support for objectives in PyNumero grey box models.

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.

michaelbynum avatar Sep 08 '24 17:09 michaelbynum

I haven't reviewed changes in _evaluate_hessian_if_necessary_and_cache yet, but this looks fine.

Just curious, what is the motivation for doing this instead of just using outputs and putting them in the objective? Is there some motivating use case where this works better?

This is me. For applications I work with, it's common for people to just come with a black box and say "minimize". Clearly that approach is not ideal, but allowing this capability will enable us to reach out to people who are used to doing optimization that way and help us convert them to the light side of the force...

codykarcher avatar Sep 18 '24 19:09 codykarcher

For applications I work with, it's common for people to just come with a black box and say "minimize"

Okay, so this is basically just for convenience.

Clearly that approach is not ideal

I don't think it's clear at all. I'm usually a fan of eliminating auxiliary variables where possible, so this approach appeals to me. I was just curious if there was an example where it actually mattered for performance or reliability.

Robbybp avatar Sep 18 '24 20:09 Robbybp

For applications I work with, it's common for people to just come with a black box and say "minimize"

Okay, so this is basically just for convenience.

Clearly that approach is not ideal

I don't think it's clear at all. I'm usually a fan of eliminating auxiliary variables where possible, so this approach appeals to me. I was just curious if there was an example where it actually mattered for performance or reliability.

It is not ideal in the context of it hides structure I could potentially implement in my optimization problem. IE, what if my black box is hiding a convex optimization problem? But yea, it is a matter of convenience not performance.

codykarcher avatar Sep 27 '24 22:09 codykarcher

@michaelbynum , @Robbybp - We are hoping to cut a patch release on Monday (the 14th). Any chance this is going to make it into that?

mrmundt avatar Oct 08 '24 18:10 mrmundt

@michaelbynum , @Robbybp - Pinging on this PR again! Any update?

mrmundt avatar Nov 26 '24 19:11 mrmundt