Sunteți pe pagina 1din 2

Distribution II (will19a)

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 Model is as follows:The problem is from [2]. For a problem description see
1
Chapter 13.19. This model is exactly the same as model will19 :

Listing 1: The Complete Model in LPL [1]


 
model Will19a " D i s t r i b u t i o n I I " ;
set
F " f a c t o r i e s " := [Liverpool Brighton];
D " depots " := [Newcastle Birmingham London Exeter];
C " c u s t o m e r s " := [c1 c2 c3 c4 c5 c6];
parameter −− d i s t r i b u t i o n c o s t s
FactCap{F} " f a c t o r y c a p a c i t y " := [150,200];
DepCap{D} "max . depot throughput " := [70,50,100,40];
CustReq{C} " customer r e q u i r e m e n t s " := [50,10,40,35,60,20];
CostFtoD{F,D} := [0.5,0.5,1,0.2,
0,0.3,0.5,0.2];
CostFtoC{F,C} := [1,0,1.5,2,0,1,
2,0,0 ,0,0,0];
CostDtoC{D,C} := [0,1.5,0.5,1.5,0,1,
1,0.5,0.5,1,0.5,0,
0,1.5,2,0,0.5,1.5,
0,0,0.2,1.5,0.5,1.5];
PrefFtoC{F,C} := [0,1,1,1,1,1,
1,1,1,1,1,1];
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
FtoD{F,D|CostFtoD} " q u a n t i t y from f a c t o r t o depot " ;
FtoC{F,C|CostFtoC} " q u a n t i t y from f a c t o r y t o c o s t o m e r " ;
DtoC{D,C|CostDtoC} " q u a n t i t y from depot t o customer " ;
constraint
FCAP{F}: sum{D} FtoD +sum{C} FtoC <= FactCap;
DCAP{D}: sum{F} FtoD <= DepCap;
DCONT{D}: sum{C} DtoC = sum{F} FtoD;
CREQ{C}: sum{F} FtoC +sum{D} DtoC = CustReq;
minimize Cost: sum{F,D} CostFtoD*FtoD
+sum{F,C} CostFtoC*FtoC + sum{D,C} CostDtoC*DtoC;
Write(’−−model1 : m i n i m i z i n g t h e c o s t s \n ' ) ;
Writep(Cost,FtoD,FtoC,DtoC);
minimize Pref: sum{F,C} PrefFtoC*FtoC +sum{D,C} PrefDtoC*DtoC;
Write(’−−model2 : meet c u s t o m e r s p r e f e r e n c e s \n ' ) ;
Writep(Pref,FtoD,FtoC,DtoC);
Write(’%7.2f\n’, sum {F,D}CostFtoD*FtoD+ sum {F,C}CostFtoC*FtoC
+ sum {D,C}CostDtoC*DtoC);
end
 
1 http://lpl.virtual-optima.com/lpl/Solver.jsp?name=/will19

1
References
[1] T. Hürlimann. Reference Manual for the LPL Modelling Language, most recent ver-

sion. lpl.virtual-optima.com/lpl/doc/manual.pdf.

[2] H.P. Williams. Model Building in Mathematical Programming. John Wiley, Fifth

Edition, 2013.

S-ar putea să vă placă și