[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,


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


View this message in context: 
Sent from the Gnu - GLPK - Bugs mailing list archive at Nabble.com.

reply via email to

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