Skip to content

Conversation

@skeating
Copy link
Member

@skeating skeating commented Dec 28, 2025

Description

Ratel to reaction conversion will only fail with multiple compartments if the species referred to in a given rate rule come from different compartments

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Change in documentation

Checklist:

  • I have updated all documentation necessary.
  • I have checked spelling in (new) comments.

Testing

  • Testing is done automatically and codecov shows test coverage
  • This cannot be tested automatically

Adds a check to prevent rate rule conversion when species from different compartments appear in the same rate rule.

This change ensures that the converter correctly handles models with multiple compartments and avoids generating invalid or unexpected results.

Also, adds example models for testing.
@skeating skeating requested a review from fbergmann December 28, 2025 12:03
particularly useful given that std::list it does not exist in older versions
Copy link
Member

@fbergmann fbergmann left a comment

Choose a reason for hiding this comment

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

Thank you so much, I've tested with BioMD 299, and it worked as expected.

While I think that speciesFromMultipleCompartmentsInSameRateRule looks way more complicated than it should (6 levels of indentation), it's fine. No need to change to a hash_map for simpler access.

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.

3 participants