Software Tool to Find the Bounds of Objective Functions
Total Page:16
File Type:pdf, Size:1020Kb
Software Tool to Find the Bounds of Objective Functions for a Class of One-Dimensional Bin Packing Problems
Gennady Fedulov I. Vekua Institute of Applied Mathematics, Tbilisi State University 0186, Tbilisi, 2 University str., Georgia [email protected]
Konstantin Babalyan Moscow Institute of Physics and Technology 141700, Moscow Region, Dolgoprudniy, Institute lane, 9, Russia [email protected]
Abstract
We present a software tool solving 22 combinatorial models that are semantically close to a known One-Dimensional Bin Packing Problem. All models have a large number of practical applications in the different areas. The goal is to deliver a comfortable tool to the users to solve their packing problems. Tool gives several important results, whereof main two are the following: the best approximate solution and the best objective function bound, that the tool can produce within a given time limit. Using the bounds we evaluate a quality of approximate solutions as a measure of closeness to the optimal solutions. The tool consists of four parts: User Interface, Solver, Interactive Packing and Intelligent Games (12 games) for children of any age. Currently, the software tool can be accepted on the link http://www.fedulov.ge .
Keywords: bin packing, objective function bound, approximate solution, initial reduction, estimation corridor, software tool
1. Introduction
We present a Software Tool solving 22 combinatorial models that are semantically close to a known One-Dimensional Bin Packing Problem (1DBPP). We called our set of models "One- Dimensional Bin Packing Class". All the models have a large practical application in the different areas: one-dimensional cutting stock, packing the musical files on CDs, packing the files to the different formats, pasting the stamps into the covers, RAM fragmentation, schedule theory, container packing, loading the objects to the knapsacks and others. General description of the class is the following. Given a set of items A {a1 ,a2,⋯an }, each item ak has a weight s(ak ) and a cost c(ak ) , s(ak ) s(ak1 ) . We need to divide the initial set A into M disjoint subsets M A A i j A1, A2 ,⋯ AM with the given properties, where Ai A , i j , . All subsets are i1 independent to each other and order of items within each subset is arbitrary. We assume that initial data contains only non-negative integer numbers. The initial set of weights {s(a1 ), s(a2 ),⋯s(an )} can be presented in a more compact form: W { w1 ° k1 , w2 ° k2 ,⋯wm ° km }, where m w1 w2 ⋯ wm , ki n, m n , wi ° ki is group of equal weights wi , ki is a frequency. i1 Parameter m is a number of different weights and plays an important role in solving a problem to optimality: as a rule, the more is m the more is the total time of finding an optimal solution. In Section 2 we present the One-Dimensional Bin Packing Class. In Section 3 we describe our Solution Approach. In Section 4 we give a description of Software Tool. Our results and conclusions are presented in Sections 5 and 6.
2. One-Dimensional Bin Packing Class
Model 1. Basic model I.
Given a fixed set L {B1, B2 ,⋯BM }, Bi Bi1 , Bi is a a capacity of i th bin, S(L) S(A) , M n where S(L) Bi and S(A) s(ak ) . The task is to pack A into L : Ci Bi , i [1, M ], i1 k1
s(ak ) where Ci S(Ai ) is a content of i th bin. An answer is YES if we can pack A into ak Ai L and NO otherwise.
Model 2. Basic model II.
Given a fixed list of pairs L {(B'1 , B1 ),(B'2 , B2 ),⋯(B'M , BM )} , Bi Bi1 , B'i B'i1 , Bi B'i , the Bi and B'i are a capacity and a quota of i th bin respectively, S(B') S(A) S(B) , where M M S(B) Bi and S(B') B'i . The task is to pack A into L : B'i Ci Bi , i [1, M ]. i1 i1
An answer is YES if we can pack A into L and NO otherwise. If we set all B'i s(an ) then we get Model 1.
Model 3. Classical Bin Packing.
We need to divide A into a minimum number M of disjoint subsets: Ci Bmax , i [1, M ], where Bmax is a bin capacity as a maximum threshold.
Model 4. Bin Covering.
We need to divide A into a maximum number M of disjoint subsets: Ci Bmin , i [1, M ], where Bmin is a bin quota as minimum threshold.
Model 5. Bin Packing & Bin Covering I. We need to divide A into a minimum number M of disjoint subsets:
Bmin Ci Bmax , i [1, M ], where Bmin and Bmax are the lower and upper thresholds, respectively. If we set Bmin s(an ) then we get Model 3.
Model 6. Bin Packing & Bin Covering II. This model is similar to Model 5 but the task is to find a maximum number M of disjoint subsets. If we set Bmax S(A) then we get Model 4.
Model 7. Schedule Theory I.
In this model a number of bins M is fixed. The task is to find a minimal bin size Bmax in order to divide A into M disjoint subsets: Ci Bmax , i [1, M ].
Model 8. Schedule Theory II. Given a list of positive real numbers 1, 2 ⋯ M . The task is to find a minimum positive integer number T in order to pack A into L {B1, B2 ,⋯BM }, where Bi T .
In case of all i 1 we get Model 7.
Model 9. Bin Packing with the decreasing capacities.
Given a sequence of bin capacities B1 , B2 ,⋯Bn , Bi Bi1 , Bn s(a1 ). We need to find a minimal number M in order to pack A into
B {B1 , B2 ,⋯BM }: Ci Bi , i 1,M .
If we set all Bi = Bmax then we get Model 3.
Model 10. Bin Covering with the decreasing quotas.
Given a sequence of bin quotas B1 , B2 ,⋯Bn , Bi Bi1 , Bn s(an ). We need to find a maximal number M in order to pack A into
B {B1 , B2 ,⋯BM }: Ci Bi , i 1,M . If we set all Bi = Bmin then we get Model 4.
Model 11. Bin Packing with a range of bin capacities.
Given a range Bmin , Bmax of bin capacities. The task is to find an optimal bin capacity B : MB min , where M is a result of solving Model 3.
Model 12. Maximal loading of weights.
Given a fixed set B {B1 , B2 ,⋯BM }, Bi Bi1 , Bi is a capacity of i th bin, S(A) S(B) . The
' s(a ) max task is to find a subset A A in order to pack A' into B and a total weight k , ak A'
C'i S(A'i ) s(ak ) Bi where A' {A'1 , A'2 ,⋯ A'M }, , i [1, M ], ak A'i
C'i is a content of subset A'i .
Model 13. Maximal loading of costs.
This model is similar to Model 12. Given a fixed set B {B1 , B2 ,⋯BM } ,
Bi Bi1 , Bi is a capacity of i th bin, S(A) S(B) . The task is to find a subset A' A in COST (A') c(a ) max order to pack A' into B and a total cost k , where ak A'
A' {A'1 , A'2 ,⋯ A'M }, C'i S(A'i ) Bi , i 1,M .
Model 14. Minimal covering of weigths.
Given a fixed set B {B1 , B2 ,⋯BM }, Bi Bi1 , Bi is a capacity of i th bin, S(A) S(B) . The task is to find a subset A' A in order to pack A' into B and S(A') min , where
A' {A'1 , A'2 ,⋯ A'M }, C'i S(A'i ) Bi , i 1,M .
Model 15. Maximal covering of costs.
This model is similar to Model 14. Given a fixed set B {B1 , B2 ,⋯BM }, Bi Bi1 , Bi is a capacity of i th bin, S(A) S(B) . The task is to find a subset A' A in order to pack A' into
B and a total cost COST (A') min , where A' {A'1 , A'2 ,⋯ A'M }, C'i S(A'i ) Bi , i 1,M .
Model 16. Minimal total capacity of subset of bins. Given a fixed set B {B1 , B2 ,⋯BM }, Bi Bi1 , Bi is a capacity of i th bin, S(A) S(B) . The task is to find a subset B' B in order to pack A into B' and a total bin capacity
S(B') min , where A {A1, A2 ,⋯AM '}, B' {B'1 , B'2 ,⋯B'M }, Ci S(Ai ) B'i , i 1,2,⋯M ' , M ' M.
Model 17. Minimal total cost of subset of bins.
This model is similar to Model 16. Given two fixed sets B {B1 , B2 ,⋯BM } and
P {P1 , P2 ,⋯PM }, Bi Bi1 , Bi and Pi is a capacity and a cost of i th bin respectively, S(A) S(B) , The task is to find a subset B' B in order to pack A into B' and a total bin cost M '
COST (B') P'i min , where B' {B'1 , B'2 ,⋯B'M ' }, P'i is a cost of subset B'i , i1 ' A {A1, A2 ,⋯AM '}, Ci S(Ai ) B'i , i 1,2,⋯M ' , M M.
Model 18. Maximal total quota of subset of bins.
Given a fixed set B {B1 , B2 ,⋯BM }, Bi Bi1 , Bi is a quota of i th bin. The task is to find a subset B' B in order to cover B' with A and a total bin M ' quota S(B') B'i max , where B' {B'1 , B'2 ,⋯B'M ' }, M ' M. i1
We need to divide A into M ' disjoint subsets A1 , A2, ⋯ AM ' : Ci B'i .
Model 19. Maximal total cost of subset of bins.
This model is similar to Model 18. Given two fixed lists B {B1 , B2 ,⋯BM } and
P {P1 , P2 ,⋯PM }, Bi Bi1 , Bi and Pi is a quota and cost of i th bin respectively. The task is to find a subset B ' B in order to cover B' with A and a total bin cost M ' COST (B') P'i max , where A {A1, A2 ,⋯AM '}, i1
B' {B'1 , B'2 ,⋯B'M ' }, Ci S(Ai ) B'i , i 1,2,⋯M ' , M ' M.
Model 20. Bin Packing with a range of weight frequencies. We consider a multiset W { min max min max w1 ° k1 , w2 ° k2 ,⋯wm ° km } with a range ki [ki ,ki ]. We hold ki [ki ,ki ] fixed , i 1,2,⋯m for a given bin capacity Bmax and solve the Model 3. We need to find such a set m {k1 ,k2 ,⋯km } so that a total waste MB S(W ) min , where S(W ) wi ki . i1 Model 21. Bin Packing & Bin Covering with the decreasing capacities and quotas I.
Given a decreasing sequence of bin capacities B1 , B2 ,⋯Bn and quotas B'1 , B'2 ,⋯B'n , Bi Bi1 ,
B'i B'i1 , Bi B'i , Bn s(a1 ) , B'n s(an ) . The task is to find a minimal number M n in order to pack A into a list of pairs L {(B'1 , B1),(B'2 , B2 ),⋯(B'M , BM )}, B'i Ci Bi , i 1,M
. If we set all Bi Bmax and B'i s(an ) then we get Model 3. If we set all Bi Bmax and
B'i Bmin then we get Model 5. If we set all B'i s(an ) then we get Model 9.
Model 22. Bin Packing & Bin Covering with the decreasing capacities and quotas II. This model is similar to Model 21 but the task is to find a maximum number M of disjoint subsets. If we set all Bi S(A) and B'i Bmin then we get Model 4. If we set all Bi Bmax and
B'i Bmin then we get Model 6. If we set all Bi S(A) then we get Model 10. Two models of 22 are the basic ones. We called these models “Basic Model I “ and "Basic Model II". The basic models are NP-complete in strong sense with two possible results: YES if the model can be solved and NO otherwise. The rest of the models (3-22) are the optimization ones of finding the maximum or the minimum of the objective functions. These models are NP- hard in strong sense to find an optimal solution for any initial data. Models 3,7,8,9,11,12,13,16,17,20 can be reduced to the Basic Model I and models 4,5,6,10,14,15,18,19,21,22 can be reduced to the Basic Model II. Models 4,5,21,22 can either have solution or not. In practice, we can solve the problems to optimality within a given time limit for the small parameters m and n (Belov & Scheithauer, 2006), (Fukunaga & Korf, 2007), (Martello & Toth, 1990), (Schoenfield, 2002). For medium and large m we use, as a rule, approximation algorithms. But here the problem of evaluating of the quality of the approximate solutions arises. In this case we find the bounds of objective function: a lower bound LB(D) for the problems to minimum and an upper bound UB(D) for the problems to maximum, where D is an initial data of the model. For example, for the Model 3 we will write
D {s(a1 ), s(a2 ),⋯s(an )} Bmax or D s(A) Bmax , where s(A) {s(a1 ),s(a2 ),⋯s(an )}. We can write "UB(D) approximate solution” for the minimization tasks and “ LB(D) approximate solution" for the maximization tasks. Thus, we get a correlation LB(D) OPT(D) UB(D) for the both cases. Since OPT(D) is not known, we consider a value UB(D) LB(D) p 100% as a measure of closeness to OPT(A) . In case of p 0 we get an LB(D) optimal solution. Finding of both fast and high-quality bounds has a practical importance, especially for the tasks with large m . That’s why the problem of finding of the objective function bounds within a given time limit arises. We want to find different bounds LBi (A) and UBi (A) .
Then the best lower LB(A) max{LBi (A)} and upper UB(A) min{UBi (A)} bounds will be chosen. Most of the models were chosen from (Coffman et al.,1998), (Csiric et al., 2001), (Fukunaga & Korf, 2007), (Martello & Toth, 1990). We added new models 5,6,9,10,20,21,22. At present Classical Bin Packing is a more known model. There are many exact and approximation algorithms of solving this problem. It would be quite interesting to evaluate a behavior of Aproximation Agorithms ( AA ) in worst case for any initial data D by formula AA(D) OPT (D) , where and are the real numbers, 1, 0 . For example, 11 there is a theoretical result FFD(D) OPT(D) 4 (Johnson, 1974) for a well-known fast 9 approximation algorithm FFD (First Fit by Decreasing). A complexity of FFD is equal to FFD(D) OPT(D) O(m2 ) and measure of closeness p 100% 22,222% in worst case. A OPT(D) survey of Bin Packing theoretical results is presented in (Coffman et al.,1997). However, most of the effective approximation algorithms don't have theoretical results for worst case. Now a question arises: how to find an asymptotic constant in an experimental way for any approximation algorithm? Our way of solving this problem is to find an experimental constant UP(D) ' max for any D , ' . LB(D) 3. Solution Approach
Our main goal is to find the best approximate solution and objective function bound within a given time limit. For each model, we find a bound: a lower bound for the models to minimum and an upper bound for the models to maximum. This bound is found within time qT , where T is a given time limit and q is a fraction of T , 0 q 1. In case of q 1we use the whole time limit to find the bound of objective function only. This bound can be found in a time T1 qT .
From here on we find the best approximate solution within the time limit T T1 . This solution can be found in a time T2 T T1 too. Our algorithms produce a sequence of the bounds
LBi (D) and approximate solutions UBi (D) for the models to minimum and a sequence of the approximate solutions LBi (D) and bounds UB(D) for the models to maximum, where
LBi (D) LBi1 (D) and UBi (D) UBi1 (D) . The LB0 (D) and UB0 (D) are the trivial lower bound and approximate solution for the models to minimum and the trivial both approximate solution and upper bound for the models to maximum. For example, for Model 3 (Classical Bin
Packing) we set the LB0 (D) S(A) / Bmax , and UB0 (D) FFD(D) . Then we try to find an optimal solution within a time limit T3 T T1 T2 . An optimal solution obviously cannot always be found in T3 . Thus our strategy is of three consecutive steps: finding of the best objective function bound within qT , best approximate solution within T T1 and optimal solution within T3 . We developed a problem-oriented estimation technology of building of the objective function bounds for each of the models. This technology can be used as a basis to form the bounds for the other models that use an idea of dividing an initial set A into disjoint subsets with the given properties. The technology is of two parts: Initial Reduction and Estimation Corridor. These parts are interlinked closely. The results of the first part are used in the second part and vice versa. The Initial Reduction part is of a series of algorithms to reduce an initial data to a reduced data. We called these algorithms REDUCE , RASP1, RASP2 , RASP3 , RASP4 and RASP5 . REDUCE algorithm removes the dominance groups of weights from the initial data and produces two types of initial reduction. The first type (A-type) is used for Model 3 only by 0 r OPT(D) OPT(D ) OPT(D ) , D s(A) Bmax , 0 0 r r 0 r 0 r D s(A ) Bmax , D s(A ) Bmax , A A A , D D D , 0 OPT (D ) M 0 M 1 M 2 M 3 M 4 ⋯M H , where M 1 , M 2 , M 3 , M 4 , … are the numbers of the dominance singletons, pairs, triplets, quarters, … respectively, M 0 is a number 0 1 2 H 0 of reduced bins, A {A , A ,⋯ A }, A 1M 1 2M 2 3M 3 4M 4 ⋯HM H , Ai {Ai , Ai ,⋯ Ai } B 1 2 M i , H is a maximal number of weights that can be put into a bin of max capacity. A singleton is a bin containing one weight, a pair is a bin containing two weights, a i triplet is a bin containing three weights and so on. A subset A j is j th dominance group of i 1 2 3 4 weights, j [1, M i ] , A , A , A , A ,⋯ are the sets of the dominant singletons, pairs, triplets, {a } quarters, … respectively. We will call a group G N j (i) of i items as a dominance group, if a number p N1 (i) has a following property: pi1 s(ak ) Bmax ,, s(a0 ) : Bmax 1, k p where N j (i) N j1(i) 1, j [1,i], N0 (i) N1 (i) 1 is a number of items preceding a p . Here
N1 (1) is an address of dominance singletons, N1 (2) is an address of dominance pairs, N1 (3) is an address of dominance triplets and so on. If an optimal solution has at least one group of i G' {a } N' (i) N' (i) items N ' j (i) : N'1 (i) N1 (i) , j j 1 , j [1,i], then we can remove the o N' (i) N (i) s(a ) s(a ) dominance group G from A and put G into A since j j N j (i) N ' j (i) for j [1,i]. We developed fast reduction algorithms A1, A2 and A3 for
Bmax Bmax A -type to find these dominance groups (Fedulov, 2008). If all s(a j ) 1, and k 2 k k 2 we can place k or k 1items into each bin. It follows that M 0 M k M k1 . If we remove all dominance groups with k items from the initial set A we get an exact value of n kM OPT(D) M k for the optimal result. k k 1 The second type ( B -type) is used for the Model 1 to reduce an initial data (A, L) to (Ar , Lr ) {a } N (i) N (i) 1 . For this purpose we try to find a dominance group G N j (i) , j j1 , j [1,i] for a range of bin numbers i [K , K ] L {B , B ,⋯B } 1 K K M s(a ) B N (i) 1 2 of set 1 2 M , 1 2 : N j (i) K2 , where 1 could be j1 s(a ) B s(a ) B found from N1 (i) K1 and N1 (i)1 K1 . If an optimal solution has at least one group of i items G' {a } N' (i) N' (i) j [1,i] N ' j (i) : N'1 (i) N1(i) , j j 1 , then a group G dominates the group G' since N' (i) N (i) s(a ) s(a ) j j N j (i) N ' j (i) for j [1,i], and, consequently, G can be removed from an initial set A . We developed fast algorithms B2 and B3 to find these dominance groups for B -type (Fedulov, 2008). The algorithms RASP1, RASP2 , RASP3 , RASP4 and RASP5 will be described in a full version of the paper. The second part estimates an existence of reasonable solutions for a fixed number (M) of subsets. This part solves a problem of existing of the way to pack set A into M bins: min max Bi Ci Bi ,i 1,M . As a result of solving this problem an estimation corridor min max min min max max [Ci ,Ci ]: Bi Ci Ci Ci Bi , i 1,M will be built. Let's define a main notation (a,b) as a maximal number of disjoint subsets that one can get from the initial set A so that a total weight in each subset was within a range [a,b]. A problem of finding of an exact (a,b) is NP-hard in the strong sense, thats why our goal is to find a qualitative upper bound (a,b) (a,b) . We build (a,b) by using a fast algorithm A4 (Fedulov, 2008). Then, by max max min min using (a,b) , we build an upper break-line С {Ci } and lower break-line С {Ci }, i 1,M , and prove that any reasonable solution C {Ci } will be within our estimation corridor [С min ,C max ]. If we get a result M M max min Ci S(A) or Ci S(A) then there is no way to pack set A into M bins: i1 i1 min max Bi Ci Bi , i 1,M . Now let's present a simple algorithm of building of the estimation min max max min corridor [Ci ,Ci ] for a case when Bi B and Bi B', i 1,M . By using (a,b) we build a multiset
C {B ° mB , B 1° mB1 ,⋯B 1° mB 1 , B ° }, mBi = (B i, B) (B i 1, B) , i 0 , (B 1, B) := 0 , e 0 (B , B) (B 1, B) , mBi M , i0 then we set
max max Ci : B , 1 i mB , Ci : B 1, mB 1 i mB mB1 and so on, the last elements of C are equal to B . Then we build a multiset
C {B' ° , B' 1° mB' 1 ,⋯B'1° mB'1 , B'°mB'},
mB'i (B', B'i) (B', B'i 1) , i 0, (B', B'1) : 0 , 0 (B', B' ) (B', B' 1) , mB'i M , i0 then we set
min min Ci : B' , 1 i , Ci : B' 1, 1 i mB' 1
and so on, the last mB elements of C are equal to B' . Then we try to narrow this corridor by using our recursive algorithm A5 (Fedulov, 2008). On the K th iteration we build new
max max min min Ci (K) Ci (K 1) and Ci (K) Ci (K 1) , max max min min where Ci (0) : Bi and Ci (0) : Bi , i [1, M ]. A simple observation shows that: i1 C max (K 1) (M i 1)C min (K 1) S(A) min if j i then we have to increase Ci (K 1) at least j1 min min by 1, i.e. set Ci (K) : Ci (K 1) 1; M C min (K 1) iC max (K 1) S(A) max if j i then we have to decrease Ci (K 1) at least by 1, i.e ji1 max max set Ci (K) : Ci (K 1) 1. max max min min Thus, after N iterations we will finally get Ci : Ci (N) and Ci : Ci (N) .
A graphical example of building an estimation corridor is shown on Figure 1. Figure 1. Building an estimation corridor.
Here an upper horizontal line is a level B and C max (0) {B ° M}, a lower horizontal line is a level B' and C min (0) {B'°M}. An upper break-line is of 5 steps as a multiset C max (1) {B ° (B,B),B 1° (B 1, B) (B, B),B 2° (B 2, B) (B 1,B), B 3° (B 3, B) (B 2, B), B 4 ° (B 4, B) (B 3, B)}. A lower break-line is of 5 steps too as a multiset C min (1) {B'4 ° (B', B'4) (B', B'3), B'3° (B', B'3) (B', B'2), B'2° (B',B'2) (B',B'1), B'1° (B', B'1) (B', B'), B'° (B',B')},
A middle break-line (of 4 steps) shows a reasonable solution C {C1,C2 ,⋯CM } . Each model has it's own algorithms of building the objective function bounds. We developed a series of problem-oriented approximation algorithms to find approximate solutions for each model. Some algorithms use the results of solving of two blocks. We solve the basic Model 1 or Model 2 by using a branch-and-bound method to find optimal solutions of the models. In order to evaluate the partial solutions at branching stages, the results of solving two blocks are used. In addition we developed the algorithms to find the isomorphic partial solutions as non-perspective for branching into depth.
4. Software Tool Description
Currently we have a Software Tool in C#2008 for solving 22 models. The goal is to deliver a comfortable tool to the users to solve their packing problems. The tool consists of four parts: User Interface, Solver, Interactive Packing and Intelligent Games. User Interface is used to input data in a comfortable way. A computer screen space is divided into three areas: "Set of Weights", "Set of Bins" and "Parameters". Areas "Set of Weights" and "Set of Bins" are divided into three subareas: Manual Input, File Input and Automatic Input. Manual Input area is used to enter the data manually. We enter data into two tables (Table 1 and Table 2) represented as pages of 10 lines and 3 columns . Each line presents a group of weights (Table 1) or a group of bins (Table 2). The first column contains a weight size or a bin capacity, the second column contains a weight cost or a bin profit and the third column contains a weight frequency or a bin quantity. By using "Home", "End", "Next", "Previous", "Goto Page Number" buttons we can view and update the data on each page. File Input area is used to upload data from a file. Automatic Input area is used to generate data randomly. To generate the data the following parameters should be defined: m (a number of different weight sizes or bin capacities (quotas)), n (a total number of weights or bins), Range (maximum value), Lower and Upper (lower and upper bounds of a range), 0 Lower Upper 1. Clicking a Random Number Generator button from a listbox will make program generate random numbers within a [LowerRange,UpperRange] range. Generated data is presented in Table 1 or Table 2 in the subarea of Manual Input. Apart from that, a Model or a Game can be chosen from a listbox. Game Data can be generated according to User Rating from 1 to 100. Time limit also can be set. Solver is the main part of the tool and gives an opportunity to: find approximate solutions and objective function bounds for each model within a given time limit; solve the tasks with large parameters m 50,000 ; view the process of finding the solutions in Graphics Mode; view the chronology of approximate solutions generation; view statistics of finding the solutions during the process of solving; view the output results: as the pages of 10 lines (we use "Home", "End", "Next", "Previous", "Goto Page Number" buttons to view the pages), where each line presents a bin's content as a set of weights in a compact form; as decreasing sequence of bin's content or the pictures of bin's content in Visual Form; view the initial reduction and estimation corridor in Graphics Mode and so on. Interactive Packing is intended to build solutions with the specified properties. Since our tool is able to find a solution for any sequence of items within each subset, user can specify his own sequence. Our tool helps user to build his own solution using the User-Specified Properties at every step. The interactive packing is performed in manual mode step-by-step. At each step a current position is a partial solution. Tool evaluates a current solution within a time interval, declared in "Response Time" field. Tool can give one of the following answers: "Packing is NOT POSSIBLE", "Packing might exist", "Packing exists" and others. According to the response, re-packing might be done. There are no more than 40 weight buttons and 50 bin buttons on the computer screen. Each weight button represents a set of equal item sizes wi ° ki . To observe other sets of weights a portion of p(w) buttons should be loaded, 2 p(w) 40 . Each bin button represents one bin. To see the other bins a portion of p(b) buttons should be loaded, 2 p(w) 50 . Interactive Packing gives an opportunity to: view the weight and bin portions by using "Home", "End", "Next", "Previous" buttons; redefine sizes of weight and bin portions; return to previous position and continue re-packing from this position; redefine “Response Time” (by default “Response Time” is equal to 0,5 seconds) and so on. We offer Intelligent Games that any man alive will enjoy. Currently there are 12 games. These games will be useful for children of any age to develop and improve their mental arithmetic, attention concentration, ability to estimate possibilities, case analysis, decision- making and so on. One can play within a given time limit or gambling as in a casino. Design of intelligent games is similar to the design of interactive packing.
5. Results
We conducted experiments on Intel/Core2 Duo/E6400 2,13GHz,2Gb RAM computer. Here we present one of our results of solving Model 3 and compare with the LP-method using the Gilmore-Gomory Approach (Gilmore & Gomory, 1961). Well-known LP-method produces a Lower Bound LP(D) as near-optimal result for Model 3. Instance, for which a difference OPT (D) LP(D) 1, wasn't yet found (Scheithauer & Terno, 1997). But LP-method is impractical for large parameters m since LP-runtime increases exponentially with m . We see this fact in Table 4 (Applegate et al., 2003). Initial data within (0.25Bmax ,0.5Bmax ] was generated randomly. If we choose a Branch-and-Bound method (PBB) of generating a cut pattern, then for m 3200 , n 1,000,000 and Bmax 20000 the total time of finding LP(D) is 345830 seconds or about 96 hours. The goal was to compare our result with the LP-result from
(Applegate et al., 2003). For m n 3200 and Bmax 1,000,000 we got the following results: a trivial lower bound LB0 (D) S(A) / Bmax 1208 , a trivial upper bound FFD(D) 1338 (as a result of solving a well-known approximation algorithm FFD ), our best lower bound LB(D) 1253and upper bound UB(D) 1255 were found in 3,6 minutes (the total time of solving). The sequence of approximate solutions is presented in Table 1. This upper bound was found by approximation algorithm FG (Fedulov, 2008). Thus, we got a difference UB(D) LB(D) 2 and measure of closeness p 0,1596% . It is truth that an experimental result (Applegate et al., 2003) was for n 1,000,000 but our result is for n 3200 . But parameter n is not as important as parameter m for the LP-approach. The result (Applegate et al., 2003) was for Bmax 20000 however we received our result for Bmax 1,000,000 . Note that the total LP-runtime dramatically grows with the growth of Bmax . This fact is shown in Table 5 and 6 (Applegate et al., 2003). The results of solving Model 3 for other large m and n are presented in Table 2. The results for the other models will be presented in full paper version.
Name FFD A1 A3 A4 (1) A4 (2) A4 (3) A4 (4) A4 (5) Value 1338 1279 1274 1264 1259 1257 1256 1255 Diff 85 26 21 11 6 4 3 2 p% 6,7837 2,0750 1,6759 0,8778 0,4788 0,3192 0,2394 0,1596 Time secs 0,31 2,672 7,922 29,203 57,453 43,954 39,718 33,750
Table 1. Diff UB(D) LB(D) .
n 1m 2m 3m 4m Total Total Total Total m p % time p % time p % time p % time secs secs secs secs 2000 0 16.78 0.06 57.39 0.1285 112.98 0.0962 648.61 2500 0.1036 77.47 0.1028 91.00 0.1032 706.23 0.1019 746.53 3000 0,1693 69.78 0.1289 642.17 0.1434 1790.2 0.0869 4965.8
Table 2. The results for the range (0.25Bmax ,0.5Bmax ] and Bmax 1,000,000 . 6 Conclusion
We presented a Software Tool, solving 22 combinatorial models for a class of One-Dimensional Bin Packing Problems. Tool gives several important results, whereof main two are the following: the best approximate solution and the best objective function bound, that the tool can produce within a given time limit. The goal is to deliver a comfortable tool to the users to solve their packing problems. The necessity of developing such tools resulted from the current needs of many people . The following phrase from (Soerensen, 2010) expresses our position very well. “Typically, there is a large gap between the academic development of vehicle routing algorithms and their intelligent use in practice, and consequently, in many sectors, the use of intelligent computational tools is lagging behind academic development. On the other hand, academic research has not always been able to deliver the tools and software required by practitioners in the field, focussing, for example, on finding optimal solutions rather than on building robust and effective algorithms.” It is truth that this text concerns to vehicle routing problem but in common sense it can be used to describe Bin Packing problems too. Most of the programs, which solve Bin Packing tasks, are inacceptable for purchasing. It is truth that there is a commercial program IBM ILOG CPLEX, which solves the combinatorial optimization problems. But this product is too expensive for an ordinary user. Another problem is that CPLEX requires reduction of the user's problem to the special structure, which claims special skills in topical area. We offer our tool for ordinary users, who might not have any special knowledge. Currently we have an offline tool as WindowsFormsApplication. In future, we intend to develop an online service, where user can solve their packing problems. The Software Tool was demonstrated at the EU/ME 2011 Workshop in Vienna on the 22 of February (Fedulov et al., 2011).
References
Applegate, D.L., Buriol, L.S., Dillard, B.L., Johnson, D.S. & Shor P.W. (2003). The Cutting-Stock Approach to Bin Packing: Theory and Experiments. In Proceedings of the Fifth Workshop on Algorithm Engineering and Experimentation, SIAM, pp. 1 – 15, http://www2.research.att.com/~dsj/papers/Acuttingstock.pdf
Belov G., & Scheithauer G. (2006). A branch-and -cut-and-price algorithm for one- dimensional stock cutting and two-dimensional two-stage cutting. European Journal of Operational Research 171(1), pp. 85-106.
Coffman J.E.G., Garey M.R., & Johnson D.S. (1997). Approximation Algorithms for Bin Packing: A Survey, Approximation Algorithms for NP-Hard Problems, D.Hochbaum (editor), PWS Publishing, Boston, pp. 46-93.
Coffman J. E. G., Galambos G., Martello S., & Vigo D. (1998). Bin packing approximation algorithms: Combinatorial analysis. D.-Z. Du, P. M. Pardalos (eds.). Handbook of Combinatorial Optimization, Kluwer Academic Publishers, Boston, MA.
Csiric, J., Johnson D.S., & Kenyon C. (2001). Better Approximation Algotithms for Bin Covering. In In Proc. 12th Ann. ACM-SIAM Symp. on Discrete Algorithms, pp. 557-566.
Fedulov, G. (2008). One-Dimensional Bin Packing Class: Fast Algorithms of Finding the Bounds of Objective Functions, Seminar of I.Vekua Institute of Applied Mathematics, Reports, Vol.34, pp. 78-88, http://www.viam.science.tsu.ge/report/vol34/fedulov.pdf
Fedulov, G., Rukhaia, K., Tibua, L., & Iashvili, N. (2011). Tool of Finding the Bounds of Objective Functions for a Classs of One-Dimensional Bin Packing Problems. EU/ME 2011 Workshop on Client-centered Logistics and International Aid February 21-22, Vienna, pp. 52-53
Fukunaga, A.S., & Korf R.E. (2007). Bin Packing Algorithms for Multicontainer Packing, Knapsack, and Covering Problems, Journal of Artificial Intelligence Research, Vol. 28, pp. 393-429.
Gilmore, P.S. & Gomory, R.E. (1961). A linear programming approach to the cutting stock problem. Operations Research. 9, pp. 849-859.
Johnson, D.S. (1974). Fast Algorithm for Bin Packing. Journal of Computer and System Sciences, pp. 272-314.
Martello, S. & Toth, P. (1990). Knapsack Problems: algorithms and computer implementations. John Wiley&Sons, Chichester.
Scheithauer, G. & Terno, J. (1997). Theoretical investigations on the modified integer round-up property for the one-dimensional cutting stock problem. Oper. Res. Lett., 20: pp. 93-100.
Schoenfield, J.E. (2002). Fast, exact solution of open bin packing problems without linear programming. Working paper.
Soerensen, K. (2010). [EU/ME] CFP: Intelligent Computational Tools for Routing in Distribution Planning. Personal letter to Fedulov G., September 9.
Application
User Interface. Solving Model 3 for an example.
Result of solving Model 3 for an example as the bin contents by decreasing.
Result of solving Model 3 for an example as the pictures of bin contents
m 2000,n 1m 2000 . Time limit =1800 seconds
m 2000,n 2m 4000 . Time limit =90 seconds m 2000,n 3m 6000 . Time limit = 300 seconds m 2000,n 4m 8000 . Time limit = 900 seconds
m 2500,n m 2500 . Time limit = 900 seconds m 2500,n 2m 5000 . Time limit = 900 seconds
m 2500,n 3m 7500 . Time limit = 900 seconds m 2500,n 4m 10000 . Time limit = 900 seconds
m 3000,n 2m 6000 . Time limit = 900 seconds m 3000,n 2m 6000 . Time limit = 900 seconds
m 3000,n 3m 9000 . Time limit = 1800 seconds m 3000,n 4m 12000 . Time limit = 5400 seconds