DARPA-ASKEM / Model-Representations

Modeling framework representations for ASKEM
https://darpa-askem.github.io/Model-Representations/
8 stars 2 forks source link

MIRA Template Model Representations #6

Open jpfairbanks opened 1 year ago

jpfairbanks commented 1 year ago

@bgyori, can we brainstorm a schema for storing the MMT representation rather than the lower level MiraNet representation that we have been using. What is the native MIRA storage format that you are using? We would like to ingest that directly rather than have you convert to something closer to petri nets.

bgyori commented 1 year ago

We have a formal JSON schema for the MIRA TemplateModel representation here: https://github.com/indralab/mira/blob/main/mira/metamodel/schema.json. You can see 3 examples for the current ensemble challenge with this serialized representation here: https://github.com/indralab/mira/tree/ensemble/notebooks/ensemble (the files named _template_model.json).

One thing to note is that these TemplateModels are not "pre-compiled" in the way e.g., Petri nets are in a couple of ways, most importantly in that each Template has its own independent Concept arguments, and at the Template level, these Concepts are not merged. That happens at a later modeling stage. So if you use the TemplateModel representation directly, you would have to perform that compilation step to figure out which Concepts are the same on your end. In basic cases this is straightforward, e.g., you can just look at the name, but in general it can require a bit more logic.