Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use inputs after event for FMI 1.0 & 2.0 CS #603

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading