超速行车问题的数学模型解决方案内容摘要:
G=(mgraph *)malloc(sizeof(mgraph))。 cout欢迎进入公路交通网查询系统 .endl。 createmgraph(G)。 while(xz!=0) { cout*******求城市之间最短路径 *******endl。 cout================================endl。 cout请选择: 1 查询 0 结束 endl。 cout================================endl。 cinxz。 12 coutendl。 if(xz) { floyd(G)。 cout城市名称及编号如下 endl。 cout 1 2 3 4 5 endl。 cout 6 7 8 9 10 endl。 cout 11 12 13 14 15 endl。 cout 16 17 18 19 20 endl。 cout 21 22 23 24 25 endl。 cout 26 27 28 29 30 endl。 cout 31 32 33 34 35 endl。 cout 36 37 38 39 40 endl。 cout 41 42 43 44 45 endl。 cout 46 47 48 49 50 endl。 cout 51 52 53 54 55 endl。 cout 56 57 58 59 60endl。 cout 61 62 63 64 65endl。 cout 66 67 68 69 70 endl。 cout 71 72 73 74 75 endl。 cout 76 77 78 79 80endl。 cout 81 82 83 84 85endl。 cout 86 87 88 89 90endl。 cout 91 92 93 94 95 endl。 cout 96 97 98 99 100endl。 cout请输入源点和终点 : endl。 cinvw。 k=p[v][w]。 //k 为起点 i的后继顶点 if(k==0) cout无路径。 endl。 else { cout所求最短路径为: endl。 coutv。 while(k!=w) { coutk。 k=p[k][w]。 } coutw。 cout路径长度为: d[v][w]公里 endl。 } coutendl。 13 } else cout谢谢使用,祝您旅途愉快。 endl。 } } 花费最少路线 include include include //输入输出流 include define mvnum 1000//最大定点数 define maxint 9999999 typedef char vertextype。 typedef int adjmatrix。 struct mgraph { vertextype vexs[mvnum]。 //顶点数组,假定为 char 型 adjmatrix arcs[mvnum][mvnum]。 //临街矩阵,假定为 int 型 }。 double d[mvnum][mvnum],p[mvnum][mvnum]。 //////////// void createmgraph(mgraph *G) {//采用邻接矩阵表示法构造无向图 G int i,j,k,w。 ifstream graphlist(,ios::in)。 //定义一个流对象,并且和文件关联 for(i=1。 i=100。 i++) Gvexs[i]=(char)i。 for(i=1。 i=100。 i++) for(j=1。 j=100。 j++) Garcs[i][j]=maxint。 //初始化邻接矩阵 for(k=1。 k=180。 k++) {//从磁盘文件接受数据构造网 graphlisti。 graphlistj。 graphlistw。 Garcs[i][j]=w。 Garcs[j][i]=Garcs[i][j]。 //构造无向网 } //cout图的存储结构建立完毕。 endl。 ()。 //关闭文件 14 } /////////////// void floyd(mgraph *G) { int i,j,k。 for(i=1。 i=100。 i++)//设置路径长度 D和路径初值 for(j=1。 j=100。 j++) { if(Garcs[i][j]!=maxint) p[i][j]=j。 else p[i][j]=0。 d[i][j]=Garcs[i][j]。 } for(k=1。 k=100。 k++) { for(i=1。 i=100。 i++) for(j=1。 j=100。 j++) { if (d[i][k]+d[k][j]d[i][j]) { d[i][j]=d[i][k]+d[k][j]。 p[i][j]=p[i][k]。 } } } } //////////// void main() { mgraph *G。 int v,w,k。 int xz=1。 G=(mgraph *)malloc(sizeof(mgraph))。 cout欢迎进入铁路交通网查询系统 .endl。 createmgraph(G)。 while(xz!=0) { cout*******求城市之间花费最少 *******endl。 cout================================endl。 cout请选择: 1 查询 0 结束 endl。 cout================================endl。 cinxz。 15 coutendl。 if(xz) { floyd(G)。 cout城市名称及编号如下 endl。 cout 1 2 3 4 5 endl。 cout 6 7 8 9 10 endl。 cout 11 12 13 14 15 endl。 cout 16 17 18 19 20 endl。 cout 21 22 23 24 25 endl。 cout 26 27 28 29 30 endl。 cout 31 32 33 34 35 endl。 cout 36 37 38 39 40 endl。 cout 41 42 43 44 45 endl。 cout 46 47 48 49 50 endl。 cout 51 52 53 54 55 endl。 cout 56 57 58 59 60endl。 cout 61 62 63 64 65endl。 cout 66 67 68 69 70 endl。 cout 71 72 73 74 75 endl。 cout 76 77 78 79 80endl。 cout 81 82 83 84 85endl。 cout 86 87 88 89 90endl。 cout 91 92 93 94 95 endl。 cout 96 97 98 99 100endl。 cout请输入源点和终点 : endl。 cinvw。 k=p[v][w]。 //k 为起点 i的后继顶点 if(k==0) cout无路径。 endl。 else { cout所求花费最少为: endl。 coutv。 while(k!=w) {。超速行车问题的数学模型解决方案
相关推荐
倒混凝土时产生的荷载 (kN): 经计算得到,活荷载标准值 P1 = (+) = 均布荷载 q = + =集中荷载 P = = 木方计算简图 1 .1 7 60 .0 0 0 木方弯矩图 () 0 .0 0 01 .5 1 3 木方变形图(mm) 木方剪力图 (kN) 经过计算得到从左到右各支座力分别为 N1= N2= 经过计算得到最大弯矩 M= 经过计算得到最大支座 F= 经过计算得到最大变形
平均值为。 其计算过程如下所示。 Sk= ur so= 1= 风荷载 根据《 铁路桥涵设计基本规范 》( ) 风荷载计算公式如 42 所示。 W= K1 K2 K3 WO (42) 式中: W—— 风荷载 强度 ( kN/m2); WO—— 基本风压 ( KN/m2) ,可根据上述规范附录 D“全国基本风压分布图”取; K1—— 风载体形系数,桥墩见上 述规范查表 ,其他构件为 ; K2——
101 B. 11010 C. 001101 D. 0011010 试题解析: CRC 编码的基本思想将位串看成系数 为 0 或 1 的多项式。 一个 n位的帧被看成是 n1 次多项式的系数列表。 最左边是 xn1 项的系数,接着是 xn2项的系数,依此类推 ,直到 X0 项的系数。 此题中的二进制字符串对应的多项式为 X7+X6+X5+ X+1 CRC 计算校验和的算法为: 1. 设
精 密空调 , 厂家提供相应的通讯接口 (RS232 口 )和通信协议 , 应能通过协议转换实现遥控、遥信以及空调参数的监控。 解决方案与监控内容 系统能够通过空调厂家提供的通讯接口 (RS232 或 RS485),并 使用 软件模块 对精密空调进行远程遥控、遥信、参数监测、故障诊断 , 监控空调各部件 (压缩机、风机、加热器、加湿器、去湿器、滤网等 )的运行状态与参数。 第 40 页 共
*************为本厂质量管理体系内审员,具有以下方面的职责和权限: IATF6949:2020 质量管理体系运行维护( 制度流程执行情况稽核); 执行体系审核,过程审核和产品审核。 深圳市德信诚经济咨询有限公司 文件名称 质量手册 生效日期 20170508 文件编号 QM01 页数 15/93 生效版本 04 更多免费 资料下载请进: 好好学习社区 第 4 章 组织环境