文件名称:TSP_SOLUTION
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 40kb
- 下载次数:
- 0次
- 提 供 者:
- tangg******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
TSP问题是一个组合优化问题,具有NPC计算复杂性。这是我上学期间考虑的所谓的双人竞技算法,Java代码,利用Jsp页面进行显示,用Servlet进行逻辑处理,思路如下:
首先,选定一个城市作为共同的出发地,同时生成两个同步的过程A和B,开始进行城市访问。
其次,约定过程A和过程B在前进过程中,过程A每到达一个城市,必须等待过程B到达另外一个城市,而后开始寻找并访问下一个未被任何过程访问过的城市。
第三,为了简化初始求解方法,过程A和过程B在寻找城市的过程中均以“距离自己最近的为被访问过的城市”为选择城市的原则,过程A选择城市优先于过程B。在进行城市访问的过程中记录走过的路径和累计路程。
第四,如果过程A或过程B已无法找到下一步将要访问的城市,即所有的城市已经全部被访问标记,过程A和过程B终结,将过程A的路径和过程B的路径尾部相连(过程A的正序和过程B的逆序组合)就可以得到一条完整的城市访问径路。
第五,遍历N个城市分别作为过程A和B的出发地。当完整遍历结束,共计可以获得N条初始的径路。-TSP problem, NPC complexion, this is my solution Named as "TPC".
首先,选定一个城市作为共同的出发地,同时生成两个同步的过程A和B,开始进行城市访问。
其次,约定过程A和过程B在前进过程中,过程A每到达一个城市,必须等待过程B到达另外一个城市,而后开始寻找并访问下一个未被任何过程访问过的城市。
第三,为了简化初始求解方法,过程A和过程B在寻找城市的过程中均以“距离自己最近的为被访问过的城市”为选择城市的原则,过程A选择城市优先于过程B。在进行城市访问的过程中记录走过的路径和累计路程。
第四,如果过程A或过程B已无法找到下一步将要访问的城市,即所有的城市已经全部被访问标记,过程A和过程B终结,将过程A的路径和过程B的路径尾部相连(过程A的正序和过程B的逆序组合)就可以得到一条完整的城市访问径路。
第五,遍历N个城市分别作为过程A和B的出发地。当完整遍历结束,共计可以获得N条初始的径路。-TSP problem, NPC complexion, this is my solution Named as "TPC".
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tsp75.txt
TSP程序\.beabuild.txt
.......\.workshop\dijtsp\classes\.projectBuildVersionInfo
.......\.........\output\dijtsp\WEB-INF\classes\bjtu\DisMatrix.class
.......\.........\......\......\.......\.......\....\FindNext.class
.......\.........\......\......\.......\.......\....\GenImage.class
.......\.........\......\......\.......\.......\....\MyComparator.class
.......\.........\......\......\.......\.......\....\Optimize4.class
.......\.........\......\......\.......\.......\....\Optimize5.class
.......\.........\......\......\.......\.......\....\ReadFile.class
.......\.........\......\......\.......\.......\....\Routes.class
.......\.........\......\......\.......\.......\....\TspMaim.class
.......\.........\......\......\.......\.......\jsp_servlet\__error.class
.......\.........\......\......\.......\.......\...........\__index.class
.......\.........\......\TangGuofang\WEB-INF\classes\tangguofang\DisMatrix.class
.......\.........\......\...........\.......\.......\...........\ReadFile.class
.......\.........\......\...........\.......\.......\...........\tsp.class
.......\.........\TangGuofang\classes\.projectBuildVersionInfo
.......\dijtsp\bjtu\DisMatrix.java
.......\......\....\FindNext.java
.......\......\....\GenImage.java
.......\......\....\MyComparator.java
.......\......\....\Optimize4.java
.......\......\....\Optimize5.java
.......\......\....\ReadFile.java
.......\......\....\Routes.java
.......\......\....\TspMaim.java
.......\......\error.jsp
.......\......\index.jsp
.......\......\WEB-INF\web.xml
.......\......\.......\weblogic.xml
.......\......\.......\wlw-config.xml
.......\META-INF\.wlwLock
.......\........\application.xml
.......\........\weblogic-application.xml
.......\........\wli-process.xml
.......\........\wlw-manifest.xml
.......\TSP.work
tsp.txt
tsp30.txt
tsp50.txt
TSP程序\.workshop\output\dijtsp\WEB-INF\classes\bjtu
.......\.........\......\......\.......\.......\jsp_servlet
.......\.........\......\TangGuofang\WEB-INF\classes\tangguofang
.......\.........\......\dijtsp\WEB-INF\classes
.......\.........\......\TangGuofang\WEB-INF\classes
.......\.........\.ide\dijtsp\compilerCache
.......\.........\output\dijtsp\WEB-INF
.......\.........\......\TangGuofang\WEB-INF
.......\.........\.ide\dijtsp
.......\.........\dijtsp\classes
.......\.........\output\dijtsp
.......\.........\......\TangGuofang
.......\.........\TangGuofang\classes
.......\dijtsp\resources\css
.......\......\.........\images
.......\......\.........\jsp
.......\......\WEB-INF\.pageflow-struts-generated
.......\......\.......\classes
.......\......\.......\lib
.......\......\.......\src
.......\.workshop\.ide
.......\.........\dijtsp
.......\.........\output
.......\.........\TangGuofang
.......\APP-INF\lib
.......\dijtsp\bjtu
.......\......\resources
.......\......\WEB-INF
.......\.workshop
.......\APP-INF
.......\dijtsp
.......\META-INF
TSP程序
TSP程序\.beabuild.txt
.......\.workshop\dijtsp\classes\.projectBuildVersionInfo
.......\.........\output\dijtsp\WEB-INF\classes\bjtu\DisMatrix.class
.......\.........\......\......\.......\.......\....\FindNext.class
.......\.........\......\......\.......\.......\....\GenImage.class
.......\.........\......\......\.......\.......\....\MyComparator.class
.......\.........\......\......\.......\.......\....\Optimize4.class
.......\.........\......\......\.......\.......\....\Optimize5.class
.......\.........\......\......\.......\.......\....\ReadFile.class
.......\.........\......\......\.......\.......\....\Routes.class
.......\.........\......\......\.......\.......\....\TspMaim.class
.......\.........\......\......\.......\.......\jsp_servlet\__error.class
.......\.........\......\......\.......\.......\...........\__index.class
.......\.........\......\TangGuofang\WEB-INF\classes\tangguofang\DisMatrix.class
.......\.........\......\...........\.......\.......\...........\ReadFile.class
.......\.........\......\...........\.......\.......\...........\tsp.class
.......\.........\TangGuofang\classes\.projectBuildVersionInfo
.......\dijtsp\bjtu\DisMatrix.java
.......\......\....\FindNext.java
.......\......\....\GenImage.java
.......\......\....\MyComparator.java
.......\......\....\Optimize4.java
.......\......\....\Optimize5.java
.......\......\....\ReadFile.java
.......\......\....\Routes.java
.......\......\....\TspMaim.java
.......\......\error.jsp
.......\......\index.jsp
.......\......\WEB-INF\web.xml
.......\......\.......\weblogic.xml
.......\......\.......\wlw-config.xml
.......\META-INF\.wlwLock
.......\........\application.xml
.......\........\weblogic-application.xml
.......\........\wli-process.xml
.......\........\wlw-manifest.xml
.......\TSP.work
tsp.txt
tsp30.txt
tsp50.txt
TSP程序\.workshop\output\dijtsp\WEB-INF\classes\bjtu
.......\.........\......\......\.......\.......\jsp_servlet
.......\.........\......\TangGuofang\WEB-INF\classes\tangguofang
.......\.........\......\dijtsp\WEB-INF\classes
.......\.........\......\TangGuofang\WEB-INF\classes
.......\.........\.ide\dijtsp\compilerCache
.......\.........\output\dijtsp\WEB-INF
.......\.........\......\TangGuofang\WEB-INF
.......\.........\.ide\dijtsp
.......\.........\dijtsp\classes
.......\.........\output\dijtsp
.......\.........\......\TangGuofang
.......\.........\TangGuofang\classes
.......\dijtsp\resources\css
.......\......\.........\images
.......\......\.........\jsp
.......\......\WEB-INF\.pageflow-struts-generated
.......\......\.......\classes
.......\......\.......\lib
.......\......\.......\src
.......\.workshop\.ide
.......\.........\dijtsp
.......\.........\output
.......\.........\TangGuofang
.......\APP-INF\lib
.......\dijtsp\bjtu
.......\......\resources
.......\......\WEB-INF
.......\.workshop
.......\APP-INF
.......\dijtsp
.......\META-INF
TSP程序