'Dynamic resource assignment Anylogic
i'm doing a model on anylogic where agents have to use a set of resources written to a database. The database has a row for each agent, and for each agent the resources used are shown in the columns (which are different, by order and type, for each agent). I created resourcepools for each resource (which all have capacity = 1 except one), and a variable that is updated every time a resource is used, so that the program reads all the columns one at a time. I would need to create a generic service block that, through a function, uses the resourcepool associated with the resource written in the database. I know I need to create a function of type ResourcePool [] [] but I don't know what to write in the body of the function. P.S: My model has a single type of agent, so if possible I would not want to create others in order not to complicate it further
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|