intersection problem

intersection problem

tsuji_ryusuke
Advocate Advocate
148 Views
7 Replies
Message 1 of 8

intersection problem

tsuji_ryusuke
Advocate
Advocate

[ FlexSim 23.0.11 ]

Hi,

Please check the attached file.

This is part of the data.

This model was created on 2023.0.8.

I have checked Create Transfer at Crossing in AGV Network Properties, but no intersection is created.

2023092701.png

I know that intersection points can be created by recreating the path on 2023.0.11, but there are many and it is difficult. (This is part of the data, there is actually more path information)


Is there a way to create an intersection other than recreating the path?

Thanks in advance.

intersection problem.fsm

0 Likes
Accepted solutions (1)
149 Views
7 Replies
Replies (7)
Message 2 of 8

nilP8GEZ
Advocate
Advocate
Accepted solution

Thank you for your question.


I’m not exactly sure why, but if you select all the paths with issues and set the Z location to 0,retype 0 and hit enter, everything should work.


I hope this helps!

0 Likes
Message 3 of 8

jason_lightfoot_adsk
Autodesk
Autodesk

This because some of the paths have non-zero z values which you can see if you change the displayed decimal precision:

1695816936733.png

Also, we don't need to worry about the time to delete and recreate all paths. You can add two global tables "StraightPaths" and "CurvedPaths" and run this script:

Table.query("SELECT Name, Class, Container, StartLocation, EndLocation, PathClass, IsTwoWay, AccumulationType, AGVOrientation FROM Objects() WHERE Class='AGV::StraightPath'").cloneTo(Table("StraightPaths"));
Table.query("SELECT Name, Class, Container, Location, StartAngle,SweepAngle, Radius, PathClass, IsTwoWay, AccumulationType, AGVOrientation FROM Objects() WHERE Class='AGV::CurvedPath'").cloneTo(Table("CurvedPaths"));
Array paths=Table.query("SELECT ARRAY_AGG(Object) FROM Objects() WHERE Class='AGV::StraightPath' OR Class='AGV::CurvedPath'")[1][1];
while (paths.length)
    paths.pop().destroy();
Table.query("INSERT INTO Objects() (Name, Class, Container, StartLocation, EndLocation, PathClass, IsTwoWay, AccumulationType, AGVOrientation)  SELECT Name, Class, Container, StartLocation, EndLocation, PathClass, IsTwoWay, AccumulationType, AGVOrientation  FROM StraightPaths");
Table.query("INSERT INTO Objects() (Name, Class, Container, Location, StartAngle,SweepAngle, Radius, PathClass, IsTwoWay, AccumulationType, AGVOrientation) SELECT Name, Class, Container, Location, StartAngle,SweepAngle, Radius, PathClass, IsTwoWay, AccumulationType, AGVOrientation FROM CurvedPaths");
Message 4 of 8

tsuji_ryusuke
Advocate
Advocate

Thank you for answering.

By the way, when I ran the script, the value was added to the global table, but the actual path value did not change, so the intersection was not displayed.


Am I doing something wrong?

0 Likes
Message 5 of 8

jason_lightfoot_adsk
Autodesk
Autodesk
The paths are reproduced exactly - so what do you mean by path value not changing? If the originals has the wrong z value - so will the recreated/new paths.
0 Likes
Message 6 of 8

tsuji_ryusuke
Advocate
Advocate

I thought that running this script would fix the incorrect z value (become z = 0), but am I wrong?

0 Likes
Message 7 of 8

jason_lightfoot_adsk
Autodesk
Autodesk

In your question you mentioned that it was a lot of work to recreate all the paths, so I posted this script to show that it's really very quick.

It's not intended to fix the problem but could if, once you have the tables, you change the z part of the locations to zero before the insert statements. That can be done altering the table values between reading them and reinserting them into Objects() but you could also do the same thing in FlexScript to alter the path properties. Both are good exercises if you're not familiar with either.


0 Likes
Message 8 of 8

tsuji_ryusuke
Advocate
Advocate

I understand how to use scripts.

Thank you for the information.

0 Likes