Cancel
Showing results for 
Search instead for 
Did you mean: 

scheduling of holidays

Dear all,

 

I have a question: In the init the model copies the selected rosters 500(weeks) times into the agenda. Now I want to schedule every year 3 weeks of holidays and linked this roster to the init. But the outcomes doesn't change.. Weeks of holidays means less capacity so less patients that can be served. What do I wrong? So I tried to schedule in week 10, 11 19 etc the holiday roster but this makes no sense. Can someone help me with this? Than you in advance! Martin

 

This is the init where it is going about:

 

-- Deze method kopieert het basis rooster 500x in de agenda

is
 j, dag1, dag2, dag3, dag4, dag5, dag6, dag7, week1: integer;
 roster, roster_vac: object;
 numSlots, capAlloc, posSlots: integer;
 roster_name, roster_name2: string;
do
 -- Open the correct roster
 numSlots := .Models.Main_Model.Number_of_slots.value;
 capAlloc := .Models.Main_Model.Capacity_Allocation.Value;
 posSlots := .Models.Main_Model.Position_Of_Slots.Value;
 
 roster_name := ".Models.Main_Model.Rosters.Roster_" + num_to_str(numSLots) + "_" + num_to_str(capAlloc) + "_" + num_to_str(posSLots);
 roster      := str_to_obj(roster_name);
 
 roster_name2:= ".Models.Main_Model.Rosters.Roster_vac_" + num_to_str(numSLots) + "_" + num_to_str(capAlloc) + "_" + num_to_str(posSLots);
 roster_vac  := str_to_obj(roster_name); -- TO DO, ander rooster maken
 
 -- Copy roster into yearly planning

   
 j := 1;
 
 week1 := roster[1,1];
 dag1 := roster[1,2];
 dag2 := roster[2,2];  
 dag3 := roster[3,2];
 dag4 := roster[4,2];
 dag5 := roster[5,2];
 dag6 := roster[6,2];
 dag7 := roster[7,2];
  
 WHILE week1 < 750 LOOP
  
  if week1 = 10 and week1 = 11 and week1 = 19 and week1 = 20 and week1 = 10 and week1 = 80 and week1 = 100 and week1 =120 and week1 = 140 and week1 = 160 and week1 = 180 and week1 = 200 and week1 = 201 and week1 = 202 and week1= 203 then roster_vac.copyrangeto({1,3}..{7,51}, Agenda, j,3); else roster.copyrangeto({1,3}..{7,51}, Agenda, j,3); end;
  
  agenda[j, 1] := week1;
  week1 := week1 + 1;
   
  agenda[j, 2] := dag1;roster_vac.copyrangeto({1,3}..{7,51}, Agenda, j,3);
  agenda[j+1, 2] := dag2;
  agenda[j+2, 2] := dag3;
  agenda[j+3, 2] := dag4; 
  agenda[j+4, 2] := dag5;
  agenda[j+5, 2] := dag6;
  agenda[j+6, 2] := dag7;
    
  dag1 := dag1 + 7;
  dag2 := dag2 + 7;
  dag3 := dag3 + 7;
  dag4 := dag4 + 7;
  dag5 := dag5 + 7;
  dag6 := dag6 + 7;
  dag7 := dag7 + 7;
          
  j := j + 7;
 end;

 

 

3 REPLIES 3

Re: scheduling of holidays

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi MartinPastoor,

 

With the given information it is nearly impossible for the forum members to give a proper answer.

 

General hints: try a small but obvious change and see if it works out. Make the change show up in the very beginning of the simulation so that you can check it without long waiting times. Use the Event debugger (on the EventController) to get to the relevant events.

 

Regards,

Gert Nomden


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: scheduling of holidays

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Hello Martin,

 

your condition will never become true, you need to use or instead of and :

 

if week1 = 10 or week1 = 11 or week1 = 19 or week1 = 20 or week1 = 10 or week1 = 80 or week1 = 100 or week1 =120 or week1 = 140 or week1 = 160 or week1 = 180 or week1 = 200 or week1 = 201 or week1 = 202 or week1= 203 then

 

and I guess the second week1= 10 is wrong

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

Re: scheduling of holidays

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Martin,

 

Such a long statement could also be replaced with an inspect structure, for example:

 

inspect week1

when 10,11,19 then

<your code>;

else

end;

 

It is well-described in the Help-pages.

 

Regards,

Gert Nomden


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com