Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the number is constant 15, but some of them are unplanned (blue) depend on the day and the shift

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

in this version I have included a initialization, so there is no "warm-up"

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

Re: different workers each shift

Builder
Builder

Hi Steffn_B,

Thanks fr the solution,I understood the concept now.But i have a question,Earlier i used to find optimum number of workers by using experiment manager in the same way as given in the manpower example of Plant simulation,but now it seems complicated.how can i find the optimum manpower per day per shift...it seems complicated

any help??

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can also define table cells as input parameter in the ExperimentManager and define experiments. So you can make experiments with different worker-numbers. You only need to define the "total" maximum worker-number in the creation table in the workerpool.

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

Re: different workers each shift

Builder
Builder

can you please give me an example for the above model?i am nt able to set the experiment manager properly. do i also need to change the methods in advanced setting of experiment manager??

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

look in the attachment, I have included the experiments for monday.

 

To configure experiments mit multiple inputs you can use in the ExperimentController.

 

Tools - Multi-Level Experimental Design

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

Re: different workers each shift

Builder
Builder

Hi steffen_B,

 

The example works perfectly but when i try to run the experiment from sunday 22:00 hrs to next week saturday 22:00 hrs,the model shows error,the model runs only if i start the simulation from monday,i am nt able to figure it out.How can i start the simulation from sunday night 22:00 hrs ??

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you need just to extend the init-method a little bit. If you want start at a unplanned time, then you don't get a reference from the table (error-message). So you need to handle this case:

 

is
 d:string;
 shift:string;
 days:string[];
 numWorkers:integer;
 i:integer;
do
 days:=makeArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
 shift:=shiftCalendar.getCurrShift;
 
 if shift /="" then  -- shift = "" means unplanned time
  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;
 else -- unplanned time, set all worker to unplanned
  for i:=1 to .resources.worker.numChildren loop
   .resources.worker.childNo(i).shiftcalendarObject:=nothing;     
  next;
  
 end;  
 
end;

 

 

 

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

Re: different workers each shift

Builder
Builder

The code is showing some syntex error at line 12.But everything seems fine to me...??

Re: different workers each shift

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

this is the observer method. It is also called, if you start at an unplanned state and the state doesnt change. I have also extend the observer-method of the ShiftCalendar. See attachment.

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