Hello Andrew,
constraint
s.t. cost {i in N, j in N} :
t[i] - t[j] - sum{(i,j) in E} c[i,j] * x[i,j] >= 0;
leads to error
0-ary slice not allowed
in glpmpl01.c, function expression_list.
My expectation was that the sum is 0 if (i,j) is not an element of E and
c[i,j] x[i,j] otherwise. This would be in conformance with the usual use of
domain parameters.
I must admit that the following is an alternative notation but less elegant:
s.t. cost {i in N, j in N } :
t[i] - t[j] - ( if ((i,j) in E) then c[i,j] * x[i,j] else 0 ) >= 0;
Best regards
Xypron
--
View this message in context:
http://www.nabble.com/0-ary-slice-not-allowed-tp20707760p20707760.html
Sent from the Gnu - GLPK - Bugs mailing list archive at Nabble.com.
_______________________________________________
Bug-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-glpk