question

juliategami avatar image
0 Likes"
juliategami asked juliategami edited

Create different number of objects for each hour

Hello, how are you?

I need to create different quantities of items in different queues. For example, in the first hour I want to create 100 items in queue 1 and 200 in queue 2. In the next hour, I want to create only the quantity that was consumed. For example, if there are 50 items in queue 1, I want to create only 50 items, which adds up to the 100 items from the beginning. I don't know if I was clear, but could you help me with this please?

I thank you in advance.

FlexSim 24.2.0
processs flowusing codecreated object
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Gustavo Teodoro avatar image
0 Likes"
Gustavo Teodoro answered juliategami edited

A table has been created in which the cell values represent the number of items that must be generated in the respective queues. The queue names are listed in the row headers.

In the Process Flow, each token corresponds to a specific queue where the items should be generated (row headers name). The logic verifies how many items need to be created in the first hour and compares this with the number of items still present in the queue. The difference between these values determines the number of new items that should be created in the next hour. This process is repeated every hour to ensure the continuous update of item generation as needed.

An example is attached.

FX_ItemCreation.fsm


fx-itemcreation.fsm (31.1 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.