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.

Benjamin W2 avatar image Benjamin W2 commented ·

Hey @Cayo E, was my answer helpful for you? If so, could you accept it? Otherwise, how else can I help?

0 Likes 0 ·

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:

Object current = ownerobject(c);
Object item = param(1);
int port = param(2);
Object destination = param(3);
double priority = param(4);
int preempt = param(5);


if (Model.find("Operator1").find(">stats/state_current").value == 1) //1 means idle
{
	return current.centerObjects[1];
}	
else if (Model.find("Operator2").find(">stats/state_current").value == 1)
{
	return current.centerObjects[2];
}

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:

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

Cayo E avatar image Cayo E commented ·

Can I just use only the programming language?

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 Cayo E commented ·

Yes, but you will have to set the operator's state based on the model's time. Here is a reference to the model's properties and functions:

https://docs.flexsim.com/en/19.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Model.html

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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