question

Yunjukuo avatar image
0 Likes"
Yunjukuo asked Fengjun0113 commented

How to set number of operator for each shift by Global Table?

In this case, the operators are divided into day shifts and night shifts. The maximum number of operator in each shift is 5, so there should be a total of 10 operators in day and night shifts. But for the convenience of generating charts, I set 5 operators working for 24 hours in the model.

Day shift working hours: 7:00~19:00

Night shift work hours: 19:00~next day7:00

Each person has a rest time following the TimeTable setting.

I want to use GlobalTable to set the number of operator working in day shift and night shift. How can I do this in FlexSim?

In the table below, each row represents the day of the month, and each column represents which person is on the day shift or night shift. 1 means working, 0 means not working

For example, row "Day 5" column "Day OP_B" is 1 means operatorB must work on the 5th day of this month.

1660407402106.png

https://drive.google.com/file/d/1Mg577vHXRjEMAoagDcksjB-zONzXFCwA/view?usp=sharing

FlexSim 16.1.2
global tableoperatorshift schedule
1660407402106.png (14.2 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Fengjun0113 commented

What you could do is create a time table for each shift, with each operator being a member of both time tables. In the down/resume-function you can then add a condition based on the Shift table that controls if the operator is actually stopped or not.

Because this controls if the down time happens or not, the marked times in the time table are inverted: In the night shift table, the night hours are marked as inactive and vice versa.

The code below determines the correct row by reading the current date and converting the day into a number. To get the column it's probably easiest to just write those onto labels of the operators and read them from there.

1660549108270.png

Only if the shift is marked with a "0" in the table, will the condition evaluate to true and the operator will be stopped. Otherwise nothing happens and the operator remains active.

1660548986237.png

(In the screenshot I use the default "Stop Object" logic. You can also use other logic such as the "Travel To Object, Delay Until Down Time Complete". Just change the option before you edit the code and then enclose everything after the variable definitions (up to line 6) in the condition as seen above)


1660548986237.png (81.0 KiB)
1660549108270.png (5.0 KiB)
· 13
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.