我要用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’spredefinedfunctionsgenerallyexpectaspecificnumberofarguments.You’llgetthismessageifyouarepassinganincorrectnumberofarguments.Checkthesyntaxofthefunctioninquestion.