Skip to content

Commit 37df0f8

Browse files
committed
Updated test
1 parent 1cb7fdc commit 37df0f8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/ecco_algorithm_multi_bond_test.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ int main()
7070
wheel = cosim_local_slave_create(wheelFmuPath, "wheel");
7171
if (!wheel) { goto Lerror; }
7272

73-
observer = cosim_time_series_observer_create();
73+
// observer = cosim_time_series_observer_create();
74+
observer = cosim_buffered_time_series_observer_create(500000);
7475
if (!observer) { goto Lerror; }
7576

7677
int rc = cosim_execution_add_observer(execution, observer);
@@ -148,14 +149,14 @@ int main()
148149
samplesRead = cosim_observer_slave_get_real_samples(observer, wheelIndex, wheelFOut, fromStep, nSamples, wfo, steps, times);
149150
if (samplesRead < 0) { goto Lerror; }
150151

151-
const float threshold = 1e-4f;
152+
const float threshold = 1e-2f;
152153
diffs = (double*)malloc(nSamples * sizeof(double));
153154
size_t ptr = 0;
154155
for (size_t i = 1; i < nSamples; ++i) {
155156
diffs[ptr++] = fabs((cvo[i] * cfi[i]) - (wvi[i] * wfo[i]));;
156157
}
157158

158-
const size_t offset = 500;
159+
const size_t offset = 100;
159160
for (size_t i = (nSamples > offset ? nSamples - offset : 0); i < nSamples; i++) {
160161
if (diffs[i] > threshold) {
161162
fprintf(stderr, "Power bond mismatch at sample %zu: %f\n", i, diffs[i]);

0 commit comments

Comments
 (0)