question

Titli D avatar image
0 Likes"
Titli D asked Titli D commented

Code Needed for 2 Operators Assignment for 3 parallel stations

In my model, there are 3 parallel stations and 2 operators; Operator1 is fixed for station 1 and Operator2 flexes between station 2 and station 3. I have connected a Dispatcher to Processor1, Processor2, and Processor3 with center connections (S key). And Queue1 and Queue2 to Dispatcher with center connection (S key). What should be the connection so that Operator 1is fixed only to station 1 and Operator 2 flexes between station 2 and station 3? Please let me know what code should I write so that the model operates in the above mentioned way.

Choose One
operatordispatcherstations
5 |100000

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

Steven Hamoen avatar image
1 Like"
Steven Hamoen answered Steven Hamoen commented

@Titli D Why don't you connect Operator 1 directly to station 1 (with a S connection) and Operator 2 to the dispatcher and the dispatcher with stations 2 and 3. I think that will do exactly what you describe.

Actually to connect an operator to a dispatcher you need an A connection and not an S connection (A from dispatcher to operator)

· 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.

Titli D avatar image Titli D commented ·

Hi Steven, How can I assign the priority to the task to decide which task is done in which station, I mean to say from the Queue 2 how the operator2 will decide which task to take to which station, between station 2 and station 3?

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen commented ·

@Titli D See your other question

0 Likes 0 ·
Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered Titli D commented

@Titli D The arrival rate is determined by the source or any other process that feeds the queues. The clearing is the time on the processor. Or am I missing something?

· 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.

Titli D avatar image Titli D commented ·

@steven.hamoen

The arrival rate is determined by the source. And clearing is the time from the Queue to sink. Because the flow is: Source-Queue-Processor-Queue-Sink

0 Likes 0 ·
Titli D avatar image
0 Likes"
Titli D answered Titli D commented

@steven.hamoenThe mistake I did was, I did not connected Dispatcher to Queue1. Now after connecting Disptacher with Queue1, there are 2 center connections: 1. Operator and 2. Dispatcher. And i wrote the code : same like yours. now it makes sense.

· 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.

Titli D avatar image Titli D commented ·

@steven.hamoen Hi Steven, if the frequency of delivering the parts to the buffer for subassembly in average is every 3 min and also the frequency of clearing the sub assembled parts from the buffer is everey 3 min. How to implement this in the above mentioned model.?

0 Likes 0 ·
Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered

@Titli D You have written some errors in your code:

1. you declare portnum but you don't initialize it (it does not get a value)

2. in the last else you use portnum but it has no value so this will never work

3. there are only 2 center connections. 1 to operator 1 and the other one is to the dispatcher so centerObjects[3] points to nothing.

the variable port is passed in and that is the port that the queue is sending the items to. So I guess that your code should look something like this:

if( port == 1)
{
    return current.centerObjects[1];
}
else
{
    return current.centerObjects[2];
}

But this option is also available as the "Multiple Transport Option" and then those "port" as Value and Centerport 2 as default value and Centerport 1 with case 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.

Titli D avatar image
0 Likes"
Titli D answered

@steven.hamoen I am getting an issue. Need your help:

Model: Total 4 parallel stations. Station1, Station2 and Station 3 connected to Queue1. Station 4 connected to Queue2. There are 3 operators: Operator1 is connected to Queue1 and Station1. Operator2 and Operator3 are connected to Dispatcher. And Dispatcher connected to Queue2 and Station 2, Station3, Station4. The scenario in my model is: Operator1 will be fixed to Station1 and Operator2 and Operator3 will flex between Station2, Station3, Station4. In the Queue1 I have written the following logic in "Use Transport" of Queue1:

int portnum;

if( port == 1 ) {

returncurrent.centerObjects[1];

} else if( port == 2 ) {

return current.centerObjects[2];

} else if( port == 3 ) {

return current.centerObjects[3];

}

else {

return current.centerObjects[portnum];

}

But writing this code only the Station 1 is processed by Operator1. And Station2 and Station3 is idle. Station 4 is working by both Op2 and Op3. How should i modify this code so that Op2 and Op3 works on Station2 Station3 and Station4?

5 |100000

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