CCSI-Toolset / FOQUS

FOQUS: Framework for Optimization and Quantification of Uncertainty and Surrogates
https://foqus.readthedocs.io
Other
46 stars 54 forks source link

OUU: recourse variables remain constant #58

Closed fsoepyan closed 6 years ago

fsoepyan commented 6 years ago

When I run OUU, the recourse variables remain constant from start to finish. Furthermore, the value of each recourse variable is the average of its minimum and maximum values.

I have attached an Excel file that tabulates the OUU results for a problem John (@eslickj), Miguel (@MAZamarripa) and I are working on.

In the Excel file, the decision variables (Z1) are highlighted blue, the recourse variables (Z2) are highlighted green, the uncertain variables (Z4) are highlighted orange, and the two outputs of interest are highlighted yellow. I did the OUU with 10 samples generated using Latin hypercube sampling, assuming all uncertain variables have uniform distributions.

OUU_Tab_11.03.2017.xlsx

ngbrenda commented 6 years ago

When recourse variables are passed to FOQUS, they are internally changed by Aspen, but these changes are not propagated back to FOQUS. That is why you perceive these recourse variables to remain constant.

In order for the recourse variables to change from each OUU iteration, you will need for Aspen to return the (updated) values of those recourse variables as outputs, so that we may instantiate the values of the recourse variables at the next iteration of OUU.

In the past, Turbine would remember the values of the recourse variables and would instantiate with the updated values in the next call. @eslickj, chime in because you know how Turbine works.

eslickj commented 6 years ago

Recourse variable in OUU when optimized in Aspen are simulation outputs. If the are set to inputs I don't think simsinter and turbine return values.

ngbrenda commented 6 years ago

@eslickj, what are doing about this? If there is nothing to do, please close issue.

MAZamarripa commented 6 years ago

In some cases, we are using optimization scripts inside ACM to solve the recourse variables, so in that case the recourse variables should be included as output variables. In other cases, we use both first stage and recourse variables in OUU. I talked to Byron and he will run both cases in OUU before closing the issue @fsoepyan

fsoepyan commented 6 years ago

At the moment, I can't tell if the problem is still there, because FOQUS no longer records OUU runs in the Flowsheet "Results" table (which can be accessed by clicking the table icon in the menu on the left).

ngbrenda commented 6 years ago

@fsoepyan, if you want the recourse variables to change, modify your Aspen simulation such that your flowsheet node will return the recourse variables are outputs, then we can do something about this. Until you do this, there is not much we can do.

fsoepyan commented 6 years ago

I remember in the FOQUS version I downloaded from Jenkins, when I ran OUU, FOQUS records the values of the variables in the Flowsheet table.

However, in the FOQUS version I downloaded from GitHub, when I run OUU, FOQUS does not record the values of the variables in the Flowsheet table.

Is there a way we can get FOQUS to record the values of the variables in the Flowsheet table for OUU?

ou3llnl commented 6 years ago

@eslickj : Was there a change with recording the flowsheet table values?

ou3llnl commented 6 years ago

Oh, the values recording is actually issue #146

fsoepyan commented 6 years ago

Brenda (@ngbrenda), in a lot of our applications, when we need to do OUU on a process in Aspen, we handle recourse variables by doing the 2nd stage optimization in Aspen.

I guess we can close this issue?

fsoepyan commented 6 years ago

After a discussion with Miguel (@MAZamarripa), we agree that this issue can be closed.