Académique Documents
Professionnel Documents
Culture Documents
Problem : A company has two factories with a limited capacity and four depots with
a maximum throughtput capacity. It sells its products to six customers with minimum
requirements. The customers have some preferences to be supplied from a depot or a
factory. What would the distribution pattern from factories to depots and customer be,
if the overall cost are to be minimized? Is it possible to meet the customers preferences?
Model : The problem is from [2]. For a problem description see Chapter 13.19.
The complete model code in LPL for this model is as follows (see [1]):
1
1,1,1,1,1,1];
--preferred depot of a customer
PrefDtoC{d,c} := [1,0,1,1,1,1,
1,1,1,1,0,1,
1,1,1,1,1,0,
1,1,1,1,1,0];
variable
FactoryDepotQty,FD{f,d|FactoryDepotCost};
FactoryCustQty,FC{f,c|FactoryCustCost};
DepotCustQty,DC{d,c|DepotCustCost};
constraint
FactoryCapa{f}: sum{d} FD + sum{c} FC <= FactoryCap;
DepotCapa{d}: sum{f} FD <= DepotCap;
DepotBalance{d}: sum{c} DC = sum{f} FD;
CustRequirement{c}: sum{f} FC + sum{d} DC = CustomerReq;
minimize cost: sum{f,d} FactoryDepotCost*FD
+ sum{f,c}FactoryCustCost*FC + sum{d,c}DepotCustCost*DC;
Writep(cost,FD,FC,DC);
minimize Pref: sum{f,c}PrefFtoC*FC + sum{d,c}PrefDtoC*DC;
Writep(cost,FD,FC,DC);
end
References
[1] T. Hrlimann. Reference Manual for the LPL Modelling Language, most recent ver-
sion. www.virtual-optima.com.
[2] H.P. Williams. Model Building in Mathematical Programming. John Wiley, Fifth
Edition, 2013.