help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Constraint Construction


From: Andrew Makhorin
Subject: Re: [Help-glpk] Constraint Construction
Date: Wed, 03 Aug 2011 16:43:34 +0400

> s.t. qty_wh{(customer, product) in demand}: sum{customer in customers}
> whsales[warehouse, customer, product] <= whbin[warehouse] *
> sum{customer in customers} qty[customer, product];
> 
> 
> This construction delivers the error "0-ary slice not allowed" - which
> i do not understand and could find no reference in "Modeling Language
> GNU MathProg, Language Reference", nor much that I could understand
> via internet search (which only gave be bug-glpk results).  I can see
> that the warehouse is not part of any domain following the <= sign,
> and have tried other options with no success.
> 

You cannot use 'customer' as a dummy index within 'sum{customer in
customers}', because it is already used as a dummy index in outer
context 'qty_wh{(customer, product) in demand}:', that is, you need to
choose another identifier. In the context 'sum{customer in customers}'
'customer' is considered as a given value, not dummy index, that leads
to 0-ary slice, i.e. the slice having no dummy indices, which is not
allowed. (Here "slice" means a n-tuple, whose components are either
dummy indices or some assigned values.)




reply via email to

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