Closed brandomr closed 7 months ago
There is a little bit of a problem with this model. When you stratify a model like this, in addition to duplicating the regulatory structure to two cities, by default, movement is introduced between the two cities. While MIRA supports this internally, this is not something that the regnet framework can represent. So the root cause of the failure here is not a bug but a limitation of the regnet framework.
To avoid this, you can modify the stratification as
model_2_city = stratify(
model,
key="city",
strata=[
"Toronto",
"Montreal",
],
structure=[],
)
where structure=[]
ensures that there is no movement between the two locations which makes the model fit into the regnet framework.
Got it, thanks for the clarification; I'll add that handler in the case the user wants to stratify over a regnet. FYI @mwdchang @Tom-Szendrey
After stratifying a regnet the export to JSON fails with a basic example for some reason. I also noticed that regnet's don't have the normal export (e.g.
from mira.modeling.amr.petrinet import template_model_to_petrinet_json
).Is this user error on my end or a bug, etc?