Jump to content

Processing time dynamically change base on the number of workers


rpulido
 Share

Recommended Posts

Hello


I need to change the processing time base on the number of workers available. This should could change during the simulation. I have already solved to change it before to start the simulation, but I cannot do it dynamically.


One task is performed in one hour by one worker, but if after 30 min, a second worker is release and come to help, both will finish the task in 45 minutes.


Viceversa, if at the beginning of the simulation there are two workers, but one have to go to another task, the worker that stay in the server will take more time to perform the task.

Link to comment
Share on other sites

  • 2 weeks later...

This is a simple model with hard coded values to show how the processing time can be changed based on the operator availability.

Model contains two servers with Part A being processed at Server A and Part B at Server B. There are two operators, Worker A and WorkerA_B. Worker A is assigned only to Server A while WorkerA_B once released from Sever B is seized by Sever A and the processing time for server A is then recalculated as half of the remaining processing time at Server A.

The model is designed in such a way that if there are any entities waiting to seize Worker A_B at Server B then the Worker A_B is released from Server A once the processing at Server A is finished and moves to Server B, finishes processing all the entities at Server B and then moves back to Server A, if needed.ModelLayout.PNG.32ddda319ad6b655a66f2d4c27283fd7.PNG

Worker A_B will keep moving between Server A and Server B. The model can be easily modified so as to release Worker A_B from server A when there is an entity waiting to be processed at Server B.

The key here is to interrupt the process at A when another worker is available and assign a new processing time to Server A. This is done by process 1, triggered by an event input@Server A.

Server before processing and after processing processes are used to seize and release needed secondary resources.

Worker 1 add on process is used to decide if there are any entities currently being processed at server A and if there are, then transfer the operator to Server A, if there are no entities waiting to be processed at Server B.

ChangeProcessTimeBasedOnAvailableOperators.spfx

Link to comment
Share on other sites

There are actually several different problems that must be addressed. The specific question asked was "how can I dynamically change the processing time based on the number of resources allocated?"

Perhaps the easiest way to do that is to change the server from its standard "Delay"-based behavior to a "Wait"-based behavior. Instead of delaying for a predetermined "processing" time, you want to wait until the work content is completed.


You could take this approach with either a custom object or a library object but let's just look how you could do it with a standard server, lets call it Server1.


SETUP

1) Create a level state named Server1WorkContentRemaining with UnitType of Time.

2) Create a Monitor named Server1WorkDone that monitors Server1WorkContentRemaining for a CrossingStateChange to cross the threshold of 0 in the Negative direction.

The net of the two above items is that you can set Server1WorkContentRemaining to the value that you might have used for processing time (say 1 hour) and if you set Server1WorkContentRemaining.Rate to -1, then exactly 1 hour later the monitor will detect that Server1WorkContentRemaining has decreased to 0 and trigger the event named Server1WorkDone.Event.


There are many nice things about this approach:

a) If you set Server1WorkContentRemaining.Rate to the (-)number of resources in use it will automatically countdown appropriately (e.g. twice as fast if 2, 3 times as fast if 3)

b) Server1WorkContentRemaining is always accurate no matter how many times it is changed or to what values. For example, if you change to 0 resources allocated, then Server1WorkContentRemaining.Rate would be 0 and Server1WorkContentRemaining would stop changing and continue in process indefinitely.

c) It scales to any number of resources. For example if, with 1 minute remaining, you suddenly assign 100 resources to it, the monitor will trigger Server1WorkDone.Event .01 minutes later.


MODELING

1) In the Server, select the new ProcessTye of Task Sequence.

2) Inside that TaskSequence select the ProcessType of ProcessName. Then pick a process name or take the auto-created one of Server1_TaskProcessName.

3) Edit Server1_TaskProcessName and add an Assign step and a Wait Step. The Assign step will assign two things, Server1WorkContentRemaining and Server1WorkContentRemaining.Rate. The Wait step will wait on Server1WorkDone.Event.

The net of these three steps is that it converts Server1 from being strictly time-based to being event-based where the event is the fact that all of the required work is done.


USAGE

Well I started off by indicating that there are many aspects to this problem. Those other aspects are how to adjust the resources committed to Server1 based on what is happening elsewhere in the model. I am not addressing that here, so in my simple model I'll simply provide a couple buttons so you can increase and decrease the number of workers devoted to Server1 and see that it is indeed working as described.

DynamicChange.thumb.PNG.5c193f9f43d795aa0238e084e7452b57.PNG

DynamicallyChangingWorkContent.spfx

Link to comment
Share on other sites

×
×
  • Create New...