Adding distances between nodes

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
student
Posts: 2
Joined: Tuesday 27 November, 2018 - 14:24

Adding distances between nodes

Post by student »

Hello,

I was trying to rebuild this model (20130408_AdvancedTransporterNetwork.mod) from the following topic viewtopic.php?f=7&t=276&p=1224&hilit=co ... nced#p1224 to find out how to add distances between nodes, however I ran into two problems. When I rebuild the model and place a network controller in the model, It doesn't have the yellow dot above the atom to connect with the initialize atom.

Furthermore, when I add extra distance in the AddDistance table I can see that the total distance changed when I go to atom editor->network controller-> distance table, but the transporter doesn't travel the additional distance. I set the speed of the transporter to 1 m/s and counted the blocks from N1-1 to N1-2 which is 17 meter. It does indeed travel for 17 seconds when I don't add any extra distance in the table, but when I do add an extra 10 meter between the two nodes, the transporter still takes 17 seconds whereas the distance table indicates a distance of 27 meters total. Does anyone know how to fix this?

Thanks in advance.

Kind regards,

Ivo
Attachments
20130408_AdvancedTransporterNetwork.mod
(130.67 KiB) Downloaded 172 times
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Adding distances between nodes

Post by HarryBunnik »

Hello Ivo,

To your first question:

Yes, normally the channels of this atom are hidden. I would say there are several options here. You can replace on the Initialize atom the code:

in(1,c)

with:

AtomByName([Network Controller18], model)

Note: Normally we advise not to use this command because it is relatively slow. Since this is only a single call, the AtomByName won't noticeably slow down your model.

Another way is to go into the AtomEditor, go to the 2D tab and set the option Hide Channels to false.


About your second question:

I see that in the original topic that you refer to is already standing that this is tricky. Can you describe what you exactly try to achieve? Then we can have a look if this is the correct way to go, or that there is perhaps an easier solution.

Regards,

Harry
student
Posts: 2
Joined: Tuesday 27 November, 2018 - 14:24

Re: Adding distances between nodes

Post by student »

Hello,

Thank you for your quick response. I am trying to simulate the routing of the forklifts when they store incoming goods at my internship company to see how long this process takes. I want to simulate the whole routing process by adding real distances between the nodes, without for example having to move the nodes 120 blocks for it to be 120 meter.

Kind regards,

Ivo
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Adding distances between nodes

Post by HarryBunnik »

Hello Ivo,

The point is that what you're currently implementing is only going to reflect on the routing choices that the transporter is taking. So the distances in the table AddDistances are more like penalties that are implemented on a specific route.

In your case also the speed that the transporter is driving must be updated. This can be done on the points in the table. However, that would, of course, mean a lot of extra work and would need adjustments every time a distance needs to be updated.

So I've written a small piece of code that is doing this for you. Based on the distance (combination of the distance between the nodes and the distance as given in the AddDistance table) and the speed of the transporter, the speed of the related points is updated. I've placed this code in a function (Function editor) called "OptimizeNetwork_CompensateSpeed" and I execute this function in the Initialize after that the distance table is updated.

Please have a look at the function and see if it doing what you would expect. However, as also indicated with the other topic, this is very tricky... The Dijkstra algorithm will namely update/change the distance table when numbers are not adding up. And this is quite difficult to find as I just found out...
20130408_AdvancedTransporterNetwork_Update.mod
(136.26 KiB) Downloaded 169 times
I hope however that this helps you further.

Regards,

Harry
Post Reply