[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] 0-ary slice not allowed
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] 0-ary slice not allowed |
Date: |
Wed, 26 Nov 2008 23:51:12 +0300 |
>> 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.
>
> No, I do not think so. In the strong mathematical sense a composite
> index must have at least one free dummy variable; otherwise corresponding
> aggregate operator like sum has no meaning. Besides, AMPL also does not
> allow that.
Just for clarity.
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.