> 其他 >
我要用lingo定义一个0-1矩阵,如何定义?要求每行和每列只有一个1,其余都为0
sets:
e/1..11/;
matrix1/e,e/:a;
endsets
@for(matrix1:@bin(a));
@for(e(i):@sum(e(j):a(i,j))>0);
这是我自己定义的一个 但是总是报错,LINGO’s predefined functions generally expect a specific number of arguments.You’ll get this message if you are passing an incorrect number of arguments.Check the syntax of the function in question.
人气:313 ℃ 时间:2020-06-27 05:04:34
解答
sets:
e/1..11/;
matrix1(e,e):a;
endsets
@for(matrix1:@bin(a));
@for(e(i):@sum(e(j):a(i,j))>0);
自己看好派生集怎么定义的
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版