When I take Dispatcher Pass to function 'First Available Unless Preempting then Minimize Custom Value' , It is showing some coding error.
When I take Dispatcher Pass to function 'First Available Unless Preempting then Minimize Custom Value' , It is showing some coding error.
Dear Vishak,
Try the following code in the code edit field. There were some extra open braces at findmatch() function and findmin() function
Needed to be added for fixing in the next release.
treenode tasksequence = param(1); Object current = ownerobject(c); /***popup:PassToPreempt*/ /***tag:description*//**First Available Unless Preempting then Minimize Custom Value*/ /** If there are no objects currently available, then queue the tasksequence up using the Queue Strategy and wait until someone connected to its output ports becomes available. If the tasksequence is preempting, then find the best taskexecuter to pass the task sequence to.*/ if (!getpreempt(tasksequence)) return 0; treenode te; int availablePort = findmatch(current.outObjects.length, !objectexists(gettasksequence(te = current.outObjects[count], 0)) && inputopen(te)); if (availablePort) return availablePort; int travelTaskNum = findmatch(content(tasksequence), gettasktype(tasksequence, count) == TASKTYPE_TRAVEL); treenode travelDest = current; if (travelTaskNum > 0) travelDest = gettaskinvolved(tasksequence, travelTaskNum, 1); int bestPort = /**Min/Max: *//***tag:value*//**/findmin/**list:findmin~findmax*/(current.outObjects.length, /**Priority: *//***tag:expression*//**/distancetotravel(current.outObjects[count], travelDest)/**/, count, inputopen(current.outObjects[count])); return bestPort;
Regards,
Arun KR
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved