modelica-tools / FMUComplianceChecker

FMI Compliance Checker for validation of FMUs 1.0 and 2.0
BSD 3-Clause "New" or "Revised" License
42 stars 31 forks source link

How does FMUComplianceChecker Manage StepIncomplete? #60

Open amveron opened 3 years ago

amveron commented 3 years ago

Hello, I would like to know how FMUComplianceChecker deals with an FMU which is in the StepIncomplete status following a do_step call, as in the attached image. FMU

My question fits in a larger context: we have a software which uses FMUs (FMI version 1) as slaves. We observe do_step failures when we call the FMUs with our software. However, despite our best efforts to provide exactly the same input sequence to FMUComplianceChecker, we do not manage to reproduce the do_step failure.

One hypothesis brought by the team developing the FMU slaves is that we do not handle properly the StepIncomplete status and that we should do just as the FMUComplianceChecker since it works (no do_step failure). However, so far and with my limited understanding of the FMUComplianceChecker code, I have not found how this was done.

Thank you for any input! Best regards, Amélie

filip-stenstrom commented 3 years ago

Hi,

FMI 1 simulation code can be found mainly in src/FMI1/fmi1_cs_sim.c.

From my interpretation of the standard, StepIncomplete happens when DoStep returns fmiDiscard. In FMI 2 it's in this case recommended to rollback the FMU, but that feature is from what I know not standardized in FMI 1.

ComplianceChecker therefore treats fmiDiscard as an error, so I don't think that's the issue.

amveron commented 3 years ago

Hello, Thank you for your answer. It is as I understood, StepIncomplete is treated as an error in ComplianceChecker, as we do in our software when interacting with an FMU.