“Anylogic” Inventory management

2019-08-29 01:55发布

问题:

I want to simulate a hospital. A patient(disease is illustrated with color) arrives at the hospital, and the doctor needs a medical cart to treat patient. The medical cart have four different item categories. Three of the item categories relates to the color of the patient and one item category is used at every patient. When a patient arrives a certain amount of the medical cart gets drained, until it reaches a certain inventory level and the cart is transferred to a location to be filled up. For instance blue patient arrives and blue stock is lowered along with the general stock. If there is three blue patients in a row the carts needs is send to be refilled even though it still have stock for other patients. An full example of the thinking: There are 40 carts available-each with medicin etc. for 4 blue patients, 3 green,2 red and 10 general. If first four patients are blue the carts needs to be refilled and a new cart is activated.

So the patient flow is described with discrete modeling using the processes modeling librabry, but I cant quite figure out how to create the medical carts in a way such as the inventory levels depend on the number of patients that arrives and at a certain level be filled up. Should I use agent based or system dynamic modelling or continue with discrete modeling?

回答1:

Your Cart MUST be a resource that is seized by the doctor... When you release the cart you create a selectOutput asking the question if the cart is filled or not with the necessary items... If it's not it goes refill as you can see in the following image:

Now to ask the "itemsMissing" question... you need your resource to be a Cart agent with one variable for each item that keeps count of how many items remain.

This is what I would do... but you need to investigate probably how the release block works with the resource task end block, which is something I can't teach here, so you will have to investigate the help documentation if you don't know.... And probably you will have to adapt this example to your particular case.



标签: anylogic