Hello,

I am struggling with the following and would appreciate any assistance:

I am constructing a model in an attempt to solve a location-allocation
problem with multiple facilities (warehouses and plants) and multiple
products.  I have prepared a feasible set of warehouse sites and
identified the costs associated with deliveries to customers and
deliveries from plants.

Some relevant statements --

param qty{(customer, product) in demand};

var whsales{warehouse in warehouses, (customer, product) in demand};

var whbin{warehouse in warehouses}, binary;


The following constraint is error free (not that I am sure of its
relevance):

-- customer demand balancing

s.t. qty_cu{(customer, product) in demand}: sum{warehouse in warehouses}
whsales[warehouse, customer, product] = qty[customer, product];


I do not know how to construct the constraint including the binary
variable.

-- warehouse delivery balancing

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.

I have been trying many options and have become very confused.

I have been referring to the Facilities Design chapter (Chapter 2) of
"Production and Inventory Management" by Arnaldo C Hax and Dan Candea
(Prentice-Hall 1984) for assistance with the lp formulation (spcifically
for this instance p.24).

Regards, Alex 
_________ 
Alex Morelli 

[email protected]

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to