Skip to content

Commit

Permalink
Use inputs after event for in Co-Simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Oct 7, 2024
1 parent 2891649 commit 0e5dbde
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fmusim/FMI1CSSimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ FMIStatus FMI1CSSimulate(const FMISimulationSettings* s) {

// set start values
CALL(FMIApplyStartValues(S, s));
CALL(FMIApplyInput(S, s->input, s->startTime, true, true, false));
CALL(FMIApplyInput(S, s->input, s->startTime, true, true, true));

// initialize
CALL(FMI1InitializeSlave(S, s->startTime, fmi1False, 0));
Expand All @@ -46,7 +46,7 @@ FMIStatus FMI1CSSimulate(const FMISimulationSettings* s) {
break;
}

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

const FMIStatus doStepStatus = FMI1DoStep(S, time, s->outputInterval, fmi1True);

Expand Down
4 changes: 2 additions & 2 deletions fmusim/FMI2CSSimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ FMIStatus FMI2CSSimulate(const FMISimulationSettings* s) {
if (!s->initialFMUStateFile) {
CALL(FMI2SetupExperiment(S, s->tolerance > 0, s->tolerance, s->startTime, fmi2False, 0));
CALL(FMI2EnterInitializationMode(S));
CALL(FMIApplyInput(S, s->input, s->startTime, true, true, false));
CALL(FMIApplyInput(S, s->input, s->startTime, true, true, true));
CALL(FMI2ExitInitializationMode(S));
}

Expand All @@ -56,7 +56,7 @@ FMIStatus FMI2CSSimulate(const FMISimulationSettings* s) {
break;
}

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

const FMIStatus doStepStatus = FMI2DoStep(S, time, s->outputInterval, fmi2True);

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

CALL(FMI3EnterInitializationMode(S, s->tolerance > 0, s->tolerance, s->startTime, fmi3False, 0));

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

CALL(FMI3ExitInitializationMode(S));

Expand Down

0 comments on commit 0e5dbde

Please sign in to comment.