lingo中的多维数组型变量
来源:互联网 发布:js正则表达式验证邮箱 编辑:程序博客网 时间:2024/05/29 17:23
例一:派生集合与多维数组型变量Derived collections with a multidimensional array variable
sets:a/1..100/:;b/1..200/:;C(a,b):x;!derived set;Endsets!Goal and restriction period;
例二
sets:a/1..100/:;b/1..200/:;C(a,b):x;Endsets!Goal and restriction period;@for(b(j):@sum(a(i):x(i,j))>150.001;!集合元素的循环函数
例三
sets:a/1..100/:;b/1..200/:y;C(a,b):x;Endsets!Goal and restriction period;@for(b(j):@gin(y(j)));@for(C(i,j):@bin(x(i,j)));
The logical operator and filter criteria
#and# #or##not##eq# !equal#ne# !not equal#gt# !greater than#ge# !greater than or equal#lt# !less than#le# !less than or equal
**f = @If(x#le#500,4*x,@if(x#lf#1000,500+3*x,1500+2*x)
**
lingo程序的模型文件
lingo model (*.lg4)
lingo model(text only)(*.lng)
lingo data (*.ldt)
lingo command script (*.ltf)
lingo model (*.ltx)
线性规划模型的lingo求解
例一
sets:rows/1..3/:B;columns/1..4/:X;factor(rows,columns):A;endsetsdata:A = 1 2 3 1 2 5 1 2 3 1 6 -2;B = 4 5 7;enddata@for(rows(i):@sum(columns(j):A(i,j)*X(j))>=B(i));
例二
model:title Calls on the transport of rice;!fine the collection period;sets:granary/1..2/:A;grainstation/1..3/:B;transfood(granary,grainstation):x,c;endsetsdata:!distancec = 12 24 8 30 12 24;A = 4 8;B = 2 4 5;enddatamin=@sum(transfood:c*x);!min=@sum(transfood(i,j):c(i,j)*x(i,j));!Upper limit constraint;@for(granary(i):@sum(grainstation(j):x(i,j))<A(i));!lower bound;@for(grainstation(j):@sum(granary(i):x(i,j))>B(j));end
阅读全文
0 0
- lingo中的多维数组型变量
- lingo中的数组
- JAVA中的多维数组
- java中的多维数组
- 多维数组的指针变量
- 多维数组的指针变量
- 多维数组的指针变量
- 多维数组的指针变量
- C++中的动态多维数组
- C++中的动态多维数组
- C语言中的多维数组
- C++中的动态多维数组
- C++中的动态多维数组
- C语言中的多维数组
- C语言中的多维数组
- C\C++中的多维数组
- 指向多维数组的指针变量
- 指向多维数组的指针变量
- tensorflow学习1-mnsit的regression案例
- Cache 的地址映像方式(4种)
- linux安装php扩展
- Android内存查看
- Java线程池
- lingo中的多维数组型变量
- Java--Maven 的类库配置
- 524[Medium] :Longest Word in Dictionary through Deleting
- CUDA 7.5 安装及配置(WIN7 VS2013)
- Tomcat使用Spring管理对象出现HashMap死循环的问题
- 三人行-某栈-两周心得
- echarts实现气泡图(气泡之间不叠加)
- C++利用链表将英文单词排序
- java.util.concurrent中的Callable,Future