question

Cayo E avatar image
0 Likes"
Cayo E asked Benjamin W2 commented

Operators working on different shifts without dispatcher

I have a question.

There are two operators working on a single processor but different shifts, it's possible without using the dispatcher?

FlexSim 19.1.1
operatordispatcher
· 1
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

Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered Benjamin W2 commented

Hi @Cayo E,

I believe this is possible using timetables and some custom code within the Flow tab underneath the Use Transport field. You can use the timetables to change the state of the operators at different times.

The custom code could look something like this:

  1. Object current = ownerobject(c);
  2. Object item = param(1);
  3. int port = param(2);
  4. Object destination = param(3);
  5. double priority = param(4);
  6. int preempt = param(5);
  7.  
  8.  
  9. if (Model.find("Operator1").find(">stats/state_current").value == 1) //1 means idle
  10. {
  11. return current.centerObjects[1];
  12. }
  13. else if (Model.find("Operator2").find(">stats/state_current").value == 1)
  14. {
  15. return current.centerObjects[2];
  16. }

This code will check to see if an operator is idle, then send then return the center-port connection where that operator is connected.

Here is a list of states and their corresponding numbers:

  1. 23 entries, [state, time, active]
  2. 0 ["other", 0.000000, 0]
  3. 1 ["idle", 0.000000, 1]
  4. 2 ["processing", 0.000000, 0]
  5. 3 ["busy", 0.000000, 0]
  6. 4 ["blocked", 0.000000, 1]
  7. 5 ["generating", 0.000000, 0]
  8. 6 ["empty", 0.000000, 0]
  9. 7 ["collecting", 0.000000, 0]
  10. 8 ["releasing", 0.000000, 0]
  11. 9 ["waiting for operator", 0.000000, 0]
  12. 10 ["waiting for transport", 0.000000, 0]
  13. 11 ["breakdown", 0.000000, 0]
  14. 12 ["scheduled down", 0.000000, 0]
  15. 13 ["conveying", 0.000000, 0]
  16. 14 ["travel empty", 0.000000, 1]
  17. 15 ["travel loaded", 0.000000, 1]
  18. 16 ["offset travel empty", 0.000000, 1]
  19. 17 ["offset travel loaded", 0.000000, 1]
  20. 18 ["loading", 0.000000, 1]
  21. 19 ["unloading", 0.000000, 1]
  22. 20 ["down", 0.000000, 0]
  23. 21 ["setup", 0.000000, 0]
  24. 22 ["utilize", 0.000000, 1]

Here is the documentation on time tables:

https://docs.flexsim.com/en/19.1/Reference/Tools/TimeTables/

· 2
5 |100000

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