Parameter block

The Parameter block is used to add extra structural parameters to a model.

The Parameter block’s input nodes are labeled S1, S2, and so forth depending on how many Param­eter blocks are added to the model. The output node is labeled based on the name given to the parameter.

The input node on the Parameter block can be connected to output nodes on PK compartments, observation blocks, PD blocks, and other parameter blocks. Once an output node is connected, its name cannot be changed.

Procedure block

Use Procedure blocks to enter assignment statements, differential equations, and logical statements. Within a Procedure block, functions in the Code tab are executed in the order they are listed, one or more times at each simulation step. For that reason, Procedure blocks are not suitable for counting, storing model status across time, or performing computations at specific times during simulation. Code blocks are case sensitive.

Procedureblockoptions.png 

Statements can follow each other on a single line or be set on different lines.

    statement statement …

The most common type of statement is an assignment, for example:

    x=5+y;

This statement assigns the variable x the value 5+y. Note that x and y must be valid drug model vari­ables. The semicolon character (;) separating statements is optional.

The statements are inserted in the model, alongside automatically generated statements. For exam­ple, users can define new structural parameters Q and R, and then enter this code in the block:

    deriv(B=-B*Q)
    D=B/R

It is important not to write code that depends on time “t” or other continuously changing variables to equal exact values, such as:

    x=((t==4)?xxx:yyy)

because this code is executed very frequently, including every time a derivative evaluation is per­formed. Time “t” takes on many values, along with other continuously changing variables, but cannot be relied on to equal any particular value, or even to advance monotonically. However, covariates, if not interpolated, use the specific values that they are set to by the input data.

Differential equations can be created only by using deriv statements inside a Procedure block. Note that the variable t, the time variable, can be used inside of a deriv statement. t represents subject time, which is the elapsed time since the first event experienced by the subject.

Also, it is not a good idea to write code containing discontinuities, such as

   x=((t>=4)?xxx:yyy)

because x discontinuously changes from xxx to yyy at time 4. Assuming x enters the model in some way, it can cause the ODE solver or the modeling engine to be faced with a discontinuity. If the ODE solver encounters a discontinuity, it responds by adjusting the step size to as small a value as possi­ble in order to minimize error, which can greatly slow model performance. If the modeling engine encounters a discontinuity, it responds by trying (and failing) to make a continuous model in the region of the discontinuity, resulting in a troublesome fit and possible lack of standard errors. Use the sequence statement in the PML to schedule events when discrete actions can be taken.

Discrete covariate values can be referred to using their number representation. Each value is repre­sented by a whole number, starting with 0 (zero) for the first value listed in the Covar. Type tab, which is located in the Parameters tab.

For available logical operators and functions that can be used in statements, see “Supported Opera­tors”, “Supported Math Functions”, and “Supported Special Functions”.

To specify Procedure block options

Note:Sequence blocks cannot be entered in a procedure block when working with the graphical model. They can be entered in the textual model, however.


Last modified date:7/9/20
Certara USA, Inc.
Legal Notice | Contact Certara
© 2020 Certara USA, Inc. All rights reserved.