Terminology#
Input, parameter, or input variable ?#
The FMI standard and OpenTURNS meet a (minor) conflict in the definition of inputs. In the FMI standard (see section 2.4.7, and table 22):
a FMU parameter remains constant during simulation (a single value);
a FMU input evolves during simulation (time-dependent values).
In OpenTURNS, the terms input and parameter are synonymous and designate a variable in input of a probabilistic model.
To reconcile the two worlds, we employ in otfmi the terms of parameter and input in the sense of FMI. We call the input variables of a probabilistic model variables, or input variables.
FMI : ME or CS ?#
The FMI standard defines two kinds of FMUs: ModelExchange (ME) or CoSimulation (CS). The CoSimulation FMUs embed the numerical solver of their generation tool whereas the ModelExchange FMUs simulate with the solver of their host tool.
Choosing ME or CS depends on the use of the FMU (see here). Both kinds are handled similarly by otfmi (and Persalys).
FMI backend#
Driving a FMU requires an implementation of the FMI standard, which otfmi calls
an FMI backend. Two are supported behind a common interface:
PyFMI and
FMPy. PyFMI is preferred when both are
installed, otherwise otfmi falls back to FMPy. The active backend is reported by
otfmi.backend.BACKEND and can be selected with
use_backend(), in the spirit of the matplotlib backends.
OpenTURNS objects#
OTFMI and related examples rely on some OpenTURNS objects such as: