Skip to content

Long runtimes for structural_simplify on large chemical reaction network model (potential future benchmark case?) #3557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TorkelE opened this issue Apr 10, 2025 · 0 comments

Comments

@TorkelE
Copy link
Member

TorkelE commented Apr 10, 2025

The model in question can be found here: https://github.com/SciML/Catalyst_PLOS_COMPBIO_2023/tree/master/Benchmarks/Data (it is the BCR.net file). It is quite large, about 1100 unknowns.

Currently, structural_simplify has very long runtimes when applied to this model. I imagine that this might make sense, as structural_simplify haven't been optimised for this kind of model yet. However, it might make sense to add it as a future benchmark for evaluating structural_simplifys performance?

To retrieve the model run

using Catalyst, ReactionNetworkImporters
BCR_loaded = loadrxnetwork(BNGNetwork(), "BCR.net")
BCR = complete(BCR_loaded.rn)

# Without remove conserved.
begin
    @time osys = convert(ODESystem, BCR; remove_conserved = false) # 3.4 seconds.
    @time complete(osys) # 1.9 seconds.
    @time structural_simplify(osys) # 471 seconds.
end

(I tried priming the model through Catalyst's remove_conserved, but that didn't help)

Actually simulating the model is fairly straightforward and quick

using OrdinaryDiffEq
oprob_js = ODEProblem(BCR, BCR_loaded.u0, 1000.0, BCR_loaded.p; jac = true, sparse = true)
@time sol = solve(oprob_js, Rodas5P()) # 11 seconds
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

No branches or pull requests

1 participant