当前位置:网站首页>数学建模2004B题(输电问题)
数学建模2004B题(输电问题)
2022-07-06 08:49:00 【亦是远方】
一、lingo代码
model:
sets:
mach /1..8/: v;
time /1..10/ ;
mt(mach, time): a, x, n, p;
endsets
data:
a =
70, 0, 50, 0, 0, 30, 0, 0, 0, 40,
30, 0, 20, 8, 15, 6, 2, 0, 0, 8,
110, 0, 40, 0, 30, 0, 20, 40, 0, 40,
55, 5, 10, 10, 10, 10, 15, 0, 0, 1,
75, 5, 15, 0, 15, 15, 0, 10, 10, 10,
95, 0, 10, 20, 0, 15, 10, 20, 0, 10,
50, 15, 5, 15, 10, 10, 5, 10, 3, 2,
70, 0, 20, 0, 20, 0, 20, 10, 15, 5;
p =
-505, 0, 124, 168, 210, 252, 312, 330, 363, 489,
-560, 0, 182, 203, 245, 300, 320, 360, 410, 495,
-610, 0, 152, 189, 233, 258, 308, 356, 415, 500,
-500, 150, 170, 200, 255, 302, 325, 380, 435, 800,
-590, 0, 116, 146, 188, 215, 250, 310, 396, 510,
-607, 0, 159, 173, 205, 252, 305, 380, 405, 520,
-500, 120, 180, 251, 260, 306, 315, 335, 348, 548,
-800, 153, 183, 233, 253, 283, 303, 318, 400, 800;
v = 2.2, 1, 3.2, 1.3, 1.8, 2, 1.4, 1.8;
enddata
! xi1 是定值;
@for(mt(i,j): x(i, 1) = a(i,1));
@for(mt(i,j): x(i, 2) = a(i,2));
@for(mt(i,j)|j#ge#2 #and# j#le#9: x(i, j+1) <= x(i,j)+15*v(i));
@for(mt(i,j)|j#ge#2 #and# j#le#9: x(i, j+1) >= x(i,j)-15*v(i));
! 和为982.4;
@sum(mt(i, j): x(i,j)) = 982.4;
! xij <= aij;
@for(mt(i, j) : x(i, j) <= a(i, j));
! xij >= 0;
@for(mt(i, j) : x(i, j) >= 0);
! 如果xij = 0,nij = 0,否则 nij = 1;
@for(mt(i, j) : n(i, j) = @if(x(i, j)#eq#0, 0, 1));
@for(mt : @bin(n));
! 目标;
c = @max(mt(i, j) : p(i, j)*n(i, j));
min = c;
end
二、实验结果

三、注意
lingo默认求解局部最优解,需要按如下操作进行设置求解全局最优解

边栏推荐
- Roguelike game into crack the hardest hit areas, how to break the bureau?
- The problem and possible causes of the robot's instantaneous return to the origin of the world coordinate during rviz simulation
- 软件压力测试常见流程有哪些?专业出具软件测试报告公司分享
- 优秀的软件测试人员,都具备这些能力
- JS inheritance method
- poi追加写EXCEL文件
- Philosophical enlightenment from single point to distributed
- SAP ui5 date type sap ui. model. type. Analysis of the parsing format of date
- Trying to use is on a network resource that is unavailable
- Leetcode: Sword finger offer 42 Maximum sum of continuous subarrays
猜你喜欢

Guangzhou will promote the construction of a child friendly city, and will explore the establishment of a safe area 200 meters around the school

visdom可视化实现与检查介绍

ROS compilation calls the third-party dynamic library (xxx.so)

Using C language to complete a simple calculator (function pointer array and callback function)

JS inheritance method

Generator parameters incoming parameters

Variable length parameter

广州推进儿童友好城市建设,将探索学校周边200米设安全区域

SAP ui5 date type sap ui. model. type. Analysis of the parsing format of date

C语言深度解剖——C语言关键字
随机推荐
Sublime text using ctrl+b to run another program without closing other runs
How to effectively conduct automated testing?
Roguelike game into crack the hardest hit areas, how to break the bureau?
Cesium draw points, lines, and faces
sublime text中conda环境中plt.show无法弹出显示图片的问题
项目连接数据库遇到的问题及解决
力扣每日一题(二)
使用latex导出IEEE文献格式
[embedded] print log using JLINK RTT
@Jsonbackreference and @jsonmanagedreference (solve infinite recursion caused by bidirectional references in objects)
poi追加写EXCEL文件
LeetCode:剑指 Offer 42. 连续子数组的最大和
【ROS】usb_ Cam camera calibration
Current situation and trend of character animation
软件压力测试常见流程有哪些?专业出具软件测试报告公司分享
LeetCode:214. 最短回文串
Hutool gracefully parses URL links and obtains parameters
LeetCode:394. 字符串解码
To effectively improve the quality of software products, find a third-party software evaluation organization
What are the common processes of software stress testing? Professional software test reports issued by companies to share