下载此文档

最小生成树模型与实验.doc


文档分类:IT计算机 | 页数:约26页 举报非法文档有奖
1/26
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/26 下载此文档
文档列表 文档介绍
最小生成树模型与实验
第六章最小生成树模型与实验
最优化模型与实验
156
第 页
第155页
第六章最小生成树模型与实验
最优化模型与实验
156
第 页
第155页
证:tance of links
on the network to connect all the nodes is the
classic problem called minimal spanning tree (MST);
第六章最小生成树模型与实验
最优化模型与实验
156
第 页
第159页
SETS:
CITY / 1.. 5/: U; ! U( I) = level of city I;
! U( 1) = 0;
LINK( CITY, CITY):
DIST, ! The distance matrix;
X; ! X( I, J) = 1 if we use link I, J;
ENDSETS
DATA: ! Distance matrix need not be symmetric;
! However, city 1 is base of the tree;
!to: A B C D E;
DIST = 0 1 3 4 6 !from A;
1 0 2 3 5 !from B;
3 2 0 1 3 !from C;
第六章最小生成树模型与实验
最优化模型与实验
156
第 页
第159页
4 3 1 0 2 !from D;
6 5 3 2 0;!from E;
ENDDATA
! The model size: Warning, may be slow for N >= 8;
N = ***@SIZE( CITY);
! Minimize total distance of the links;
MIN = ***@SUM( LINK: DIST * X);
! For city K, except the base, ... ;
***@FOR( CITY( K)| K #GT# 1:
! It must be entered;
***@SUM( CITY( I)| I #NE# K: X( I, K)) = 1;
第六章最小生成树模型与实验
最优化模型与实验
156
第 页
第160页
! If there are 2 disjoint tours from 1 city to
another, we can remove a link without breaking
connections. Note: These are not very powerful
for large problems;
***@FOR( CITY( J)| J #GT# 1 #AND# J #NE# K:
U( J) >= U( K) + X ( K, J) -
( N - 2) * ( 1 - X( K, J)) +
( N - 3) * X( J, K); );
);
! There must be an arc out of city 1;
***@SUM( CITY( J)| J #GT# 1: X( 1, J)) >= 1;
! Make the X's 0/1;
***@FOR( LINK: ***@BIN( X); );
第六章最小生成树模型与实验
最优化模型与实验
156
第 页
第161页
! The level of a city except the base is at least
1 but no more than N-1, and is 1 if it links to
the base;
***@FOR( CITY( K)| K #GT# 1:
***@BND( 1, U( K), 99

最小生成树模型与实验 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数26
  • 收藏数0 收藏
  • 顶次数0
  • 上传人艾米
  • 文件大小4.10 MB
  • 时间2022-04-08
最近更新