Information Technology Reference
In-Depth Information
In this example, asked question (minimize transportation and production costs) has been
implemented also as a model of the MIP. The question parameters tables for the above
problem and the relationships between these tables have been presented in Table 6a, Table
6b and Fig. 7.
The full MIP model as a CLP predicate, generated based on the discussed information layer in
the form of a text file accepted by the ECLIPSE - CLP package is shown in Fig.8a and Fig.8b.
:- module(dane_l_p).
:- lib(fd).
:- lib(fd_global).
:- lib(edge_finder3).
:- lib(branch_and_bound).
:- export
dane/8
.
dane(Z,C,W,X,Xt,Yt,Y,Razem):-
Z = [4, 3, 2, 2, 3, 4],
C = [180, 200, 190 ],
W = [12, 10, 10],
A = [30, 20, 90, 40, 80, 60],
G = [30, 20, 40, 70, 50, 60, 90, 40, 50, 30, 40, 40],
X = [ [X11, X12], [X21, X22], [X31, X32] ],
Xt =[ [X11, X21, X31], [X12, X22, X32] ],
Y = [ [Y11, Y12, Y13, Y14, Y15, Y16], [Y21, Y22, Y23, Y24, Y25, Y26] ],
Yt =[[Y11,Y21],[Y12,Y22],[Y13,Y23],[Y14,Y24],[Y15, Y25],[Y16,Y26] ],
flatten(Y,Ypo),
flatten(X,Xpo),
(foreach(X1,X),
foreach(W1,W) do
(foreach(X11,X1), param(W1) do
X11 #>= 0,
X11 #<= W1 ) ),
(foreach(Y1,Yt),
foreach(Z1,Z) do
(foreach(Y11,Y1), param(Z1) do
Y11 #>= 0,
Y11 #<= Z1 ) ),
(foreach(X1,Xpo),
foreach(A1,A),
foreach(Sx1,Sum_x) do
Sx1 #=X1 * A1 ),
sumlist(Sum_x,Razem1),
(foreach(Y1,Ypo),
foreach(G1,G),
foreach(Sy1,Sum_y) do
Sy1 #=Y1 * G1 ),
sumlist(Sum_y,Razem2),
(foreach(Xk1,X),
foreach(C1,C),
foreach(Sk1,Sum_k) do
sumlist(Xk1,Raz_s),
Sk1 #=Raz_s * C1 ),
sumlist(Sum_k,Razem3),
Razem #= Razem1+Razem2+Razem3
.
Fig. 8.a. The MIP model (input data) for the multi-stage transportation problem-
automatically generated (Eclipse-CLP).
Search WWH ::




Custom Search