question

YANG W2 avatar image
0 Likes"
YANG W2 asked Ben Wilson commented

How to let multiple AGV load maximum capacity?

The scenario happens when I have multiple AGVs, my AGV has a capacity of 4, my input comes every 4 item with 69.82s, thus it assign 4 AGV to load each item, but what I want is one AGV to load 4 items.

AGV_SIMULATION_OS PACKING.fsm

FlexSim 18.1.2
flexsim 18.1.2agv loadmaximum capacity
· 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 @YANG W2, was jason.lightfoot's or jason.lightfoot's answer helpful? If so, please click the red "Accept" button on one of their answers. 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 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

The better option is to correctly employ the AGV Process Flow - which is done by not using the dispatcher for transport but instead using the option Push Item to List (no task sequence) which will put it on a list called AGVWork.

This is as per the Description in the AGV Process flow template which you should read in full.


Your model attached is updated to use the process flow template.

random-available-test_agv_jl.fsm


5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

That's because the PassTo of the dispatcher is not looking for already allocated work.

Use this code for the PassTo which has a section to look for a matching destination of any AGV:

treenode tasksequence = param(1);
Object current = ownerobject(c);
/**Pass to the object closest to the destination if available*/
/**If the object is on a network, then network travel is calculated; otherwise centroid-to-centroid distance is used.
/**Consider available objects only if none are found, then the tasksequence will be queued up using the
Queue Strategy, and will be sent to the first available.*/
double curmin = GLOBAL_UNREACHABLE;
int minindex = 0;
treenode destination = NULL;
for (int taskrank = 1; taskrank <= gettotalnroftasks(tasksequence) && destination == NULL; taskrank++) {  // this finds the first task in the tasksequence that is a travel task.
    if (gettasktype(tasksequence,taskrank) == TASKTYPE_TRAVEL)
        destination = gettaskinvolved(tasksequence,taskrank,1);
}
if (destination==NULL) // first available if there is no travel task
    return 0;

//Check if there's a matching destination.
for (int index = 1; index <= current.outObjects.length; index++) {
    treenode curobj = current.outObjects[index];
    if (curobj && isclasstype(curobj, CLASSTYPE_TASKEXECUTER)) {
        if (inputopen(curobj)){
            treenode  ts=gettasksequence(curobj,0);    //TaskSequence  ts=gettasksequence(curobj,0);  
            if (objectexists(ts)) {
                int curtask=getcurtask(ts);  
                for (int taskrank = curtask; taskrank <= gettotalnroftasks(tasksequence) ; taskrank++) {  // this finds the first task in the tasksequence that is a travel task.
                    if (gettasktype(tasksequence,taskrank) == TASKTYPE_TRAVEL) {
                        Object taskdest = gettaskinvolved(tasksequence,taskrank,1);
                        if (taskdest==destination)
                            return index;
                    }
                }
            }
        }
    }
}

for (int index = 1; index <= current.outObjects.length; index++) {
    treenode curobj = current.outObjects[index];
    if (curobj && isclasstype(curobj, CLASSTYPE_TASKEXECUTER)) {
        if (ipopen(curobj, opipno(current, index)) && inputopen(curobj)){
            double curdist = distancetotravel(curobj, destination);
            if (curdist != GLOBAL_UNREACHABLE && (curmin == GLOBAL_UNREACHABLE || curmin > curdist)) {
                curmin = curdist;
                minindex = index;
            }
        }
    }
}

return minindex;
· 3
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

I should have added the test so that the agv isn’t allocated more jobs than its capacity... may find time for that tomorrow.

0 Likes 0 ·
YANG W2 avatar image YANG W2 Jason Lightfoot ♦ commented ·

Seems like another problem appear as the AGV wont go back to the Parking Spot even they had nothing to do

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ YANG W2 commented ·

You're blocking the route by having TaskExecuter57 (and others) sat on the network doing nothing. This would be better implemented using the AGV Process flow - I'll post an updated model.

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.