![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Global control rules methods. More...
Functions | |
| void | controls_init (void) |
| Initializes the control rule system. | |
| void | controls_addToCount (char *s) |
| Updates the number of named variables or math expressions used by control rules. | |
| int | controls_create (int n) |
| Creates an array of control rules. | |
| void | controls_delete (void) |
| Deletes all control rules. | |
| int | controls_addVariable (char *tok[], int ntoks) |
| Adds a named variable to the control rule system from a tokenized line of input with formats: | |
| int | controls_addExpression (char *tok[], int ntoks) |
| Adds a math expression to the control rule system from a a tokenized line of input with format: EXPRESSION name = <math expression containing VARIABLE names> | |
| int | controls_addRuleClause (int rule, int keyword, char *Tok[], int nTokens) |
| Adds a new clause to a control rule. | |
| int | controls_evaluate (DateTime currentTime, DateTime elapsedTime, double tStep) |
| Evaluates all control rules at the current time of the simulation. | |
Global control rules methods.
| int controls_addExpression | ( | char * | tok[], |
| int | nToks | ||
| ) |
Adds a math expression to the control rule system from a a tokenized line of input with format: EXPRESSION name = <math expression containing VARIABLE names>
| [in] | tok | Array of string tokens |
| [in] | nToks | Number of tokens |
Adds a math expression to the control rule system from a a tokenized line of input with format: EXPRESSION name = <math expression containing VARIABLE names>
Adds a math expression to the control rule system from a a tokenized line of input with format: EXPRESSION name = <math expression containing VARIABLE names>
| int controls_addRuleClause | ( | int | r, |
| int | keyword, | ||
| char * | tok[], | ||
| int | nToks | ||
| ) |
Adds a new clause to a control rule.
| [in] | r | Rule index |
| [in] | keyword | Clause's keyword code (IF, THEN, etc.) |
| [in] | tok | Array of string tokens that comprises the clause |
| [in] | nToks | Number of tokens |
Adds a new clause to a control rule.
Adds a new clause to a control rule.
| void controls_addToCount | ( | char * | s | ) |
Updates the number of named variables or math expressions used by control rules.
| [in] | s | String containing either "VARIABLE" or "EXPRESSION" |
Updates the number of named variables or math expressions used by control rules.
Updates the number of named variables or math expressions used by control rules.
| int controls_addVariable | ( | char * | tok[], |
| int | nToks | ||
| ) |
Adds a named variable to the control rule system from a tokenized line of input with formats:
VARIABLE name = SIMULATION attribute
| [in] | tok | Array of string tokens |
| [in] | nToks | Number of tokens |
Adds a named variable to the control rule system from a tokenized line of input with formats:
Adds a named variable to the control rule system from a tokenized line of input with formats:
| int controls_create | ( | int | n | ) |
Creates an array of control rules.
| [in] | n | Total number of control rules |
Creates an array of control rules.
Creates an array of control rules.
| void controls_delete | ( | void | ) |
Deletes all control rules.
Deletes all control rules.
Deletes all control rules.
Evaluates all control rules at the current time of the simulation.
| [in] | currentTime | Current simulation date/time |
| [in] | elapsedTime | Decimal days since start of simulation |
| [in] | tStep | Simulation time step (days) |
Evaluates all control rules at the current time of the simulation.
Evaluates all control rules at the current time of the simulation.
| void controls_init | ( | void | ) |
Initializes the control rule system.