modelicaInfo
Report the OpenModelica used by the nflow Modelica bridge.
📝Syntax
info = modelicaInfo()
📤Output Arguments
Parameter Description
info a scalar structure describing the OpenModelica installation, with the fields listed below.
📄Description

modelicaInfo reports the OpenModelica compiler (omc) that the nflow Modelica bridge will use. A modelica block compiles a Modelica model to an FMU with OpenModelica and then simulates it through nflow's FMI path; modelicaInfo tells you whether that is possible and which OpenModelica is selected.

The returned structure info has the following fields:

Field Class Details
available logical true when an omc executable was found and runs.
capable logical true when OpenModelica is not only present but able to export an FMU (the FMI export runtime is installed). A model simulates only when capable is true.
omc char the resolved path to the omc executable, or an empty string.
home char the OpenModelica home directory, or an empty string.
version char the version string reported by omc.
reason char a human-readable status; when not usable, it explains why and how to fix it.

Presence is not capability: an omc executable can run yet be unable to build an FMU when its installation is missing the FMI export runtime. In that case available is true but capable is false, and a modelica block blocks the simulation with a clear message.

The OpenModelica location is resolved from, in order: a path configured with modelicaConfigure (authoritative when set), the NELSON_OPENMODELICA_HOME environment variable (Nelson-scoped), the OPENMODELICAHOME environment variable, the standard install directories, then PATH.

💡Examples
Check whether a Modelica model can be simulated.
info = modelicaInfo();
if ~info.capable
  disp(info.reason);
end
🔗See Also
modelicaConfiguremodelicaToFmu
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub