CATIA-Systems / FMPy

Simulate Functional Mockup Units (FMUs) in Python
Other
429 stars 118 forks source link

fmi2GetDirectionalDerivative is missing in shared library #642

Closed oravecj closed 8 months ago

oravecj commented 8 months ago

Hello, I have FMI 2.0 fmu, that I am trying to open and simulate with FMPy. This FMU is not using directional derivatives (see modelDescription.xml). When I am trying to run it in GUI FMPy, i get the error: Function fmi2GetDirectionalDerivative is missing in shared library.

I also tired my own script to call the fmu simulation using function simulate_fmu(), but the result is the same error.

When running in console with FMPy command: simulate DynamicMechTest.fmu --show-plot it seems that i get the results, without any error. The html page with results is shown.

modelDescription.xml:

<?xml version="1.0" encoding = "UTF-8"  standalone="no" ?>
<fmiModelDescription fmiVersion="2.0" guid="{23d0a798-c1a6-427c-920e-a48e4ce0917f}" modelName="DynamicMechTest" numberOfEventIndicators="0" variableNamingConvention="structured">

  <ModelExchange modelIdentifier="DynamicMechTest"
    canGetAndSetFMUstate="true" canSerializeFMUstate="true" providesDirectionalDerivative="false"/>
t-sommer commented 8 months ago

FMI Spec. 2.0.4, p. 69:

The implementation must either implement all the functions of FMI for Model Exchange or all the functions of FMI for Co-Simulation or both.

fmi2GetDirectionalDerivative is a mandatory function for both CS and ME, so it's not a valid FMU.