Cancel
Showing results for 
Search instead for 
Did you mean: 

Worker assignment by Broker

Creator
Creator

Hello everyone!

I need your help with a very simple problem:

In my model there are 150 workers, divided into 3 shifts of 50 each. Each worker can perform 10 different Services. More than one worker can perform each Service, but there are no 2 workers alike. The assignment of the workers to the stations is working perfectly.

My question is this: knowing that the Broker assigns a the first available worker to a requesting Station, if there is more than one worker available that can perform the required service, which one will the broker choose? The one that has been waiting the longest in the WorkerPool? I would like it to choose the one with the lowest statServicesWorkingPortion value.

Is this possible??

Thank you!

5 REPLIES 5

Re: Worker assignment by Broker

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

the Broker uses following strategy:

Check all exporters with the same priority

  1. exporters which are already at an appropriate workplace
  2. exporters which are not at a workplace
  3. exporters which are already at an inappropriate workplace

Then exporters with lower priorities are handled in the same way.

 

For solving your problem I would like to know which version of PlantSimulation you are using.

 

Regards

Karola

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Worker assignment by Broker

Creator
Creator

Hi! I am using PS 11.0.6.

Is there an exit control or a trigger that can be programmed?

Thanks!

Re: Worker assignment by Broker

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can use the broker import request control. It is called, if the importer requests a service and if a worker gets available. Create the control with the key F4 (then you get an template). You could read all available workers there, add the value of statServicesWorkingPortion and sort the table with the available workers e.g. like this:

 

(obj : object;   -- Importer
 type : integer) -- Importer type (0=failure importer, 1=setup importer, 2=processing importer, 3=transport importer)
is
 workersToBeExported : table[object,string,integer,real];
 workersToBeExported_1:table[object,string,integer];
 testImportSuccessfull : boolean;
 i:integer;
do
 workersToBeExported.create;
 workersToBeExported_1.create;
 
 ?.globaltestImportFor(obj, type, workersToBeExported,true);
 --add utilization
 for i:=1 to workersToBeExported.yDim loop
  workersToBeExported[4,i]:=workersToBeExported[1,i].statServicesWorkingPortion;  
 next;
 
 --sort table ascending
 workersToBeExported.sort(4,"up");
 --copy the first row
 workersToBeExported.copyRangeTo({1,1}..{3,1},workersToBeExported_1,1,1);
 
 
 

 if workersToBeExported_1.yDim > 0 then
  ?.engage(obj, type, workersToBeExported_1);
 end;
end;

 

 

 

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Worker assignment by Broker

Creator
Creator

Thanks Steffen!

I implemented your solution and it works. Quick question: where can I find the created table with the workers to export?

Thanks!

Re: Worker assignment by Broker

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
It is only a variable of type table. Place a breakpoint a line after setting the table. Then right click in the debugger on the table-variable in the method --> open ...table.
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net