用lingo解100*100的线性方程组怎么编程表述出方程组
大神们,100*100的线性方程组。我这里用9*9作为例子sets:r/1..9/:;c/1..9/:;link(r,c):a;time/1..9/:t;dose/1..9/:d;endsetsdata:a=14 14 14 9 6 4 3 9 0 14 14 14 14 9 6 4 1 2 14 14 14 14 14 9 6 1 1 9 14 14 14 14 14 9 1 1 6 9 14 14 14 14 14 2 1 4 6 9 14 14 14 14 3 2 3 4 6 9 14 14 14 4 3 0 0 1 1 1 2 3 14 14 0 1 1 1 2 3 4 14 14;d=500 500 500 500500 500 500 500 500;enddatamin=@sum(link:a*t);@for(dose(J):@sum(r(I):t(J))<=dose(J));@for(time(I):);End
sets:
column/1..9/:c,x;
row/1..9/:d;
link(row,column):a;
!time/1..9/:;
!dose/1..9/:;
endsets
data:
a=14 14 14 9 6 4 3 9 0 14 14 14 14 9 6 4 1 2 14 14 14 14 14 9 6 1 1
9 14 14 14 14 14 9 1 1 6 9 14 14 14 14 14 2 1 4 6 9 14 14 14 14 3 2
3 4 6 9 14 14 14 4 3 0 0 1 1 1 2 3 14 14 0 1 1 1 2 3 4 14 14;
d=500 500 500 500 500 500 500 500 500;
c=1 1 1 1 1 1 1 1 1 ;
enddata
min=@sum(link:a*x);
@for(row(i):@sum( column(j):a(i,j)*x(j) ) < d(i) );
End
页:
[1]