This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.
Task:
A combiner is set up to breakdown per the MTBF/MTTR feature and an operator is on a schedule (TimeTable). The issue is the operator is sometimes "utilized" when the combiner is in the "breakdown" state. The issue only seems to occur when the combiner goes down while an operator is being used. I simply want the operator to be free when the combiner goes into the "breakdown" state and perform other tasks.
Solution:
The standard functionality in the breakdown does not free the operator.
Using the Down in the MTBF/MTTR will free the Operator. This solves the issue that if the Combiner breaks down the Operator is free to do other tasks. In the Down function also a travel task for the operator gets created to send him home. This is to visualize that the operator is free for another job.
The tricky bit was to identify the operator which is allocated to the process. If the Operator be connected directly to the Combiner it would be easy to reference to it. But if a dispatcher is used (maybe with a number of operators) it is important to figure out the right operator.
One way could be to use the command getutilizedobject() to find the Operator if he is busy with the process. But because the Operator follows a TimeTable he could also be in state SCHEDULED_DOWN.
The identification of the Operator is done by creating an own tasksequence for the operator in Pick Operator on the Combiner. A nodefunction is called to write the id of the operator into a label on the combiner. Because of using an own tasksequence additional code is necessary on the Combiner in ProcessTime, OnInit, OnMessage and OnProcessFinish.
Because the Operator is set to free in the Down function of the MTBF/MTTR in the Resume function the Operator will be requested again by the own request tasksequence.
To prevent that the Operator still has a tasksequence if the Combiner is in state Breakddown and the Operator finish his break (TimeTable) in the Resume function of the TimeTable the tasksequence queue of the Operator is emptied and the Operator is set to free and gets a travel task to his home.
A good way to see what is going on in the model is just to use the Step button and jump from event to event.
Attention:
Do not delete or rename the object Logo_FlexsimD, because otherwise the model will not work correctly. Also do not rename, delete or re-rank other objects.