[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Operand following / has invalid type

From: yamifag
Subject: [Help-glpk] Operand following / has invalid type
Date: Wed, 09 Sep 2020 18:17:21 -0300
User-agent: Roundcube Webmail/1.3.10


I'm trying to make a program that populates a binary matrix keeping as many blank lines as possible, e.g.


instead of


Since I know the sum of the lines won't be too big I decided to use an approach based on division, but I'm getting a "operand following / has invalid type" error.

/* binary matrix */
var m{x in X, y in Y} binary;
/* minimizes total (sum of line)^-1, a full line is better than two half-full lines*/
minimize maxEmpty: sum{x in X} 1/(1 + sum{y in Y} m[x,y]);

I made a few tests and some constraints, I'm pretty sure it's not a problem with the sets, the matrix, or a typo. If I had to guess I'd say the error is being caused by the nested sums, but I couldn't find much on that.

Can this be fixed in any way?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]