COFE can't refresh parameter dialog

Discusses use of COCO, the process simulation and modelling software suite from AmsterCHEM, downloadable from http://www.cocosimulator.org

Moderator: jasper

Post Reply
bcbooo
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

COFE can't refresh parameter dialog

Post by bcbooo »

Jasper,I want to change the value of "pressureRatio" during the "Calculate" function, but I find COFE can't refresh the "Edit" dialog, as the following.
Untitled.jpg
Untitled.jpg (199.62 KiB) Viewed 11082 times
The pressureRatio's initial value is "2", and during the calculation I change it into "9.01", but the pressureRatio's value on Edit dialog is still "2" not "9.01". It's well done in Aspen Plus, so maybe it's a bug in COFE, COFE forgets to refresh the parameter dialog after calculation.

Thanks.
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: COFE can't refresh parameter dialog

Post by jasper »

My guess is that you are solving in a background thread (edit, preferences, allow for solving in a background thread is checked) and that you have not yet implemented persistence to store the parameter values. So the new parameter value lives in the background thread, then the unit gets saved and reloaded in the foreground thread, and the parameters do not get restored. Correct?

You can simply test this hypothesis by not solving in a background thread. If indeed this solves your issue, check why Save/Load does not restore your parameter value...
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: COFE can't refresh parameter dialog

Post by jasper »

Note that you will see quicker results if you add the parameter in a parameter report inside the flowsheet or in the Watch window. Then you do not have to actually go into the dialog every time.
bcbooo
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

Re: COFE can't refresh parameter dialog

Post by bcbooo »

Jasper, I have gotten it!

I don't implement the persistence.
Post Reply

Return to “COCO (AmsterCHEM)”