Commit 29aca16
Harden simulation and reference comparison validation (#29)
- Fail run_simulate when sol.t is empty or the system has no states
or observed variables, preventing empty CSVs and downstream panics
- Include observed variables in the simulation CSV output so models
without state variables (e.g. BusUsage) still produce usable results
- Fail compare_with_reference (instead of skip) when reference signals
are absent from the simulation; write NaN sim/relerr columns for
signals with no simulation counterpart
- Validate upfront that all comparisonSignals.txt entries exist in the
reference CSV, and error if the simulation time interval does not
cover the reference interval
- Extend the per-model status line to show a CMP OK/FAIL phase and
signal counts including skipped signals
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 92cacb5 commit 29aca16
3 files changed
Lines changed: 76 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
| 383 | + | |
379 | 384 | | |
380 | 385 | | |
381 | 386 | | |
| |||
397 | 402 | | |
398 | 403 | | |
399 | 404 | | |
400 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
401 | 408 | | |
402 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
403 | 419 | | |
404 | 420 | | |
405 | | - | |
| 421 | + | |
406 | 422 | | |
407 | | - | |
408 | 423 | | |
409 | 424 | | |
410 | 425 | | |
411 | | - | |
412 | 426 | | |
413 | 427 | | |
414 | 428 | | |
415 | | - | |
| 429 | + | |
| 430 | + | |
416 | 431 | | |
417 | | - | |
418 | | - | |
419 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
420 | 435 | | |
421 | 436 | | |
422 | 437 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 438 | + | |
426 | 439 | | |
427 | 440 | | |
428 | 441 | | |
| |||
431 | 444 | | |
432 | 445 | | |
433 | 446 | | |
434 | | - | |
| 447 | + | |
435 | 448 | | |
436 | | - | |
437 | | - | |
| 449 | + | |
| 450 | + | |
438 | 451 | | |
439 | 452 | | |
440 | 453 | | |
| |||
468 | 481 | | |
469 | 482 | | |
470 | 483 | | |
471 | | - | |
| 484 | + | |
| 485 | + | |
472 | 486 | | |
473 | | - | |
| 487 | + | |
474 | 488 | | |
475 | 489 | | |
476 | 490 | | |
| |||
481 | 495 | | |
482 | 496 | | |
483 | 497 | | |
484 | | - | |
| 498 | + | |
485 | 499 | | |
486 | 500 | | |
487 | | - | |
488 | | - | |
| 501 | + | |
489 | 502 | | |
490 | 503 | | |
491 | | - | |
| 504 | + | |
492 | 505 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
197 | 209 | | |
198 | 210 | | |
199 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
| |||
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
53 | | - | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
61 | 75 | | |
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
| |||
0 commit comments