Skip to content

Commit

Permalink
Use math.isclose() to check next communication point (#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer authored Nov 24, 2024
1 parent a553b79 commit 4166f08
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 149 deletions.
2 changes: 1 addition & 1 deletion fmpy/fmi2.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def completedIntegratorStep(self, noSetFMUStatePriorToCurrentPoint=fmi2True):
enterEventMode = fmi2Boolean()
terminateSimulation = fmi2Boolean()
self.fmi2CompletedIntegratorStep(self.component, noSetFMUStatePriorToCurrentPoint, byref(enterEventMode), byref(terminateSimulation))
return enterEventMode.value, terminateSimulation.value
return enterEventMode.value != fmi2False, terminateSimulation.value != fmi2False

# Providing independent variables and re-initialization of caching

Expand Down
Loading

0 comments on commit 4166f08

Please sign in to comment.