I have a system dynamics calculation which is currently working extremely well using a single parameter value however I would like it to source from a database. Using this AnyLogic help I have set up the parameter to source from the database.
However in order to set up the "Choice condition" to cycle through the values in the table, I would like to set up a event or something to define which row should be used.
I assume I will need to set up a state chart with an event maybe to go from 1 to a defined number, by adding 1 at a given rate.
Any help would be appreciated, Thank you
To clarify, Choice condition in this case refers to the database query. In the example, Choice condition refers to the
name
property of an incomingagent
object, however it can be any variable in the model. Let's say there are three record in the database with record ids set to 1,2,3. Cycling through them can be done using the following approach:This suggestion is based on the info provided, of course, if a bit more information about the purpose of this model is shared then maybe a better approach can be devised.