Skip to content

Add support for DAE models#555

Open
agarny wants to merge 6 commits into
opencor:mainfrom
agarny:issue544
Open

Add support for DAE models#555
agarny wants to merge 6 commits into
opencor:mainfrom
agarny:issue544

Conversation

@agarny
Copy link
Copy Markdown
Contributor

@agarny agarny commented May 27, 2026

Fixes #544.

Copilot AI review requested due to automatic review settings May 27, 2026 11:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses #544 by extending libOpenCOR’s SED-ML ingestion so DAE models can be instantiated/run when an NLA solver is provided via legacy OpenCOR SED-ML annotations (and it also introduces parsing of a libOpenCOR nlaAlgorithm element). It adds a comprehensive set of DAE SED-ML fixtures and unit/coverage tests to validate expected solver selection and warning behavior.

Changes:

  • Add SED-ML parsing for NLA solver settings from (1) libOpenCOR nlaAlgorithm elements and (2) legacy OpenCOR <annotation><nlaSolver …/></annotation> blocks.
  • Add DAE SED-ML/OMEX test fixtures covering valid, missing, duplicate, and unknown NLA solver configurations.
  • Add new instance and coverage tests for DAE model loading/execution and warning paths; bump version and tweak issue printing formatting.

Reviewed changes

Copilot reviewed 22 out of 24 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
VERSION.txt Version bump.
src/misc/utils.cpp Print issues header now includes a newline.
src/support/sedml/sedmlfile.cpp Parse NLA solver from libOpenCOR nlaAlgorithm and legacy annotation; integrate into simulation population.
src/support/sedml/sedmlfile_p.h Add NlaSolverInfo and store original SED-ML file contents for XML parsing.
tests/api/sed/instancetests.cpp Add instance tests for running DAE models from CellML/SED-ML/OMEX (legacy and non-legacy).
tests/api/sed/coveragetests.cpp Add coverage tests for warnings/branches around NLA solver discovery (new + legacy paths).
tests/res/api/sed/dae/model.sedml DAE SED-ML fixture using libOpenCOR nlaAlgorithm.
tests/res/api/sed/dae/model_unknown_nla_algorithm.sedml Fixture with unknown nlaAlgorithm kisaoID to trigger fallback warning.
tests/res/api/sed/dae/model_several_nla_algorithms.sedml Fixture with multiple nlaAlgorithm elements to trigger “first used” warning.
tests/res/api/sed/dae/model_no_nla_algorithm.sedml Fixture missing kisaoID on nlaAlgorithm to trigger fallback warning.
tests/res/api/sed/dae/model_nla_algorithm_and_nla_algorithm.sedml Fixture where NLA solver is set both via algorithm and nlaAlgorithm to trigger “ignored” warning.
tests/res/api/sed/dae/model_legacy.sedml Legacy annotation-based NLA solver fixture (OpenCOR namespace).
tests/res/api/sed/dae/model_legacy_unknown_property.sedml Legacy fixture with an unknown solver property to trigger “ignored property” warning.
tests/res/api/sed/dae/model_legacy_unknown_property_namespace.sedml Legacy fixture with a property in an unexpected namespace (coverage path).
tests/res/api/sed/dae/model_legacy_unknown_property_element.sedml Legacy fixture with an unexpected property element name (coverage path).
tests/res/api/sed/dae/model_legacy_unknown_nla_solver.sedml Legacy fixture with unknown nlaSolver name to trigger fallback warning.
tests/res/api/sed/dae/model_legacy_unknown_namespace.sedml Legacy fixture with unknown annotation namespace (coverage path).
tests/res/api/sed/dae/model_legacy_unknown_element.sedml Legacy fixture with unknown annotation element name (coverage path).
tests/res/api/sed/dae/model_legacy_several_nla_solvers.sedml Legacy fixture with multiple nlaSolver nodes to trigger “first used” warning.
tests/res/api/sed/dae/model_legacy_nla_algorithm_and_nla_solver.sedml Legacy fixture specifying NLA solver both via algorithm and annotation to trigger precedence warning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/support/sedml/sedmlfile.cpp
Comment thread src/support/sedml/sedmlfile.cpp Outdated
Comment thread src/support/sedml/sedmlfile.cpp Outdated
Comment thread src/support/sedml/sedmlfile.cpp Outdated
Comment thread src/support/sedml/sedmlfile.cpp Outdated
Comment thread tests/api/sed/instancetests.cpp
Comment thread tests/api/sed/instancetests.cpp
Comment thread tests/api/sed/coveragetests.cpp
Comment thread tests/api/sed/coveragetests.cpp
agarny added 2 commits May 28, 2026 02:21
- Check for `"0 leaks for 0 total leaked bytes."` anywhere in the output upfront (handles both old and new `leaks` output formats).
- Add an `if lines:` guard so an empty `lines` string is never appended as a false positive error.
Not sure why, but it's not working on Ubuntu anymore?!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for DAE models

2 participants