Cancel
Showing results for 
Search instead for 
Did you mean: 

Coding Dijkstra's Algorithm

Pioneer
Pioneer

Hi, I am trying to code Dijkstra's algorithm, using a method, to allow MUs to go on the shortest line. I want to set the "weight" of the line as the length, and repeat this for every line. How could I do this? I also want to use arrays, but I can't find any resources for SimTalk that have this. Are there any resources for learning SimTalk other than what's in Manufacturing Simulation with Plant Simulation and SimTalk? 

10 REPLIES

Re: Coding Dijkstra's Algorithm

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

If you use Transporters and Tracks/TwoLaneTracks you can use the built-in algorithm (yes, Dijkstra's algorithm). By just setting a destination for the Transporter, the software will calculate the shortest (weighted) path.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Coding Dijkstra's Algorithm

Phenom
Phenom

I think you will find here :

 

http://ww3.cad.de/foren/ubb/Forum262/HTML/000112.shtml#000007

 

what you are looking for

Re: Coding Dijkstra's Algorithm

Pioneer
Pioneer

Does this work for lines as well? Or only tracks and transporters?

Re: Coding Dijkstra's Algorithm

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Only for Tracks and Transporters. So, if you can use it for your specific projects depends on what you want to model. There are some cases where both approaches could work.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Coding Dijkstra's Algorithm

Phenom
Phenom

Referring to the modelled Dijkstra algorithms (see /read  link)

 

These could be adapted to work with lines as well

Re: Coding Dijkstra's Algorithm

Phenom
Phenom

@smf,

 

refering to the modelled dijkstra algorithms (see /read  link)

 

If you have a look at the code. This could be adapted to work with other objects (e.g.lines) as well.

Re: Coding Dijkstra's Algorithm

Pioneer
Pioneer
I've looked on the website but I can't find the code; could you post a direct link on here to the code? Thanks!

Re: Coding Dijkstra's Algorithm

Phenom
Phenom

look here, the *.spp.jpg have to renamed to *.spp

 

Unbenannt.PNG

Re: Coding Dijkstra's Algorithm

Pioneer
Pioneer

I still am unable to open it. How do I open the spp file and not the spp.jpg?