Repository navigation
Conversation
…not refuse it as singular (lanl#961) A $-fixed species has no equation, and its row of J is 0. The columns were solved with it among the unknowns where a model had no law and no mask, and beside a law, whose independents it was among: J was singular and dY_ss/dp was refused as not existing. It is taken out of the columns' unknowns; the solve for the state is unchanged. 44 corpus models solve where they were refused, each agreeing with central differences, and the 566 that solved before are bit-identical.
This branch has not been deployed
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.
Part of #961: lifts the item "A
$-fixed species in a model with no conservation law and no rule species is refused as 'dY_ss/dp does not exist'". It also lifts the same refusal beside a conservation law, which the item didn't list.What was wrong
A
$-fixed species has no equation, so its row of J is 0.compute_ss_sensitivitysolved the columns −J⁻¹·∂f/∂p over the unknowns, and kept a fixed species among them in two cases:ss_unknown_speciesreturns the law's independents verbatim, with the fixed species among them. Singular the same way.On main, both raise
SimulationError: Steady-state dY_ss/dp does not exist for this model: the Jacobian at the steady state is singular …for columns that exist:$Smakes X at k1, X lost at k2; S set byS0$Sturns A into B at k1; A + B = 1The change
The columns' unknowns no longer include a fixed species. The solve for the state is unchanged:
ss_unknown_specieskeeps its contract for its other two callers, the Newton solve and the eigenvalues.The diff (
src/steady_state.cpp)Tests
python/tests/test_steady_state_sensitivity_fixed_species.py(5 tests):Mutation tests (the core rebuilt for each):
any_fixedgateCorpus
steady_state(sensitivity_params=<first 4 parameters>)on 1,500 models (1,323 BioModels, 177.netfiles in the repo), each in its own process, on main and here:The 44 were checked against central differences of the steady state itself, at relative steps 1e-5 and 1e-3 per parameter:
sink_compart.net(0 against 1e-10 to 1e-9 of noise).BRis 2.51032 analytic, against 5.46 at step 1e-5 and 2.51011 at 1e-3. The others are MODEL6655501972, BIOMD0000000221,Motivating_example.netand BIOMD0000000015.Checks (macOS arm64)
python/tests: 17,209 passed, 0 failed.parity_checks/tests: 1,015 passed. The 2 failures (test_bngsim_provenanceand the reference-archive replay) also fail on main here: their subprocess can't importbngsimwithout my local import shim.pre-commit run --all-files,sphinx -W, andci/changelog.py check/required(changelog.d/961.fixed.3.md) are clean.