question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Patrick Cloutier commented

How to dynamically create control points as needed

I want to model a storage system with a million possible locations. Task Executers travel on rails to deliver and pickup items from these locations. I think I should use AGV logic for this.

I don't want to have to draw 1 million control points but I can easily draw the paths. There are not that many paths. Maybe about 50. But on each path there are thousands of possible places where the TE can stop.

Here is what I think should be a good method:

  • I can create an Excel sheet with all the coordinates XYZ of the locations.
  • Whenever a TE needs to go to a location, I create a CP (control point) at the desired XYZ location and send the TE there.
  • Then delete the CP.

I tried creating CP in a Process Flow with Create Object but I have these problems:

  • The CP is created because I see it in the tree. But I don't see it in the 3D view.
  • The CP is not on a path even if I place it at the right xyz location. So I can't direct my AGV to it.

See attached model.Create CP.fsm

Is it possible to do what I'm describing here?

Thanks,

FlexSim 20.0.3
agvflexsim 20.0.3control point
create-cp.fsm (32.7 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Perhaps you abandon your idea and use instead the AStar module, wherein you let travel the taskexecuter by travel to loc tasks absolutley or relatively. You can build aisles by barriers or use preferred paths to limit the free movement in the grid.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier Joerg Vogel commented ·

I thought about that but there will be 20 to 40 TE in the network. Some are "transporters" others are "pickers/placers" so they will transfer boxes from one type of TE to another. I thought this might be easier to do with AGV than A* but maybe I'm wrong.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier Joerg Vogel commented ·

The more I think about it, you might be right that A* would be better. But do you think its possible to use A* and have elevators that carry TEs between 3 different levels? Probably 3 A* grids?

0 Likes 0 ·

1 Answer

Patrick Zweekhorst avatar image
2 Likes"
Patrick Zweekhorst answered Patrick Cloutier commented

Hi @Patrick Cloutier,

We also wanted to create control point dynamically last year. If you use the finilizespatial changes function_s command you will be able to see the control point, and it will be on a path. That all seems to work, but it does not. We got the following answer on that post:

"Don't create control points programmatically while your model is running. The AGV Navigator does not expect you to do this.

You are going to have all kinds of unexpected behavior if you are trying to programmatically change the network during the middle of the model run.

If you need a control point there, make it before you start your model run. Don't try to add and remove control points while your model is running.

The AGV Module is conservative when it comes to arrival and pre-arrival events. It only creates those events for a given traveler at a given control point if it needs them. For example, if you have a waypoint or a listener. At the time that you built the travel task through the control point, it didn't have any listeners so it didn't schedule the events for the control point. By adding the debug wait for events before dispatching the travel task, the control point had a listener when the route through it was calculated so it scheduled the pre-arrival event. That's why it worked when you added the debug wait for event.

If you want to wait for an event on a control point, you have to wait for that event before it gets scheduled, otherwise it won't even create that event when it is calculating the agv's route."


I don't know if it possible for you to place all the control point before the simulation starts?
If not it might be possible to place some control points on the path and use the new AGV functionality that is added in 20.1. In 20.1 you are able to travel x meters past a control point on the path, or stop y meters before the control point. Using those BodyOffsets helps you to stop at any point before or after a control point.







· 10
5 |100000

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

Patrick Cloutier avatar image Patrick Cloutier commented ·

I haven't installed 20.1 yet. I will try that option.

If it doesn't work do you think it's practical to create 1 million control points? I mean, will the model be heavy and slow?

0 Likes 0 ·
Braydn T avatar image Braydn T Patrick Cloutier commented ·

@Patrick Cloutier I am not the most qualified to answer this, but I do not think it would be very fast. FlexSim runs Djikstra's shortest path algorithm to check which path it should take. I am not sure if it runs the algorithm it before the model run or during mode run. Patrick's answer makes me think that it is before. If it is during model run, that will quickly be too much.If it is not, 1 million items in a model is already quite a bit. I think Jorg's solution will work better in the long run.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier commented ·

Patrick, I've looked everywhere in 20.1 and I can't find anything about BodyOffsets.

Can you tell me where I will find this?

Thanks,

0 Likes 0 ·
Patrick Zweekhorst avatar image Patrick Zweekhorst Patrick Cloutier commented ·

I found it in the user manual when searching BodyOffset, it is in the AGV part on the manual.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier Patrick Zweekhorst commented ·

Yes I see it in the manual. It should be accessed through a new activity called "AGV Travel" but I can't find it in the library. I will ask FlexSim.

0 Likes 0 ·
Show more comments