question

Solidworksan avatar image
0 Likes"
Solidworksan asked Ryan Clark commented

Deceleration before reaching AGV destination

Hi I want to construct a model where the AGV decelerates its speed to 1 -> 0.4 m/s before it gets to the path.

But I don't have a good idea, can you give me a model or example you can recommend?


There is a model I want to apply below. I made it as a networknode. Should I make it an AGV path?

FlexSim 19.0.0
agvflexsim 19.0.0agvpathnetworknodes
· 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.

Solidworksan avatar image Solidworksan commented ·

As I continued to study, an idea came to mind. But to envision this, we need the real-time coordinates of the AGV and the destination coordinates, how do we extract them?

1629084452307.png

BSN_Rver.1.fsm



0 Likes 0 ·
1629084452307.png (112.6 KiB)
bsn-rver1.fsm (85.0 KiB)
Solidworksan avatar image Solidworksan commented ·

1629085656365.png


I think I can get the spatial value, but how do I do this?

0 Likes 0 ·
1629085656365.png (275.4 KiB)
Ryan Clark avatar image Ryan Clark commented ·

Hi @solidworksan, was Felix Möhlmann's answer helpful? If so, please click the red "Accept" button at the bottom of 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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

When using a travel network you could use triggers on the network nodes to set the maximum speed of the task executer depending on what direction it came from/where it is going.

In the OnArrival trigger you can access the "toedge" and "fromedge" variable which relate to the rank of the respective path the transporter came from or is travelling to.

1629096613554.png

set_speed_on_NN.fsm


If you want to pursue your idea further:

"Object.location" and "Object.getLocation()" are the commands to determine the position of an object in the model. In your screenshot, you are trying to get the location of the transporter library object (which doesn't have one as it's not an actual object in the model). Use

Model.find("<Name of the transporter>")

to reference to the actual task executer.

To know what object the transporter is travelling to next, you can use this code

Object GoalObject = nullvar;
treenode TS = getvarnode(Model.find("Transporter2"), "activetasksequence");

if(TS.subnodes.length > 0)
{
    // There is an active task sequence
    TaskSequence.Task CurTask;
    for(int index = 1; index <= TS.subnodes[1].subnodes.length; index++)  
    {
        CurTask = TS.subnodes[1].subnodes[index];
        if(CurTask.state > 2 || CurTask.type != TASKTYPE_TRAVEL)
        {
            // Task is already finished or not a travel task
            continue;
        }
        GoalObject = CurTask.involved1;
        break;
    }
}

This will assign the object that the task executer is travelling to next (if there is one) to the variable "GoalObject".


1629096613554.png (17.7 KiB)
set-speed-on-nn.fsm (72.6 KiB)
5 |100000

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