当前位置:首页 > 行业资料 > 交通运输 > 运筹学实验报告-lingo软件的使用-习题代码
运筹学实验报告姓名:学号:班级:相关问题说明:一、实验性质和教学目的本实验是运筹学课内安排的上机操作实验。目的在于了解、熟悉计算机Lingo软件在运筹学模型求解中的作用,激发学习兴趣,提高学习效果,增强自身的动手能力,提高实际应用能力。二、实验基本要求要求学生:1.实验前认真做好理论准备,仔细阅读实验指导书;2.遵从教师指导,认真完成实验任务,按时按质提交实验报告。三、主要参考资料1.LINGO软件2.LINGO8.0及其在环境系统优化中的应用,天津大学出版社,20053.优化建模与LINDO/LINGO软件,清华大学出版社,20054.运筹学编写组主编,运筹学(修订版),清华大学出版社,19905.蓝伯雄主编,管理数学(下)—运筹学,清华大学出版社,19976.胡运权主编,运筹学习题集(修订版),清华大学出版社,19957.胡运权主编,运筹学教程(第二版),清华大学出版社,2003—1—实验内容1、线性规划问题:0,13119241171289..68max2121212121xxxxxxxxtsxxz(1)给出原始代码;(2)计算结果(包括灵敏度分析,求解结果粘贴);(3)回答下列问题(手写):a)最优解及最优目标函数值是多少;b)资源的对偶价格各为多少,并说明对偶价格的含义;c)为了使目标函数值增加最多,让你选择一个约束条件,将它的常数项增加一个单位,你将选择哪一个约束条件?这时目标函数值将是多少?d)对x2的目标函数系数进行灵敏度分析;e)对第2个约束的约束右端项进行灵敏度分析;f)结合本题的结果解释“ReducedCost”的含义。对偶价格就是说约束方程右端变量增加1对目标函数值的影响答案:(1)代码max=8*x1+6*x2;9*x1+8*x2=12;7*x1+11*x2=24;9*x1+11*x2=13;x1=0;x2=0;(2)计算结果Globaloptimalsolutionfound.Objectivevalue:10.66667Totalsolveriterations:2VariableValueReducedCostX11.3333330.000000X20.0000001.111111RowSlackorSurplusDualPrice110.666671.00000020.0000000.8888889314.666670.00000041.0000000.00000051.3333330.00000060.0000000.000000—2—Rangesinwhichthebasisisunchanged:ObjectiveCoefficientRangesCurrentAllowableAllowableVariableCoefficientIncreaseDecreaseX18.000000INFINITY1.250000X26.0000001.111111INFINITYRighthandSideRangesRowCurrentAllowableAllowableRHSIncreaseDecrease212.000001.00000012.00000324.00000INFINITY14.66667413.00000INFINITY1.00000050.01.333333INFINITY60.00.0INFINITY(3)a)b)c)d)e)f)2、运输问题:已知6个发点8个收点的最小费用运输问题。产销量及单位运价如下表。销地cij产地B1B2B3B4B5B6B7B8产量A16297425955A24553853247A35213748342A47679927152A52365726541A65922814332销量6055514341524338(1)给出原始代码;(2)计算结果(决策变量求解结果粘贴)MinZ=CijXij61iXij=bj(j=1...8)销量约束6181ij—3—81jXij=ai(i=1...6)产量约束Xij≥0(i=1...6;j=1...8)代码:model:!6发点8model:!6发点8收点运输问题;sets:warehouses/wh1..wh6/:capacity;vendors/v1..v8/:demand;links(warehouses,vendors):cost,volume;endsetsmin=@sum(links:cost*volume);!目标函数;@for(vendors(J):@sum(warehouses(I):volume(I,J))=demand(J));!需求约束;@for(warehouses(I):@sum(vendors(J):volume(I,J))=capacity(I));!产量约束;!这里是数据;data:capacity=554742524132;demand=6055514341524338;cost=629742594553853252137483767992712365726559228143;enddataend答案Globaloptimalsolutionfound.Objectivevalue:473.0000Infeasibilities:0.000000Totalsolveriterations:9ModelClass:LPTotalvariables:48Nonlinearvariables:0Integervariables:0—4—Totalconstraints:15Nonlinearconstraints:0Totalnonzeros:144Nonlinearnonzeros:0VariableValueReducedCostCAPACITY(WH1)55.000000.000000CAPACITY(WH2)47.000000.000000CAPACITY(WH3)42.000000.000000CAPACITY(WH4)52.000000.000000CAPACITY(WH5)41.000000.000000CAPACITY(WH6)32.000000.000000DEMAND(V1)60.000000.000000DEMAND(V2)55.000000.000000DEMAND(V3)51.000000.000000DEMAND(V4)43.000000.000000DEMAND(V5)41.000000.000000DEMAND(V6)52.000000.000000DEMAND(V7)43.000000.000000DEMAND(V8)38.000000.000000COST(WH1,V1)6.0000000.000000COST(WH1,V2)2.0000000.000000COST(WH1,V3)9.0000000.000000COST(WH1,V4)7.0000000.000000COST(WH1,V5)4.0000000.000000COST(WH1,V6)2.0000000.000000COST(WH1,V7)5.0000000.000000COST(WH1,V8)9.0000000.000000COST(WH2,V1)4.0000000.000000COST(WH2,V2)5.0000000.000000COST(WH2,V3)5.0000000.000000COST(WH2,V4)3.0000000.000000COST(WH2,V5)8.0000000.000000COST(WH2,V6)5.0000000.000000COST(WH2,V7)3.0000000.000000COST(WH2,V8)2.0000000.000000COST(WH3,V1)5.0000000.000000COST(WH3,V2)2.0000000.000000COST(WH3,V3)1.0000000.000000COST(WH3,V4)3.0000000.000000COST(WH3,V5)7.0000000.000000COST(WH3,V6)4.0000000.000000COST(WH3,V7)8.0000000.000000—5—COST(WH3,V8)3.0000000.000000COST(WH4,V1)7.0000000.000000COST(WH4,V2)6.0000000.000000COST(WH4,V3)7.0000000.000000COST(WH4,V4)9.0000000.000000COST(WH4,V5)9.0000000.000000COST(WH4,V6)2.0000000.000000COST(WH4,V7)7.0000000.000000COST(WH4,V8)1.0000000.000000COST(WH5,V1)2.0000000.000000COST(WH5,V2)3.0000000.000000COST(WH5,V3)6.0000000.000000COST(WH5,V4)5.0000000.000000COST(WH5,V5)7.0000000.000000COST(WH5,V6)2.0000000.000000COST(WH5,V7)6.0000000.000000COST(WH5,V8)5.0000000.000000COST(WH6,V1)5.0000000.000000COST(WH6,V2)9.0000000.000000COST(WH6,V3)2.0000000.000000COST(WH6,V4)2.0000000.000000COST(WH6,V5)8.0000000.000000COST(WH6,V6)1.0000000.000000COST(WH6,V7)4.0000000.000000COST(WH6,V8)3.0000000.000000VOLUME(WH1,V1)0.0000004.000000VOLUME(WH1,V2)55.000000.000000VOLUME(WH1,V3)0.0000007.000000VOLUME(WH1,V4)0.0000005.000000VOLUME(WH1,V5)0.0000002.000000VOLUME(WH1,V6)0.0000000.000000VOLUME(WH1,V7)0.0000003.000000VOLUME(WH1,V8)0.0000008.000000VOLUME(WH2,V1)0.0000001.000000VOLUME(WH2,V2)0.0000002.000000VOLUME(WH2,V3)0.0000002.000000VOLUME(WH2,V4)43.000000.000000VOLUME(WH2,V5)0.0000005.000000VOLUME(WH2,V6)0.0000002.000000VOLUME(WH2,V7)4.0000000.000000VOLUME(WH2,V8)0.0000000.000000VOLUME(WH3,V1)0.0000004.000000VOLUME(WH3,V2)0.0000001.000000VOLUME(WH3,V3)42.000000.000000VOLUME(WH3,V4)0.0000002.000000—6—VOLUME(WH3,V5)0.0000006.000000VOLUME(WH3,V6)0.0000003.000000VOLUME(WH3,V7)0.0000007.000000VOLUME(WH3,V8)0.0000003.000000VOLUME(WH4,V1)0.0000005.000000VOLUME(WH4,V2)0.0000004.000000VOLUME(WH4,V3)0.0000005.000000VOLUME(WH4,V4)0.0000007.000000VOLUME(WH4,V5)0.00
本文标题:运筹学实验报告-lingo软件的使用-习题代码
链接地址:https://www.777doc.com/doc-5370485 .html