Closed JeffBezanson closed 1 year ago
Hi Jeff. The sir
in petri.jl
of the demo is an UntypedUnnamedRelationDiagram
, not a LabelledReactionNet
. The call to apex(oapply_epi(sir))
takes that diagram and forms a LabelledPetriNet
, psir
, which can then be migrated into a LabelledBilayerNetwork
.
In your case, the sir
being read in from the JSON is a LabelledReactionNet
, so the apex(oapply_epi(sir))
is not appropriate. But it does need to be converted into a LabelledPetriNet
. This can be done simply by calling LabelledPetriNet()
on it, which strips away the concentration
and rate
information.
So the following set of lines should work:
sir_lrxn = read_json_acset(LabelledReactionNet{Float64,Float64}, "data/SIR.json");
sir_lpn = LabelledPetriNet(sir_lrxn);
sir_lbln = LabelledBilayerNetwork();
migrate!(sir_lbln,sir_lpn);
Thank you.
I'm trying to run the MTK integration example, but starting with the JSON representation of the model. Here are some things I've tried:
Any help appreciated.