Skip to content

Commit 97c5269

Browse files
authored
Call configurate() for FMI 1.0 & 2.0 in Co-Simulation (#458)
fixes #457
1 parent 5a4f957 commit 97c5269

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/cosimulation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Status configurate(ModelInstance* comp) {
154154
comp->nz = getNumberOfEventIndicators(comp);
155155

156156
if (comp->nz > 0) {
157-
CALL(s_reallocate(comp, (void**)& comp->prez, comp->nz * sizeof(double)));
157+
CALL(s_reallocate(comp, (void**)&comp->prez, comp->nz * sizeof(double)));
158158
CALL(s_reallocate(comp, (void**)&comp->z, comp->nz * sizeof(double)));
159159
}
160160

src/fmi1Functions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ fmiStatus fmiInitializeSlave(fmiComponent c, fmiReal tStart, fmiBoolean StopTime
227227
instance->stopTime = StopTimeDefined ? tStop : INFINITY;
228228
instance->time = tStart;
229229

230+
configurate(instance);
231+
230232
return init(c);
231233
}
232234

src/fmi2Functions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ fmi2Status fmi2ExitInitializationMode(fmi2Component c) {
268268

269269
S->state = S->type == ModelExchange ? EventMode : StepComplete;
270270

271+
CALL(configurate(S));
272+
271273
END_FUNCTION();
272274
}
273275

0 commit comments

Comments
 (0)