question

Deniz YILMAZ avatar image
0 Likes"
Deniz YILMAZ asked Matt Long edited

how to create 'call morgan' system for t executers that works together

I would like to create a system so that queues can find and call closest or most eligible task executer among 7 task executers to use as transportation device. It is easy for 2 task executer by using conditinal port but I can not find a way to apply it when I am using bigger amount of Task Executers.

int case_val = /** \nCase Function: *//***tag:ValueFunc*//**/distancetotravel(centerobject(current,1),outobject(current,1))>distancetotravel(centerobject(current,3),outobject(current,1))/**/;
double val = 0.0;
/** \nCases:\n*/
switch (case_val) {
/***tagex:data*/
case /**\nCase: *//**/1/**/: val = /** Port: *//**/3/**/;break;/***//**/ /**/
default: val = /**\nDefault Port:*//***tag:default*//**/1/**/;break;
}
if (val == 0) {
transportoutcomplete(current, item, port);
transportincomplete(outobject(current, port), item, opipno(current, port));
moveobject(item, outobject(current, port), port);
return 0;
} else
return centerobject(current, val);
FlexSim 16.0.8
task executer
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

·
Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered Matt Long edited

@Deniz YILMAZ Have you take a look at a dispatcher? That is actually meant to do what you ask and has functionality to find the closest task executer.

5 |100000

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

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.