[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] 0-ary slice not allowed
From: |
xypron |
Subject: |
[Bug-glpk] 0-ary slice not allowed |
Date: |
Wed, 26 Nov 2008 11:44:02 -0800 (PST) |
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] 0-ary slice not allowed,
xypron <=