Skip to content

Commit

Permalink
Use FMIIsClose() to check stop time
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Sep 25, 2024
1 parent 67dc2e5 commit 2196e09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fmusim/FMI2CSSimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ FMIStatus FMI2CSSimulate(const FMISimulationSettings* s) {

CALL(FMIApplyInput(S, s->input, time, true, true, false));

if (time >= s->stopTime) {
if (time > s->stopTime || FMIIsClose(time, s->stopTime)) {
break;
}

Expand Down
2 changes: 1 addition & 1 deletion fmusim/FMI2MESimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ FMIStatus FMI2MESimulate(const FMISimulationSettings* s) {

CALL(FMISample(S, time, s->recorder));

if (time >= s->stopTime) {
if (time > s->stopTime || FMIIsClose(time, s->stopTime)) {
break;
}

Expand Down

0 comments on commit 2196e09

Please sign in to comment.