OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
Global Control Rule Methods

Global control rules methods. More...

Collaboration diagram for Global Control Rule Methods:

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.
 

Detailed Description

Global control rules methods.

Function Documentation

◆ controls_addExpression()

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>

Parameters
[in]tokArray of string tokens
[in]nToksNumber of tokens
Returns
Error code

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>

Here is the call graph for this function:

◆ controls_addRuleClause()

int controls_addRuleClause ( int  r,
int  keyword,
char *  tok[],
int  nToks 
)

Adds a new clause to a control rule.

Parameters
[in]rRule index
[in]keywordClause's keyword code (IF, THEN, etc.)
[in]tokArray of string tokens that comprises the clause
[in]nToksNumber of tokens
Returns
Error code

Adds a new clause to a control rule.

Adds a new clause to a control rule.

Here is the call graph for this function:

◆ controls_addToCount()

void controls_addToCount ( char *  s)

Updates the number of named variables or math expressions used by control rules.

Parameters
[in]sString 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.

Here is the call graph for this function:

◆ controls_addVariable()

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 = Object id attribute
  • VARIABLE name = SIMULATION attribute

    Parameters
    [in]tokArray of string tokens
    [in]nToksNumber of tokens
    Returns
    Error code

    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:

Here is the call graph for this function:

◆ controls_create()

int controls_create ( int  n)

Creates an array of control rules.

Parameters
[in]nTotal number of control rules
Returns
Error code

Creates an array of control rules.

Creates an array of control rules.

◆ controls_delete()

void controls_delete ( void  )

Deletes all control rules.

Deletes all control rules.

Deletes all control rules.

Here is the call graph for this function:

◆ controls_evaluate()

int controls_evaluate ( DateTime  currentTime,
DateTime  elapsedTime,
double  tStep 
)

Evaluates all control rules at the current time of the simulation.

Parameters
[in]currentTimeCurrent simulation date/time
[in]elapsedTimeDecimal days since start of simulation
[in]tStepSimulation time step (days)
Returns
Number of new actions taken

Evaluates all control rules at the current time of the simulation.

Evaluates all control rules at the current time of the simulation.

Here is the call graph for this function:

◆ controls_init()

void controls_init ( void  )

Initializes the control rule system.

Here is the caller graph for this function: