help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Constraint Construction


From: Alex Morelli
Subject: [Help-glpk] Constraint Construction
Date: Wed, 3 Aug 2011 21:41:11 +1000

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


address@hidden



The information included in this email and any attached documents from the Sender may be confidential and/or subject to legal privilege. This information is intended to be for the use of the addressee only. The information contained in this email may not represent the views or opinions of the Sender’s employer. If you are not the intended recipient, note that any disclosure, photocopying, distribution or use of the contents of the emailed information is prohibited. If you have received this email in error, please contact the sender promptly and delete the email from any system and destroy any hard copies. Thank you.

reply via email to

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