libsbml icon indicating copy to clipboard operation
libsbml copied to clipboard

Improve the efficiency of the AssignmentCycles::determineAllDependencies() function

Open eltix opened this issue 1 year ago • 0 comments

Hi all,

The AssignmentCycles::determineAllDependencies() function does not behave well with models having many parameters and rules and transitive dependencies between model constructs. Unfortunately, I cannot share any of the actual models we have had issues with for they are confidential. However, I have crafted a couple of examples (see attachments) which exhibit somewhat similar structures.

  • The smallest example Model150.xml has 150 parameters and 147 assignment rules and the determineAllDependencies step takes around 1min on a regular machine.
  • The Model180.xml one has 180 parameters and 177 assignment rules, it takes 3min.
  • The largest one Model300.xml takes forever to terminate

For our actual models, this function takes a prohibitive time (> 1hour) to terminate even though the ODE system solving part takes less than a minute. As a consequence, we have temporarily bypassed the consistency checks altogether in our pipelines.

I would gladly get involved myself in the search for a suitable solution but my C++ skills are alas quite limited. Thank you all for maintaining this library!

Attachments

determineAllDependenciesInputs.zip

Contains:

  1. the "small" Model150.xml example
  2. the "medium" Model180.xml example
  3. the "large" Model300.xml example
  4. A runConsistencyChecks.cpp file to load a document and run the consistency checks

eltix avatar May 17 '24 14:05 eltix