我要用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))...
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. 展开
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. 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询