question

Sudharsan R avatar image
0 Likes"
Sudharsan R asked Ben Wilson commented

Shortest Queue is Missing in V2021?

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.

FlexSim 21.0.1
processflowflexsim 21.0.1
1610858977682.png (262.0 KiB)
· 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

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

1 Answer

·
Marcello Rosadini avatar image
0 Likes"
Marcello Rosadini answered Sudharsan R commented

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:

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 ;

1610859871177.png (9.6 KiB)
· 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.

Sudharsan R avatar image Sudharsan R commented ·

Hi @marcello.rosadini,

Thanks for the help. Great.

Cheers,

Sudharsan R

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.