ciemss / pyciemss

Causal and probabilistic reasoning with continuous time dynamical systems
Other
17 stars 6 forks source link

Implement ASKEM Model representation for Lotka-Volterra Regulatory networks #153

Closed djinnome closed 1 year ago

djinnome commented 1 year ago

For the hackathon this Thursday, we need to write code that can read in a serialized signed-regulatory networks and generate a DynamicalSystem subclass for representing Lotka-Volterra ODEs.

SamWitty commented 1 year ago

As we briefly discussed on Friday, this should be doable without writing any new custom subclasses of DynamicalSystem. While the name is currently misleading, the PetriNetODE subclass is agnostic to any ODE model that satisfies the mass balance assumptions. The current loading utilities will work with any MIRA TemplateModel, regardless of whether it was generated from a signed-regulatory network or a Petri Net.

My suggestion is to ingest via the following:

regnet -> TemplateModel -> PetriNetODE

This only requires a mapping from regnet -> TemplateModel, as we already support loading MIRA TemplateModels without any additional code.

djinnome commented 1 year ago

Yes, I recall. This all makes sense. To test the code, I am planning to implement a hand-built Lotka-Volterra model that I can directly compare with the Mira Lotka-Volterra model. For the unit test, if the parameters between the two models were the same, I could directly compare the output of the deriv method, since that was deterministic, too.

But, for the parameters to be the same, I should select add_uncertainty=False when loading the Mira model.