Dynamic modelling

From ASCEND

(Redirected from DynamicModelling)
Jump to: navigation, search
NLA
QRSlv
CMSlv
IPSlv
Opt
NLP
CONOPT
IPOPT
TRON
MINOS
NGSlv
OptSQP
DAE/ODE
IDA
LSODE
DOPRI5
LA
linsolqr
linsol
LP
MakeMPS
Logic
LRSlv

Dynamic modelling in ASCEND is where you solve a system of ordinary differential equations (ODEs) or differential/algebraic equations for the time-varying values of variables in the model over a certain interval, given the initial conditions of the model. We also refer to this as integration. Dynamic modelling can be done within the ASCEND language providing the relationship between variables and their derivatives can be established.

The current method for specifying derivatives is by including the ivpsystem.a4l library:

REQUIRE "ivpsystem.a4l";

at the start of your model, then creating a special method

METHOD ode_init;
    dx_dt.ode_id := 1;
    x.ode_id := 1; (* ie these variables are related with ID '1' *)

    dx_dt.ode_type := 2; (* ie 'this is a derivative variable' *)
    x.ode_type := 1; (* ie 'this is a differential variable *)
END ode_init;

which must be run before sending your model to either IDA or LSODE (or a future solver...) for integration.

We propose to add support for LINK semantics that will allow this fairly painful syntax to be eliminated, but this is still under development.

There are plenty of examples in the ModelLibrary.

See also External Integrators in the development section. See also InitialValueModelling.

Personal tools