Calculating Remaining Shift Time For Shift Handover
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
[FlexSim 25.2]
Good Morning,
I have 3 Time Tables, "Morning_Shift", "Afternoon_Shift", & "Night_Shift".
I have a Process Flow with multiple tasks.
I would like the tokens flowing to go through a "Custom Code" that calculates the time remaining in their shift, and a "Decide" to compare:
If "token.TimeLeft" is more then "token.TaskTime", the token proceeds to complete the task.
If "token.TimeLeft" is less then "token.TaskTime", the token flows to a "Delay" with the time set as "token.TimeLeft + 0.01 (hrs)" to ensure that the next shift has started and the Operators of the next shift will execute the task.
Essentially, I don't want tokens to be in the middle of a task when the shift changes.
- Each Task has a "Pull From List" & "Push To List". I understand that the "Decide" should come before the "Pull From List".
Although I am having trouble with the "Custom Code" to calculate the Time Remaining for each shift. It will need to be dynamic enough to refer to which of the 3 shifts are active at the point of calculation.
Would you be able to help me on this section?