Time event switching in PML versus ASCII models

The while or if statements that were required to switch between time events in the ASCII model do not work as effectively as the sleep statement in the PML. Using the sequence statement in conjunction with the sleep statement is the best way to switch between time events in text models.

When if statements are used to perform these tasks in the PML, the integrator can jump over the time point of interest. The Jacobian matrix it computes will be very inaccurate because the derivatives are different on each side of the discontinuity. The integrator goes back and forth trying to reduce the compounding errors that it sees, which can cause the integrator to miss the time point of interest.

The stability that the sequence statement offers allows models to be solved more quickly and accurately.

What the sequence statement with sleep statements does is stop the integrator at the appropriate times to make state changes, like RESET or DOSING, or set time discontinuous variables.



Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.