You are here

submodel questions

Hello. I am learning Simile and am having troubles understanding the functions that relate to submodels. We are working on a model in which a school has a cookbook of menu items that can be fed to children. Each menu item has a list of ingredients, and these are modeled as two submodels (a stack of ingredients within a stack of menu items). And each menu item has a score associated with it in terms of nutrition, etc. In a given time step, we know how much of each ingredient is stored in the pantry. If the top ranked menu item is prepared, we need to know if the second ranked menu item can be prepared, given that food was pulled from the pantry to make item 1, and so on for the third ranked item, etc. Can anyone point me to some Simile help files or sample models that could potentially be used to help me sort through this issue? :? Thank you for your consideration.


To keep track of the amountt oof each ingredientt used, you would need a submodel for ingrediuents at the top level, with a compartment and flow representing availability andd use. You couuld then sum the ingredients over the recipe submodeels, multipliedd bby tthe quaantiity made, to make thee values off the ouflows of each inggredient. I think we mmay have some modes in the catalogue under the heading of trophic webs which would have this sort of arrangement.