I have a model with a large number of processors (>>100) and quite a few transporters. We will be using the model to test/demonstrate staffing strategies, so I needed to assign one of four shift schedules to each and every processor and transporter using code, as doing it manually will be impractical. I dug though the forums and found a way to do it using nodejoin(), and it seemed to work in FlexSim 2019.
But now I upgraded to FlexSim 2020 and it broke. At the start of the first break I get the following messages, and only the first processor in each time table's members is stopped. After that, that TimeTable stops - it doesn't restart the processor after break, nor does it continue to the next break.
Here is the error message:
time: 2700.000000 exception: Exception Caught in ObjectFunction267__project_library_TimeTable_behaviour_eventfunctions_OnTimerEvent object: /Tools/TimeTables/TimeTable2 i: /Tools/TimeTables/TimeTable2>variables/table/2 class: /Tools/TimeTables/TimeTable2 time: 2700.000000 exception: Exception caught in TreeNode::receivemessage() time: 2700.000000 exception: Exception caught in Executive::processeventinlist(). Throwing. time: 2700.000000 exception: Exception caught in Executive::steptotime(). Throwing. time: 2700.000000 exception: Exception caught in Executive::tick(). Throwing. time: 2700.000000 exception: int runthemessageloop() #4 exception: Executive::instance.tick(); time: 2700.000000 exception: int runthemessageloop() #6
I looked at the referenced location in the tree and didn't see anything that looked obviously wrong...
I was able to replicate it in a small model (attached). The idea is for the user to choose the time table for each processor by filling out the global table "tableScheduleAssignments" before each run*. At startup, the process flow code deletes all the connections from the two timetables (since you are presumably choosing a different configuration), and then makes new connections based on the global table. After the code runs you can see the TimeTables in the processors' Breadown tabs, and you can see the processors in the TimeTables' Members tab, as expected -- it looks exactly as if you did it manually. But it dies at the first break when running in FS2020.
Can you help me figure out how to make this work in FS2020?
Model: timetableassignmentusingcode.fsm
(* FWIW, in the actual model, the assignment table is read in from Excel, though this doesn't affect the operation of the code.)