STATUS default value

17 views
Skip to first unread message

wcottee

unread,
Aug 22, 2021, 9:00:02 PM8/22/21
to apmonitor

I have an optimal control problem in GEKKO that is functioning ONLY if I include u.STATUS = 1 in the script ("u" is the control MV). Without it, the optimizer won't vary its value.

In the documentation https://gekko.readthedocs.io/en/latest/MV_options.html, it states that the default value of STATUS is 1...so why do I need to include u.STATUS = 1 in my script?

What am I missing? Thanks

John Hedengren

unread,
Aug 24, 2021, 9:58:46 AM8/24/21
to APM Google Groups
Thanks for finding that error in the documentation. It has been fixed and is now consistent with other parts of the documentation that had the default (STATUS=0) listed:


The reason for the default STATUS=0 comes from the Model Predictive Control area where controllers are first run in a predictive mode where you are able to see the model performance or WARM mode where you can see the next controller action before turning on the controller. Another useful parameter (global) is REQCTRLMODE: https://apmonitor.com/wiki/index.php/Main/OptionApmReqctrlmode

 Type: Integer, Input
 Default Value: 3
 Description: Requested control mode
              0=off
              1=simulate
              2=predict
              3=control

REQCTRLMODE is the requested controller mode as an input for the application. The requested control mode (REQCTRLMODE) is set as an input to the desired level of control but sometimes the CTRLMODE is not able to match the request because of a failed solution, a critical MV is OFF, or other checks with the application. REQCTRLMODE level of 0 indicates that the program should not run and the program terminates without attempting a solution. REQCTRLMODE level of 1 (cold mode) indicates that the program should be run as a simulator with all STATUS values turned off on FVs, MVs, and CVs. REQCTRLMODE level of 2 (warm mode) indicates that the application should calculate control actions but only after the second cycle. This mode is commonly used to observe anticipated control actions before the controller is activated to level 3. REQCTRLMODE level of 3 means that the controller should be turned ON and implement changes to the process.


-John Hedengren

--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmonitor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apmonitor/759bfa3f-f1bb-451d-9813-8b39e2560e80n%40googlegroups.com.


--
Best regards,

John Hedengren
GEKKO Optimization Suite
Reply all
Reply to author
Forward
0 new messages