资源简介
物流配送路线规划系统,采用网页的形式操作,后台采用不同算法求解。
代码片段和文件信息
package com.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.*;
public class Plan extends HttpServlet
{
private int n;
private int[] x;
private int[] bestx;
private float bestc;
private float cc;
private float [][]a;
private ArrayList bestList;
private float speed;
private final int SIZE=20;
private final float MAX_SPEED=30;
private ArrayList time;
int [][][] p = new int[SIZE][SIZE][SIZE];
float[][] D = new float[SIZE][SIZE];
private Connection con;
private Statement stmt=null;
private ResultSet rs;
protected void processRequest(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException
{
response.setContentType(“text/html;charset=GB2312“);
request.setCharacterEncoding(“GB2312“);
PrintWriter out = response.getWriter();
bestList = new ArrayList();
time = new ArrayList();
Random ram = new Random();
speed = ram.nextFloat()*50+10;
String JDriver=“com.microsoft.sqlserver.jdbc.SQLServerDriver“;
String connectDB=“jdbc:sqlserver://127.0.0.1:1433;DatabaseName=LogisticsService“;
try
{
Class.forName(JDriver);
}
catch(ClassNotFoundException e)
{
out.println(e);
}
try
{
String user=“sa“;
String password=“123“;
con=DriverManager.getConnection(connectDBuserpassword);
stmt=con.createStatement();
}
catch(SQLException e)
{
out.println(e);
}
int[] che =new int[SIZE];
for(int i=0;i {
che[i]=SIZE;
}
String strategystorech;
store=request.getParameter(“store“);
strategy=request.getParameter(“strategy“);
int count=2;
for(int i=0;i {
ch=(String)request.getParameter(“ch“+i);
if(ch!=null&&(!ch.equals(store)))
{
che[count]=Integer.parseInt(ch);
count++;
}
}
che[1]=Integer.parseInt(store);
n=count-1;
x=new int[n+1];
bestx = new int[n+1];
bestc = Float.MAX_VALUE;
cc=0;
a = new float[n+1][n+1];
for(int i=1;i<=n;i++)
x[i]=i;
if(strategy.equals(“1“))//当选择路程最短时
{
try
{
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
{
rs=stmt.executeQuery(“select shortest from Shortest Wh
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
.CA.... 4374 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\BestLine.jsp
.CA.... 136804 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\bg.jpg
.CA.... 2251 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\checkRegister.jsp
.CA.... 3367 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\checkUser.jsp
.CA.... 177857 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\ind.jpg
.CA.... 2334 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\index.jsp
.CA.... 97 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\me
.CA.... 25 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\me
.CA.... 5403 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\register.jsp
.CA.... 4166 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\Route.class
.CA.... 4146 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\SelectLine.jsp
.CA.... 0 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\classes\.netbeans_automatic_build
.CA.... 0 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\classes\.netbeans_update_resources
.CA.... 9627 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\classes\com\servlet\Plan.class
.CA.... 5876 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\classes\com\servlet\PlanFilter.class
.CA.... 287022 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\lib\msba
.CA.... 67115 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\lib\mssqlserver.jar
.CA.... 59074 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\lib\msutil.jar
.CA.... 584207 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\lib\sqljdbc4.jar
.CA.... 904 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\build\web\WEB-INF\web.xm
.CA.... 3513 2013-06-25 21:51 物流配送路线规划系统\LogisticsService\build.xm
.CA.... 1357234 2013-06-30 13:11 物流配送路线规划系统\LogisticsService\dist\LogisticsService.war
.CA.... 2598 2013-06-25 19:21 物流配送路线规划系统\LogisticsService\nbproject\ant-deploy.xm
.CA.... 80725 2013-06-25 21:51 物流配送路线规划系统\LogisticsService\nbproject\build-impl.xm
.CA.... 473 2013-06-25 21:51 物流配送路线规划系统\LogisticsService\nbproject\genfiles.properties
.CA.... 577 2013-06-25 19:21 物流配送路线规划系统\LogisticsService\nbproject\private\private.properties
.CA.... 230 2013-06-30 03:16 物流配送路线规划系统\LogisticsService\nbproject\private\private.xm
.CA.... 3934 2013-06-25 21:51 物流配送路线规划系统\LogisticsService\nbproject\project.properties
.CA.... 1495 2013-06-25 21:51 物流配送路线规划系统\LogisticsService\nbproject\project.xm
.CA.... 25 2013-06-25 19:21 物流配送路线规划系统\LogisticsService\src\conf\MANIFEST.MF
............此处省略51个文件信息
相关资源
- 物流配送车辆调度问题的模型和算法
- EECS应用概率论_Probability in Electrical
- 百度定位和路线规划Demo
- 完整项目开发文档--物流配送最优路径
- 物流配送管理软件说明书
- 百度地图定位并检索出周围的兴趣点
- 数据结构课程设计 带权无向图及景区
- 物流配送系统
- 物流配送管理系统源码系统相关
- 物流配送管理系统源码
- 物流配送中心管理系统设计思路
- 物流配送中心选址模型及其算法分析
- 小程序实现map搜索/定位/检索/天气/路
- 用混合遗传算法求解物流配送路径优
- 城市物流配送中的三维装箱算法
- 一种基于蚁群算法的物流配送VRP解决
- 用混合遗传算法求解物流配送路径:
- 物流配送中心选址的多目标优化模型
- 物流配送遗传算法
- 物流配送管理系统开题报告
- 物流配送系统概要设计文档
- MapReduce求解物流配送单源最短路径研
- 微信小程序实现地图搜索/定位/检索
- 百度地图api绘制路线规划
- JS高德地图模拟驾车路线规划绘制代码
- Road Map 产品规划路线
- 基于遗传算法的物流配送路径优化算
- 数据库课程设计《火车出行路线规划
评论
共有 条评论