This aims to be a place holder for issues in the dev-rule-apis branch which was contributed by @AngelaMarchi (thanks). In short this contribution adds get\set apis for the rule based controls. The code compiles with no errors.
A few issues:
The [RULES] section should be written in the INP file right after the [CONTROLS] section.
EN_API_FLOAT_TYPE should be used in function calls.
The SYSTEM keyword is being written as SYST. This is due to the w_SYSTEM definition. I think that w_SYSTEM is only used by the rules so the keyword might be changed or some local fix could be made. The same might be for w_RESERV.
Basic descriptions could be added to the writeRuleinInp in rules.c.
Premises and actions are written in a reverse order to the INP. If the original INP contains the action THEN PUMP 335 STATUS IS OPEN AND PIPE 330 STATUS IS CLOSED it will be written as THEN PIPE 330 STATUS IS CLOSED AND PUMP 335 STATUS IS OPEN. The outcome is the same but not very user friendly.
This aims to be a place holder for issues in the
dev-rule-apis
branch which was contributed by @AngelaMarchi (thanks). In short this contribution adds get\set apis for the rule based controls. The code compiles with no errors.A few issues:
[RULES]
section should be written in the INP file right after the[CONTROLS]
section.SYSTEM
keyword is being written asSYST
. This is due to the w_SYSTEM definition. I think that w_SYSTEM is only used by the rules so the keyword might be changed or some local fix could be made. The same might be for w_RESERV.writeRuleinInp
inrules.c
.THEN PUMP 335 STATUS IS OPEN AND PIPE 330 STATUS IS CLOSED
it will be written asTHEN PIPE 330 STATUS IS CLOSED AND PUMP 335 STATUS IS OPEN
. The outcome is the same but not very user friendly.To start I'm taking care of 2.