[Bug-glpk] 0-ary slice not allowed

2008-11-26 Thread xypron
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

Re: [Bug-glpk] 0-ary slice not allowed

2008-11-26 Thread Andrew Makhorin
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

Re: [Bug-glpk] 0-ary slice not allowed

2008-11-26 Thread Andrew Makhorin
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

Re: [Bug-glpk] 0-ary slice not allowed

2008-11-26 Thread glpk xypron
Do you agree that the following notation is meaningless? sum{(2,3) in E} c[i,j] * x[i,j] This is exactly the same as your example: the composite index has no free dummy variables. Hello Andrew: My understanding of common indices is that they are a shorthand for unnecessary equality

Re: [Bug-glpk] 0-ary slice not allowed

2008-11-26 Thread xypron
Hello Andrew, Just for clarity. Do you agree that the following notation is meaningless? sum{(2,3) in E} c[i,j] * x[i,j] The following model is correctly solved by GLPK: set E := {(2,3)}; var v{(i,j) in E}; s.t. con1 {(i,j) in E} : v[i,j] - sum{(2,k) in E : k == j} 1 = 0; var w{(i,j) in

Re: [Bug-glpk] 0-ary slice not allowed

2008-11-26 Thread Andrew Makhorin
Just for clarity. Do you agree that the following notation is meaningless? sum{(2,3) in E} c[i,j] * x[i,j] The following model is correctly solved by GLPK: set E := {(2,3)}; var v{(i,j) in E}; s.t. con1 {(i,j) in E} : v[i,j] - sum{(2,k) in E : k == j} 1 = 0; var w{(i,j) in E}; s.t.