Shortest Queue is Missing in V2021?

Shortest Queue is Missing in V2021?

sudharsan_r
Not applicable
159 Views
3 Replies
Message 1 of 4

Shortest Queue is Missing in V2021?

sudharsan_r
Not applicable

[ FlexSim 21.0.1 ]

HI,

I am using the latest version V 2021.20.0.1. In this version, i am working on Process flow model.

I couldn't see the "shortest queue" option in the decide block.36014-1610858977682.png

0 Likes
Accepted solutions (1)
160 Views
3 Replies
Replies (3)
Message 2 of 4

m_rosadini
Advocate
Advocate
Accepted solution

Hi Sudharsan,

that seems to be the case. I am not sure about the reason of it being removed, buy you could open the code editor for the Decide activity:

36033-1610859871177.png

and just paste this code (copied from the shortest queue option on a previous version of FlexSim)

Object current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);
/**Shortest Queue*/
/**Send to the connector corresponding to the activity with the shortest queue.*/
int curmincontent =  1000000000; // this sets the integer to the largest possible value that an integer can hold.
int connector = 1;

for (int index = 1; index <= nrop(activity); index++) {
    treenode tempactivity = outobject(activity, index);
    int activitycontent = getstat(tempactivity, "Content", STAT_CURRENT, current);
    if (activitycontent < curmincontent) {
        curmincontent = activitycontent;
        connector = index;
    }
}

return connector ;
0 Likes
Message 3 of 4

sudharsan_r
Not applicable

Hi @marcello.rosadini,

Thanks for the help. Great.

Cheers,

Sudharsan R

0 Likes
Message 4 of 4

Ben_WilsonADSK
Community Manager
Community Manager

Hi @Sudharsan R, was marcello.rosadini's answer helpful? If so, please click the red "Accept" button at the bottom their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes