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);