AlgebraicJulia / AlgebraicJulia/Petri.jl

Target ModelingToolkit?

Open
#30 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Julia
Stars
44
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Hey Micah,
Nice work. When I look at the code though:

https://github.com/mehalter/Petri.jl/blob/master/src/solvers.jl#L29-L43

I can see that the generated vector field is looping through all possible values at runtime. I think it might make sense to use some program staging here, since Petri can build some pretty big models pretty fast, and this is going to grow exponentially. If you use this process to build an MTK model though, and then have MTK output the ODE function (and some helpers like Jacobians and stuff), then the compiled versions would omit the zero'd part of these tensors, which could have a pretty wild reduction in the amount of computation that has to be done. Let me know if you want any help doing this.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.