Information Technology Reference
In-Depth Information
sumlist(X2,X3), X3 #<= K1 * Y2 ) ).
ogr_6(E,Yopr,W):-
(foreach(W1,W), foreach(Y1,Yopr), foreach(E1,E) do
(foreach(E2,E1),foreach(Y2,Y1), foreach(C1,C) do
C1 #= E2 * Y2 ), sumlist(C,C3), C3 #<= W1 ).
s1(L_L1,L_L2):-
flatten(L_L1,L1), flatten(L_L2,L2),
append(L2,L1,L3),
search(L2,0, most_constrained,indomain_split,complete,[]),
search(L1,0, most_constrained,indomain_split,complete,[]).
zapis(X,Y):-
open("w_1.txt",write,Sp_1), flatten(X,X1),
(foreach(X2,X1), param(Sp_1) do write(Sp_1,X2), writeln(Sp_1,' ') ),
writeln(Sp_1,' '), close(Sp_1),
open("w_2.txt",write,Sp_2), flatten(Y,Y1),
(foreach(Y2,Y1), param(Sp_2) do write(Sp_2,Y2), writeln(Sp_2,' ') ),
writeln(Sp_2,' '),
close(Sp_2).
opc:-
dane(Z, D, K, U, W, C, E, X, Y,Xopr,Yopr,Razem),
og_d1(X,D,Z),
og_1(X,Z),
og_2(K,U,Xopr),
og_3(U,Yopr),
ogr_4(Xopr,K,Yopr),
bb_min(s1(Yopr,Xopr),Razem, bb_options with [strategy: step]),
zapis(X,Y).
Fig.5.b. The MIP model (constraints) for the problem of allocation of pallets- automatically
generated (Eclipse-CLP).
Computational experiments were performed using the data from Table 4a. The calculations
are made for three different sets of parameters U, W (examples 1, 2, 3). Results were as
follows: Example1 Cost = 1054, Example2 Cost = 1028, Example3 Cost = 1050. The
differences are caused by changes in the parameters U and W. The values of decision
variables (X, Y) corresponding to the optimal solutions are presented in Table 4b. There is a
solution of Example2 from the practice in this table. This is a feasible solution. What is the
most interesting when comparing the two solutions of Example2, that address the optimal
supply of pallets is possible using a smaller number of courses. This information is
important because of the costs and organization of work in other areas such as on the daily
demand for trucks, drivers, etc.
tra_miast
tra_dosta
tra_sa_tr
tra_samoc
j
Z
j
i
j
i
j
i
j
i
i
l
C
E
l
K
U
W
1
25
1
1
3
1
5
3
7
2
1
1
10
5
Example1
2
10
1
2
3
2
5
4
7
3
1
2
8
5
1
10
10
80
3
15
1
3
3
4
5
5
7
4
2
1
12
6
2
6
10
80
4
10
2
1
4
3
6
1
8
1
2
2
9
6
Examplet2
5
20
2
2
4
4
6
3
8
2
3
1
16
8
1
10
12
80
Search WWH ::




Custom Search