Cancel
Showing results for 
Search instead for 
Did you mean: 

different workers each shift

Builder
Builder

i have a situation where my model runs for one week.Each day have 3 shifts and each shifts have different number of workers every day.worker change every shift and also every day.How can i change the number of workers in the workerpool according to the day and shift??

any help??

21 REPLIES

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can not load worker dynamically during the simulation run. The workerpool will be filled at the start of the simulation according to the creation list of the workepool.

 

One way to solve your problem is to create each individual worker in the class library and assign to each worker a individual shiftcalendar. Then create all worker in the workerpool. The individual worker will work only in their working times.

 

 

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

Re: different workers each shift

Builder
Builder

Hi Steffen_B

 

Number of workers is not fixed each day  every shift.Morning shift today can have less worker then morning shift tommorrow.how can i solve this situation,if i allot the shift to the worker it will be same for each day but it can be different different day .

help??

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

How do you want to control this? Do you have a schedule for the individual workers?

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

Re: different workers each shift

Builder
Builder

i have the schedule something like this

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

only an idea. You can set the shiftcalendar dynamically with shiftcalendarObject in the workers. You could create 4 shiftcalendar objects (each only for one shift and one without working time). Create 15 workers in the workerpool. Then you set at the beginning of the shift the right shiftcalendar for the number of workers, all remaining workers get the shiftcalendar without working time...

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

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I made an example:

 

http://www.bangsow.de/detail_en.php?id=687

 

look in the observer of the object ShiftCalendar

 

diffworker_quantity.gif

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

Re: different workers each shift

Builder
Builder

Hi Steffen_B

 

Thanks for the solution,but i am not able to understand the functioning.When i run the model in night shift on tuesday as shown in the figure,there seems to be 15 workers,but according to the table it should be only 4 workers.It seems something i am missing to  catch.

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

To detect the shift change I have included in the shiftCalendar object between the shifts one minute unplanned time. Unplanned is observable. The control is in the ShiftCalendar - Tools - Observers. I observe the attribute unplanned, look for the day and the shift und set the shiftcalendar in the workers:

 

(attribute: string; oldValue: any)
is
 d:string;
 shift:string;
 days:string[];
 numWorkers:integer;
 i:integer;
do
 days:=makeArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
 if oldValue=true then
  --start of new shift
  shift:=self.~.getCurrShift;
  d:=days[dayOfWeek(eventController.absSimTime)+1];
  numWorkers:=workers[d,shift];
  --set the shiftcalendars
  for i:=1 to .resources.worker.numChildren loop
   if i<=numWorkers then
    .resources.worker.childNo(i).shiftcalendarObject:=str_to_obj(shift);
   else
    .resources.worker.childNo(i).shiftcalendarObject:=nothing;
   end;
   
  next;  
 end; 
end;

 

To set it for the start of the Simulation, set the start-time of the simulation 2 minutes before the start of a shift:

start.png

 

You can reset the statistics then after two minutes to delete the "warm-up" results.

The unplanned workers have a blue icon.

 

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

Re: different workers each shift

Builder
Builder

when i see in the model the number of workers is more as per the worker table.is it happening because of warm up??