question

Ryosuke S avatar image
0 Likes"
Ryosuke S asked Ryosuke S commented

Unable to refresh path link the entire network

I have created AGVPath and Control point using tables and script. However, after creating them, I try the [Refresh Path Links] --> [Entire Network], but each path doesn't seem to merge, or CP recognized on the path. Do I need to explicitly define it in the script?

AutomatePathCPCreate_Basic.fsm

FlexSim 20.1.3
flexsim 20.1.3agvpath
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 Ryosuke S commented

In this model I've added the working createAGVstraightPath user command and the CPs snap to the paths correctly. I've then used refresh paths of this and selected object (not entire network) at the junctions. This should be possible without doing it manually - if I find the solutions I'll update here.

automatepathcpcreate-basic_jl3.fsm


· 5
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 ·

You might also note that the left vertical column is create at -7.94 which is 2cm beyond the horizontal path end of -7.92.

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

This seems to work now - at least querying distance between control points looks okay. I move the creation code to a user function instead of invoking it in process flow.

automatepathcpcreate-basic_jl4.fsm

0 Likes 0 ·
Ryosuke S avatar image Ryosuke S Jason Lightfoot ♦ commented ·

@jason.lightfoot Thank you for your kind support. -7.92 was typo. I'm sorry. I have tried your code. But it seems that merge between the paths are not recognized entirely. Please see image below. I think it needs to be [X] at the path merge. Is there some commands needed for this?

0 Likes 0 ·
capture053.jpg (25.6 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Ryosuke S commented ·

Right - I saw the that they were missing but the cpdistance calculated correctly so check to see if it routes correctly.

0 Likes 0 ·
Show more comments
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jason Lightfoot converted comment to answer

FlexSim is a bit more complicated then you think when you are building a model by source code.

Please look for answers which are dealing with model creation by code. @Phil BoBo has answered on similar question already.

· 2
5 |100000

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

Ryosuke S avatar image Ryosuke S commented ·

@Jörg Vogel Thank you for your reply. Thanks for the link, I have gone through Phils reply. But I'm a bit puzzled because when I run the following code, the controlpoint is recognized to the path. I thought that things have improved in 2020 Update1. I mean there weren't any refresh path link UI back in 2016.

Object path = createinstance(node("?StraightPath",library()),model());
path.location = Vec3(0, 0, 0);
path.size = Vec3(2, 0, 0);
function_s(path, "finalizeSpatialChanges");

Object cp = createinstance(node("?ControlPoint", library()), model());
cp.location = Vec3(1, 0, 0);
function_s(cp, "finalizeSpatialChanges");
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Ryosuke S commented ·

There's a danger when linking to function_s code from 2016 as we've mentioned many times before - there's no guarantee it will work in future versions which is why I keep suggesting that people avoid it, or put the calls in user commands you can call throughout your models but then update in one place when they break.

I'll take a look at this is the context of the user command I sent you for creating paths and come back.

1 Like 1 ·

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.