FMUInfo - Maple Help

FMUTester

 FMUInfo
 obtain general FMU information

 Calling Sequence FMUInfo(fmu, options)

Parameters

 fmu - string; FMU name with .fmu extension

 Returns Information about FMU in the format(s) specified by returntype.

Options

 • returntype = list consisting of one or more of "string", "file", "record"
 List of strings "string", "file", and/or "record" specifying the type of output to be returned. The default value is ["string"].
 • outputdir = string
 Specifies the path to the directory where the file will be written when returntype = "file". If no outputdir is specified, the file will be written in the current directory. The default value is an empty string.
 • validateFMU = true or false
 Specifies whether the FMU's model description XML syntax will be validated before obtaining any information. The default value is false.

Description

 • The FMUInfo procedure obtains general information from the modelDescription.xml file contained in the FMU.
 • The following sub-categories are shown:
 – Model Info (FMI version, type, model name, description, platforms, generation tool, generation date)
 – Default Experiment (default FMU simulation settings)
 – Variables (inputs and outputs)

Examples

 > $\mathrm{with}\left(\mathrm{FMUTester}\right):$

Get the Rectifier FMU information as a string (default)

 > $\mathrm{fmuname}≔\mathrm{FileTools}:-\mathrm{JoinPath}\left(\left[\mathrm{kernelopts}\left('\mathrm{datadir}'\right),"FMUs","Rectifier.fmu"\right]\right):$
 > $\mathrm{FMUInfo}\left(\mathrm{fmuname}\right)$
 ${"Model Info FMI Version 2.0 FMI Type Co-Simulation Model Name Rectifier Description Model Rectifier Platforms win64 Continuous States 4 Event Indicators 6 Variables 63 Generation Tool MapleSim \left(1357016/1357197/1357197\right) Generation Date 2018-10-25T13:27:33Z Default Experiment Stop Time 0.1 Step Size 1e-07 Variables \left(input, output\right) Name Causality Start Value Unit Description outputs output 2.82842712474619020e+02 V Rectifier1.Capacitor1.v"}$ (1)

Get the CoupledClutches FMU information as a record and as a string

 > $\mathrm{fmuname}≔\mathrm{FileTools}:-\mathrm{JoinPath}\left(\left[\mathrm{kernelopts}\left('\mathrm{datadir}'\right),"FMUs","CoupledClutches.fmu"\right]\right):$
 > $\mathrm{CC},\mathrm{infostr}≔\mathrm{FMUInfo}\left(\mathrm{fmuname},'\mathrm{returntype}'=\left["record","string"\right]\right):$
 > $\mathrm{mdlname}≔\mathrm{CC}:-\mathrm{Model_Info}:-\mathrm{Model_Name}$
 ${\mathrm{mdlname}}{≔}{"CoupledClutchesME2"}$ (2)
 > $\mathrm{fmivers}≔\mathrm{CC}:-\mathrm{Model_Info}:-\mathrm{FMI_Version}$
 ${\mathrm{fmivers}}{≔}{"2.0"}$ (3)
 > $\mathrm{fmitype}≔\mathrm{CC}:-\mathrm{Model_Info}:-\mathrm{FMI_Type}$
 ${\mathrm{fmitype}}{≔}\left[{"ME"}\right]$ (4)
 > $\mathrm{platfor}≔\mathrm{CC}:-\mathrm{Model_Info}:-\mathrm{Platforms}$
 ${\mathrm{platfor}}{≔}\left[{"c-code"}{,}{"darwin64"}{,}{"linux64"}{,}{"win32"}{,}{"win64"}\right]$ (5)
 > $\mathrm{t0}≔\mathrm{CC}:-\mathrm{Default_Experiment}:-\mathrm{Start_Time}$
 ${\mathrm{t0}}{≔}{0.}$ (6)
 > $\mathrm{tf}≔\mathrm{CC}:-\mathrm{Default_Experiment}:-\mathrm{Stop_Time}$
 ${\mathrm{tf}}{≔}{1.50000000000000}$ (7)
 > $\mathrm{~}\left[\mathrm{print}\right]\left(\mathrm{CC}:-\mathrm{Variables}:-\mathrm{Inputs}\right):$
 ${{\mathrm{Record}}}_{{\mathrm{packed}}}{}\left({\mathrm{Name}}{=}{"inputs"}{,}{\mathrm{Causality}}{=}{"input"}{,}{\mathrm{Start_Value}}{=}{"0.00000000000000000e+00"}{,}{\mathrm{Unit}}{=}\left(\right){,}{\mathrm{Description}}{=}{"RI1"}\right)$ (8)
 > $\mathrm{~}\left[\mathrm{print}\right]\left(\mathrm{CC}:-\mathrm{Variables}:-\mathrm{Outputs}\right):$
 ${{\mathrm{Record}}}_{{\mathrm{packed}}}{}\left({\mathrm{Name}}{=}{"outputs\left[1\right]"}{,}{\mathrm{Causality}}{=}{"output"}{,}{\mathrm{Start_Value}}{=}{"1.00000000000000000e+01"}{,}{\mathrm{Unit}}{=}{"rad/s"}{,}{\mathrm{Description}}{=}{"J1.w"}\right)$
 ${{\mathrm{Record}}}_{{\mathrm{packed}}}{}\left({\mathrm{Name}}{=}{"outputs\left[2\right]"}{,}{\mathrm{Causality}}{=}{"output"}{,}{\mathrm{Start_Value}}{=}{"0.00000000000000000e+00"}{,}{\mathrm{Unit}}{=}{"rad/s"}{,}{\mathrm{Description}}{=}{"J2.w"}\right)$
 ${{\mathrm{Record}}}_{{\mathrm{packed}}}{}\left({\mathrm{Name}}{=}{"outputs\left[3\right]"}{,}{\mathrm{Causality}}{=}{"output"}{,}{\mathrm{Start_Value}}{=}{"0.00000000000000000e+00"}{,}{\mathrm{Unit}}{=}{"rad/s"}{,}{\mathrm{Description}}{=}{"J3.w"}\right)$
 ${{\mathrm{Record}}}_{{\mathrm{packed}}}{}\left({\mathrm{Name}}{=}{"outputs\left[4\right]"}{,}{\mathrm{Causality}}{=}{"output"}{,}{\mathrm{Start_Value}}{=}{"0.00000000000000000e+00"}{,}{\mathrm{Unit}}{=}{"rad/s"}{,}{\mathrm{Description}}{=}{"J4.w"}\right)$ (9)
 > $\mathrm{infostr}$
 ${"Model Info FMI Version 2.0 FMI Type Model Exchange Model Name CoupledClutchesME2 Description Model CoupledClutchesME2 Platforms c-code, darwin64, linux64, win32, win64 Continuous States 18 Event Indicators 25 Variables 178 Generation Tool MapleSim \left(1183828/1183758/1183758\right) Generation Date 2016-11-24T17:45:51Z Default Experiment Stop Time 1.5 Tolerance 0.0001 Variables \left(input, output\right) Name Causality Start Value Unit Description inputs input 0.00000000000000000e+00 RI1 outputs\left[1\right] output 1.00000000000000000e+01 rad/s J1.w outputs\left[2\right] output 0.00000000000000000e+00 rad/s J2.w outputs\left[3\right] output 0.00000000000000000e+00 rad/s J3.w outputs\left[4\right] output 0.00000000000000000e+00 rad/s J4.w"}$ (10)

Compatibility

 • The FMUTester[FMUInfo] command was introduced in Maple 2019.