Skip to content

Version 16 new#1377

Merged
isaacsas merged 167 commits intomasterfrom
version_16_new
Feb 5, 2026
Merged

Version 16 new#1377
isaacsas merged 167 commits intomasterfrom
version_16_new

Conversation

@isaacsas
Copy link
Copy Markdown
Member

@isaacsas isaacsas commented Feb 5, 2026

This is far enough along I think to move into master now.

isaacsas and others added 29 commits February 1, 2026 11:02
These packages are needed for runtests_extensions.jl to run
directly with --project=test/extensions.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Use @__DIR__ directly in each @safetestset block since the macro
runs code in a separate module where outer constants are not visible.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add Logging, OrdinaryDiffEqVerner, SparseArrays, and StableRNGs which
are required by the extension test files when running directly.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Try initialization fix for Julia 1.10 with HC and MTKBase
The statistical test comparing Direct vs SortingDirect aggregators
was occasionally failing due to random variation with N=1000.
Increasing to N=4000 should reduce flakiness while keeping runtime
reasonable (~46s).

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Enable HybridProblem to create systems combining SDE and Jump processes
- When SDE+Jump scales are present, returns JumpProblem wrapping SDEProblem
- Merge has_sde && has_jump and has_jump branches into single has_jump block
- Use mtkcompile for SDE+Jump (converts brownians → noise_eqs), complete for pure jump
- Add comprehensive tests including mathematical correctness tests
- Update HISTORY.md and docstrings with new functionality and correct solver (SRIW1)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…Problem

MTKBase now handles Symbol to Symbolic key conversion internally, so
symmap_to_varmap is no longer needed for callback compilation. This
simplifies the problem construction code.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Increase sample sizes to N=4000 for stronger statistical power
- Test at 100 time points across transient dynamics (not just steady-state)
- Add analytic transient mean validation: E[X](t) = k1/k2 + (X0 - k1/k2)*exp(-k2*t)
- Add variance comparison between Catalyst and manual JumpProcesses implementations
- Add complex non-linear multi-species test with bimolecular reactions (A + B -> C)
- Fix ConstantRateJump -> VariableRateJump for rates depending on continuous dynamics
- Add save_positions=(false,false) for efficiency with saveat
- Use 5% relative tolerance for means, 10% for variances

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Extend make_ReactionSystem_internal to discover variables from jumps,
analogous to how events are handled. This allows users to pass jumps
to the two-argument constructor without explicitly specifying all
unknowns and parameters.

- Add find_jump_vars! function using MT.collect_vars! for jump types
- Add jumps kwarg to make_ReactionSystem_internal
- Add tests for ConstantRateJump, VariableRateJump, and MassActionJump

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Type Dict keys in get_netstoich as eltype(subs) instead of Any
- Type empty Dicts as Dict{SymbolicT, SymbolicT}() for substitution maps
- Type reactant_stoch vector with SymbolicT keys
- Delete get_speciestype function, use SymbolicT directly
- Use CatalystEqType[] instead of Any[] for equation reduction init
- Type systems field as Vector{ReactionSystem}
- Type parent field as Union{Nothing, ReactionSystem}
- Remove unused connection_type field from ReactionSystem struct
- Update tests for new Reaction type parameter (SymbolicT instead of Any)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Hybrid SDE plus jump support in ReactionSystem
Auto jump vars discovery and improve concrete typing
Bindings are auto-discovered by MTKBase from variable metadata when
Systems are created via the 5-argument constructor. No explicit
Catalyst handling is needed.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…scovery

- Replace custom findvars! with MT.collect_vars! for event variable discovery
- Remove obsolete findvars! function and pre_is_not_atomic helper
- Add discovery of parameters from observed equation RHS in make_ReactionSystem_internal
- Add regression tests for event variable discovery via programmatic API
- Add regression tests for observable RHS parameter discovery

The critical fix ensures parameters appearing only in observable RHS are
properly discovered and included in parameters(rs).

Co-Authored-By: Claude Opus 4.5 <[email protected]>
substitutevals was returning Symbolics Num-wrapped values even when
all parameters were substituted with concrete numeric values. This
caused adjacencymat, fluxmat, and massactionvector to return Matrix{Num}
instead of Matrix{Float64} when parameter maps were provided.

This triggered a bug in Symbolics.jl isapprox for Num types, which
incorrectly handles relative tolerance. This caused isdetailedbalanced
to fail with abstol=0 even for systems that satisfy detailed balance.

The fix unwraps the substitution result with value(), so these functions
now correctly return numeric types as documented. This also restores
isdetailedbalanced to use abstol=0 with proper rtol behavior.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@isaacsas isaacsas merged commit 4ada070 into master Feb 5, 2026
16 of 19 checks passed
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.

2 participants