Initializing Entities from a stack?
Posted: Fri Aug 23, 2019 4:13 pm
Hi,
Consider a stack of projects to complete, each with a different initial amount of work to do. Since labor is finite, work is completed for only a few projects simultaneously. Naturally I would like to track only the projects that are active, e.g. start the simulation with just a few projects entities and delete a project entity once the remaining work is zero. Since completion of a project frees up labor, progress can begin on a new project: I would like the initial conditions of the new project entity to be drawn from the "stack" of projects.
So it seems like there are two ways to initialize entities:
(1) With the Entity Initialization Data in the Model Overview. This seems like a natural place for the "stack" of projects: there are place holders for all the information I would need about every project. The problem is I do not know in advance the time at which the entity must be created. Entities that have an empty checkbox are not "next on the stack", instead they are never created.
(2) With the create entity action, you can set the initial conditions for stocks, attributes, etc. I can populate the initial condition of a stock with a lookup table, driven by a running counter of the number of projects. (See attached example.) But this becomes tedious if there are many initial conditions to set, and becomes especially tedious if I need to change the projects in the "stack".
Seems like a third way would be useful:
(3) Check all the entities in the Entity Initialization Data, but allow for some other trigger than Time >= value to create the entity.
Is there an easy way to do this already?
Best regards,
Rob
Consider a stack of projects to complete, each with a different initial amount of work to do. Since labor is finite, work is completed for only a few projects simultaneously. Naturally I would like to track only the projects that are active, e.g. start the simulation with just a few projects entities and delete a project entity once the remaining work is zero. Since completion of a project frees up labor, progress can begin on a new project: I would like the initial conditions of the new project entity to be drawn from the "stack" of projects.
So it seems like there are two ways to initialize entities:
(1) With the Entity Initialization Data in the Model Overview. This seems like a natural place for the "stack" of projects: there are place holders for all the information I would need about every project. The problem is I do not know in advance the time at which the entity must be created. Entities that have an empty checkbox are not "next on the stack", instead they are never created.
(2) With the create entity action, you can set the initial conditions for stocks, attributes, etc. I can populate the initial condition of a stock with a lookup table, driven by a running counter of the number of projects. (See attached example.) But this becomes tedious if there are many initial conditions to set, and becomes especially tedious if I need to change the projects in the "stack".
Seems like a third way would be useful:
(3) Check all the entities in the Entity Initialization Data, but allow for some other trigger than Time >= value to create the entity.
Is there an easy way to do this already?
Best regards,
Rob