### APMonitor Local Options

Below is a list of links for configuration options for parameters and variables. It is a complete list of the configuration parameters for FV, MV, SV, CV type parameters and variables. There are also Global Options that configure and report application level information.

An option can be changed from a MATLAB or Python script. Below is a command to set an option to turn on a controlled variable named CV1 in a Nonlinear Control application with CV1.STATUS=1.

 apm_option(s,a,'cv1.status',1)


Output options can also be read after the solution with the command to access a tag from the database. If the tag does not exist, a value of -99999 is returned. In this case, the user wants to know the new value (NEWVAL) of a manipulated variable that should be implemented into the process.

 new_mv2 = apm_tag(s,a,'mv2.newval')


In this case, the argument s='https://byu.apmonitor.com' is the server address and a='myApp' is the application name. When running a local server, the server address should be changed to s='https://127.0.0.1' or s='https://localhost' .

When a parameter is declared as a Fixed Value (FV), it automatically receives the following properties: CRITICAL, DMAX, DMAXHI, DMAXLO, FSTATUS, LOWER, LSTVAL, MEAS, NEWVAL, OSTATUS, OSTATUSCHG, PSTATUS, STATUS, UPPER, VDVL, VLACTION, VLHI, VLLO. Constraints are also added to the problem to implement DMAX, DMAXHI, and DMAXLO. These properties and other properties are required to configure an FV that can either act as a measured or unmeasured process disturbance or as a single controller degree of freedom to drive controlled variables (CVs) to targets when STATUS is ON. The FV values can be adjusted by either the user or the optimizer but are restricted to one value over the data horizon.
When a parameter is declared as a Manipulated Variable or MV (adjustable at each time step), it automatically receives the following properties: AWS, COST, CRITICAL, DCOST, DMAX, DMAXHI, DMAXLO, DPRED, FSTATUS, LOWER, LSTVAL, MEAS, MV_STEP_HOR, NEWVAL, NXTVAL, OSTATUS, OSTATUSCHG, PRED, PSTATUS, REQONCTRL, STATUS, TIER, UPPER, VDVL, VLACTION, VLHI, VLLO. Equations are also added to the problem to implement the necessary constraints and objective terms. These properties are required to configure an MV that can either act as a measured or unmeasured process disturbance or a controller degree of freedom to drive controlled variables (CVs) to targets when STATUS is ON.
When a variable is declared as a State Variable (SV), it automatically receives the following properties: FSTATUS, LOWER, MEAS, MODEL, PRED, UPPER. State variables to not enter into the objective function but are mostly are quantities such as inferentials or other predictions that are viewed in the web interface.
When a variable is declared as a Controlled Variable (CV), it automatically receives the following properties: BIAS, COST, CRITICAL, FSTATUS, FDELAY, LOWER, LSTVAL, MEAS, MEAS_GAP, MODEL, OSTATUS, OSTATUSCHG, PRED, PSTATUS, SP, SPHI, SPLO, STATUS, TAU, TIER, TR_INIT, TR_OPEN, UPPER, VDVL, VLACTION, VLHI, VLLO, WMEAS, WMODEL, WSP, WSPHI, WSPLO. Equations are also added to the problem to implement the necessary constraints and objective terms. Controlled variables enter into the objective function for optimizer and control functions (IMODE=3, 6, and 9) when STATUS is ON. Controlled variables are reconciled to data by including error terms for model prediction alignment to measurements in the objective function for parameter and state estimation problems (IMODE=2, 5, 8) when FSTATUS is > 0.

The following is a list of global options that may be set to configure an APMonitor application. It is a complete list of the configuration parameters for APM type parameters. Each section includes an indication of the variable type (Integer or Real), the default value, data flow, and a brief description. While this list is exhaustive, there are typically only a few of these that are used most commonly for estimation and control.