Solve the shortest path problem with dynamic programming
软件应用简介

This code was designed for solving the shortest path problem with dynamic programming approach. It can run on large-scale problem as your required. Firstly, user must write the window.m file as this stagecoach problem. example.
cost=[4 11 7 0 0 0 0 0 0 0
0 0 0 9 6 0 12 0 0 0
0 0 0 0 2 2 5 0 0 0
0 0 0 8 9 0 5 0 0 0
0 0 0 0 0 0 0 3 4 0
0 0 0 0 0 0 0 2 0 0
0 0 0 0 0 0 0 5 4 0
0 0 0 0 0 0 0 7 8 0
0 0 0 0 0 0 0 0 0 12
0 0 0 0 0 0 0 0 0 13];
[m,n]=size(cost);
[optpath,totalcost ] = dynamic_programming_shortestpath(cost,n )
界面展示

结果示意

规格 价
0元试用 |
---|
0.0元人民币/月 |
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!