Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shermanjasonaf
Copy link
Contributor

Summary/Motivation:

Ensure optimality of decision rules (DR) with respect to the PyROS master problem is properly enforced for problems with a nominal objective focus (i.e. objective_focus=ObjectiveType.nominal passed to the PyROS solver).

Let $k \in \{0, 1, \dots\}$ denote the index of the current PyROS iteration. Let $x^\star$ denote the optimal master first-stage variable values for the current iteration. For each $r = 0, 1, \dots, k$, let $z^{r,\star}, y^{r,\star}$ denote the optimal second-stage and state variable values for block $r$ of the master problem of the current iteration. Now let

$$F^{r} = f_1(x^\star) + f_2(x^\star, z^{r,\star}, y^{r,\star}, q^{r}), \qquad r = 0, 1, \dots, k$$

where $f_1$ and $f_2$ are the first-stage and second-stage objective functions, respectively; and $q^0, q^1, \dots, q^k$ are the uncertain parameter realizations of the current master problem. Under a nominal objective focus, the optimality constraint of the DR polishing problem of the current iteration should be

$$F^{0} \geq f_1(x^\star) + f_2(x^\star, z^0, y^0; q^0)$$

in which $z^0, y^0$ are the nominal second-stage and state variables for block 0 of the polishing problem. However, PyROS currently implements

$$F^{k} \geq f_1(x^\star) + f_2(x^\star, z^0, y^0; q^0)$$

which may result in suboptimal polished decision rules.

Changes proposed in this PR:

  • Fix DR polishing problem optimality constraint under nominal objective focus

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.

@shermanjasonaf
Copy link
Contributor Author

Feel free to add @natalieisenberg as a reviewer.

@codecov
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c2475d8) 88.08% compared to head (ada43df) 88.09%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3060   +/-   ##
=======================================
  Coverage   88.08%   88.09%           
=======================================
  Files         774      774           
  Lines       91536    91536           
=======================================
+ Hits        80634    80642    +8     
+ Misses      10902    10894    -8     
Flag Coverage Δ
linux 85.45% <ø> (ø)
osx 75.43% <ø> (ø)
other 85.63% <ø> (ø)
win 82.77% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jsiirola jsiirola merged commit c1e3d84 into Pyomo:main Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants