Merged
Conversation
Co-authored-by: Sam Isaacson <[email protected]>
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]>
CI updates
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]>
try using new Pre
- 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]>
Support `@brownians` in DSL
- 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]>
drop unneeded accessor
…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]>
Constructor cleanup
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]>
fix isdetailedbalanced tol issue
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.
This is far enough along I think to move into master now.