The number one issue with pySODM's stratification concept is that all states must have the same number of stratifications (and thus be of the same size). However, this makes the coupling of completely different models, or models with submodels, impossible to simulate.
As an example, within the COVID-19 project, I want to couple the differentials of a macro-economic IO model, where every state is stratified into 64 economical sectors, to an epidemiological model where each age group is stratified into ten age groups. xarray allows to build datasets where the data_variables have different stratifications.
I think this issue can be fixed rather easily by defining an additional variable in the model declaration declaring the dimensions of every state. From this declaration, the size of every state can be deduced and saved. Then, these sizes can be used to adequately flatten/deflatten the model's states when they are sent to the integrator.
The number one issue with pySODM's stratification concept is that all states must have the same number of stratifications (and thus be of the same size). However, this makes the coupling of completely different models, or models with submodels, impossible to simulate.
As an example, within the COVID-19 project, I want to couple the differentials of a macro-economic IO model, where every state is stratified into 64 economical sectors, to an epidemiological model where each age group is stratified into ten age groups.
xarray
allows to build datasets where thedata_variables
have different stratifications.I think this issue can be fixed rather easily by defining an additional variable in the model declaration declaring the dimensions of every state. From this declaration, the size of every state can be deduced and saved. Then, these sizes can be used to adequately flatten/deflatten the model's states when they are sent to the integrator.