question

Cenk ZR avatar image
0 Likes"
Cenk ZR asked Cenk ZR commented

Is it possible to implement workload based release method ?

Hello, I have a system of 3 processors with 3 queues before them. So the system is as follows: Source --> Queue1 --> Processor1 --> Queue2 --> Processor2 --> Queue3 --> Processor3 --> Sink. I also have an arrival schedule for my orders, defined in the source. For each order, the times that they are going to spend on each processor is also defined as a label (ProcessTimeX, X is the processor number) in the source. I want to implement the workload based release method as follows: Before releasing an order, firstly I want to sum up the process times of the items being currently on queues. For processor 1, I want to sum up the process times of the items currently on queue1 (just ProcessTime1), for processor 2 I want to sum up the process times of the items currently on queue2 (just ProcessTime2) and for processor 3 I want to sum up the process times of the items currently on queue3 (just ProcessTime3). Then I want to calculate that if I release the next order and add its ProcessTime1, ProcessTime2 and ProcessTime3 to the corresponding previously summed up values, will the new values exceeds a certain limit or not. If at least one of the three new summed up values exceeds its limits, I want my order not to be released and wait until the time that none of the limits will be exceeded by releasing that order. If none of the values exceed its limits then I want to release the order. The limits are as follows: for ProcessTime1 it is 110 seconds, for ProcessTime2 it is 100 seconds, for ProcessTime3 it is 90 seconds. I also attached my model, named as “workloadwith3processors”. If someone can help me with this problem, I will be very glad. Thank you very much.

workloadwith3processors.fsm

processorprocess timerelease methodorder release
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

Braydn T avatar image
1 Like"
Braydn T answered Cenk ZR commented

@Cenk ZR

This should be fairly straightforward to do. I would make a few changes to your model. Instead of creating the items in a source, I would use subflows in Process Flow. The reason for this is because the logic for releasing the next order will be easier to incorporate in Process Flow.

You will have a Scheduled source that releases a token every time you would like to release an order. This token will run a chunk of code that loops through the Queues Subnodes and checks the value of the label on the flow item and adds them all up. Then you will have an if statement that checks if the value of that total processing time is greater than the limit you set. If it is, you do nothing. If it is less than that limit, you set a global variable value. In the ext step, a decide will see if you have set that value. If you have, it will go to the subflow to create the flow items. If not, it will loop back around to the custom code block. I have provided a very very simple example. It only iterates through one of the queues, and it does not create any items, but it should provide a base to build your model.

example.fsm

example.fsm (23.3 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.

Cenk ZR avatar image Cenk ZR commented ·

@Braydn T

Thank you very much for your help.

0 Likes 0 ·