Name incomplete reactions and their remedy for adaptive tau - #189
Merged
Merged
Conversation
Adaptive tau-leaping rejected incomplete reactant metadata only at run time, without naming the reactions, and advised an explicit reactants list, which chain: and coord_shift entries cannot declare: since op_system #251 they declare catalysts instead. Record the incomplete reactions in the compiled network, name them in the run-time error with both remedies, and report the same issue from validate_system for the selected jump reactions. Cover an age-structured SIR with a staged chain and axis-wide aging that runs once catalysts are declared. Refs #188 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #188 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adaptive tau-leaping requires complete molecular reactant metadata. Two problems with how it reported missing metadata:
reactantslist to every op_system transition. Since op_system #251, transitions generated bychain:andcoord_shiftdeclarecatalystsinstead, andcoord_shiftrejectsreactants. So the advice could not be followed for exactly the models #251 targets.No op_engine test covered adaptive tau-leaping on generated reactions.
Closes #188.
Behavior
CompiledReactionNetwork.incomplete_reactionsnames the selected reactions without complete metadata.validate_systemissue (incomplete_reactants) list those reactions, in declaration order. They give both remedies:reactantson ordinary transitions, orcatalystsonchain:andcoord_shiftentries. The message keeps the phrase "complete molecular reactant metadata" that existing callers match.stochastic_reactions, matching what the network compiles.main(#252 merge).Coverage
chain:infectious period (entry.catalystslists both stages, and the chain'scatalysts: []) and axis-wide aging over all four compartments (catalysts: []). It publishes seven complete reactions and validates cleanly. Under adaptive tau-leaping it keeps integer, non-negative states, a non-increasing total (aging out of the last bin is absorbing), and produces recoveries.incomplete_reactantsissue naming every generated reaction and both remedies, andrunraises with the same list.Docs
catalystsfor generated transitions.Validation
just ci: 592 core tests passed, 2 skipped. 379 provider tests passed (3 new). Ruff and strict mypy passed for both packages.just docs: strict documentation build passed.Two commits: 222 and 10 changed lines.
🤖 Generated with Claude Code