matlab解决多旅游商问题,多旅行商问题的matlab程序
%多旅行商问题的matlab程序
function varargout = mtspf_ga(xy,dmat,salesmen,min_tour,pop_size,num_iter,show_prog,show_res)
% MTSPF_GA Fixed Multiple Traveling Salesmen Problem (M-TSP) Genetic Algorithm (GA)
% Finds a (near) optimal solution to a variation of the M-TSP by setting
% up a GA to search for the shortest route (least distance needed for
% each salesman to travel from the start location to individual cities
% and back to the original starting place)
%
% Summary:
% 1. Each salesman starts at the first point, and ends at the first
% point, but travels to a unique set of cities in between
% 2. Except for the first, each city is visited by exactly one salesman
%
% Note: The Fixed Start/End location is taken to be the first XY point
%
% Input:
% XY (float) is an Nx2 matrix of city locations, where N is the number of cities
% DMAT (float) is an NxN matrix of city-to-city distances or costs
% SALESMEN (scalar integer) is the number of salesmen to visit the cities
% MIN_TOUR (scalar integer) is the minimum tour length for any of the
% salesmen, NOT including the start/end point
% POP_SIZE (scalar integer) is the size of the population (should be divisi ble by 8)
% NUM_ITER (scalar integer) is the number of desired iterations for the algorithm to run
% SHOW_PROG (scalar logical) shows the GA progress if true
% SHOW_RES (scalar logical) shows the GA results if true
%
% Output:
% OPT_RTE (integer array) is the best route found by the algorithm
% OPT_BRK (integer array) is the list of route break points (these specify the indices
% into the route used to obtain the individual salesman routes)
% MIN_DIST (scalar float) is the total distance traveled by the salesmen
%
% Route/Breakpoint Details:
% If there are 10 cities and 3 salesmen, a possible route/break
% combination might be: rte = [5 6 9 4 2 8 10 3 7], brks = [3 7]
% Taken together, these represent the solution [1 5 6 9 1][1 4 2 8 1][1 10 3 7 1],
% which designates the routes for the 3 salesmen as follows:
% . Salesman 1 travels from city 1 to 5 to 6 to 9 and back to 1
% . Salesman 2 travels from city 1 to 4 to 2 to 8 and back to 1
% . Salesman 3 travels from city 1 to 10 to 3 to 7 and back to 1
%
% 2D Example:
% n = 35;
matlab解决多旅游商问题,多旅行商问题的matlab程序相关推荐
- matlab解决加速运动,推程余弦加速回程正弦加速运动MATLAB程序
disp '*****偏执移动从动件盘形凸轮设计*****' disp '已知条件:' disp '凸轮作逆时针方向转动,从动件偏置在凸轮轴心的右边' disp '从动件在推程作等加速' rb=40; ...
- 弹簧压缩 时间 matlab,用matlab解决弹簧振子摆动与时间的关系
用matlab解决弹簧振子摆动与时间的关系 用 matlab 解决弹簧振子摆动与时间的关系 学 院:光电信息 班 级:应用物理(111160102) 姓 名:王梅 学 号:11116010224201 ...
- 【路径规划-TSP问题】基于粒子群结合蚁群算法求解旅行商问题附matlab代码
1 内容介绍 一种基于粒子群优化的蚁群算法求解TSP问题的方法.该方法在求解TSP问题时,利用粒子群优化的思想,对蚁群算法的参数取值进行优化并选择.在粒子群算法中,将蚁群算法的5个参数(q,α,β,ρ ...
- matlab生产计划问题,用MATLAB解决综合生产计划编制过程中的优化问题
第 18卷第 3期 2005年 6月 常 州 工 学 院 学 报 Journal of Changzhou Institute of Technology Vol. 18 No. 3 Jun. 200 ...
- matlab入门之旅,MATLAB 入门之旅学习笔记
MATLAB 入门之旅学习笔记 https://matlabacademy.mathworks.com/R2019a/cn/portal.html?course=gettingstarted 1.概述 ...
- 下载支持包时出现问题。要解决此问题,请参阅相应的 MATLAB Answer
下载支持包时出现问题.要解决此问题,请参阅相应的 MATLAB Answer 我在下载GUIDE to App Designer Migration Tool for MATLAB支持包是出现这个问题 ...
- matlab多种分配方案_基于Matlab解决m个人n项任务的最优分派
龙源期刊网 http://www.qikan.com.cn 基于 Matlab 解决 m 个人 \n 项任务的最优分 派 作者:史 历 来源:<商场现代化> 2010 年第 03 期 [ ...
- matlab二维势阱简谐振动程序,常规解法与MATLAB解决一维无限深势阱中的粒子问题...
龙源期刊网 http://www.doczj.com/doc/ddcba3222d60ddccda38376baf1ffc4ffe47e2cd.html 常规解法与MATLAB解决一维无限深势阱中的粒 ...
- 利用Matlab 解决二维矩阵问题
写在前面 Matlab是一款非常强大的数学计算工具,学习并使用它进行处理一些数据运算,将会非常之高效. 今天有同学问我了一道关于利用Matlab 解决二维矩阵问题,利用空闲时间给他解答,希望能帮助到他 ...
最新文章
- 身限辞退风波,Google AI 掌门人 Jeff Dean 不误折桂 IEEE 冯诺依曼奖
- lLinux网络相关命令,防火墙介绍及相关命令
- 【C++ 语言】面向对象 ( 模板编程 | 函数模板 | 类模板 )
- Android 获取 AudioRecord 麦克风音量大小并做选择性发送
- GDB调试基础操作详解【GDB调试】
- 自平衡二叉树(Self-balancing binary search tree)
- freemarker 生成java_半自动化Java代码生成器[利用freemarker模板生成]
- 华为大数据中心山西_任正非:华为愿与山西一道建立“煤矿人工智能创新实验室”...
- 计算机快捷键下档健,电脑文档快捷键
- #控制台大学课堂点名问题_草率了!大学课堂点名新招数来袭,逃课的一个也没有躲过...
- 【转】Swig 使用指南
- 【渝粤教育】国家开放大学2018年春季 0314-21T兽医基础 参考试题
- POJ2104 K-TH NUMBER 传说中的主席树
- 双屏鼠标经常跑到副屏_双屏游戏本什么体验?上手ROG冰刃双屏:效率直接拉满...
- 本科毕设研究记录(一)————小样本综述
- 【基础数学】Jensen不等式
- python-一些文件相关的操作
- 工程职业伦理(2018年秋)学堂在线习题
- 【深度学习小知识】ROI到ROI pooling 再到ROI Align
- iOS打开沙盒html,ios 开发中,沙盒目录解释
热门文章
- Specification排序orderby
- java关于异常的面试程序题_java异常相关面试题
- easyui下拉选项多怎么解决_头屑多、头皮痒到底该怎么办?这4个方法帮你解决...
- Docker网络详解——原理篇
- java确定一个整数是否溢出,java-判断一个整数是不是回文,考虑溢出
- 火狐浏览器设置cookie失败_IE、谷歌Cookie记录失败,火狐成功(IE和Firefox下的Cookie兼容问题)...
- mysql 设置 0、1 用什么数据类型_MySQL索引的基本使用
- oracle增量备份如何恢复,【Oracle】增量备份和全库备份怎么恢复数据库
- php能实现文本复制吗,php 简单复制文件的方法
- 字符串转bigdecimal类型_BigDecimal你会用吗?