当前位置:网站首页>数学建模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默认求解局部最优解,需要按如下操作进行设置求解全局最优解

边栏推荐
- LeetCode:41. 缺失的第一个正数
- Unsupported operation exception
- [MySQL] limit implements paging
- Niuke winter vacation training 6 maze 2
- JVM quick start
- Fairguard game reinforcement: under the upsurge of game going to sea, game security is facing new challenges
- JS pure function
- Chrome浏览器的crash问题
- 【嵌入式】使用JLINK RTT打印log
- MongoDB 的安装和基本操作
猜你喜欢

被破解毁掉的国产游戏之光

Light of domestic games destroyed by cracking

marathon-envs项目环境配置(强化学习模仿参考动作)
![[embedded] cortex m4f DSP Library](/img/83/ab421d5cc18e907056ec2bdaeb7d5c.png)
[embedded] cortex m4f DSP Library

UML图记忆技巧

Swagger setting field required is mandatory

目标检测——Pytorch 利用mobilenet系列(v1,v2,v3)搭建yolov4目标检测平台

C language double pointer -- classic question type

TP-LINK 企业路由器 PPTP 配置

The harm of game unpacking and the importance of resource encryption
随机推荐
How to conduct interface test? What are the precautions? Nanny level interpretation
Process of obtaining the electronic version of academic qualifications of xuexin.com
Sublime text using ctrl+b to run another program without closing other runs
Double pointeur en langage C - - modèle classique
Revit secondary development Hof method calls transaction
Navicat Premium 创建MySql 创建存储过程
软件卸载时遇到trying to use is on a network resource that is unavailable
Philosophical enlightenment from single point to distributed
Niuke winter vacation training 6 maze 2
LeetCode:41. 缺失的第一个正数
JS inheritance method
[MySQL] limit implements paging
Delay initialization and sealing classes
MYSQL卸载方法与安装方法
opencv+dlib实现给蒙娜丽莎“配”眼镜
egg. JS project deployment online server
Cesium draw points, lines, and faces
个人电脑好用必备软件(使用过)
LeetCode:剑指 Offer 04. 二维数组中的查找
LeetCode:劍指 Offer 42. 連續子數組的最大和