-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.txt
97 lines (67 loc) · 4.23 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# BPP3D-Bin-Packing-Problem
A typical application where the three dimensional bin packing problem occurs
is the loading of packages onto containers. The problem belongs to the
class of NP complete problems and can be formulated as follows:
Let be J={1,...,n} a set of small rectangular-shaped items with dimensions w_i, h_i, d_i.
All small items must be packed into bins of dimensions W,H,D.
All dimensions are positive integers and the dimensions of the small
items are smaller than or equal to the corresponding bin dimensions.
The task is to pack all the small items,
such that:
1) All small items are packed into a minimum number of bins.
2) No two items overlap.
##################################################################################################
This algorithm solves the problem for orthogonal packings, which means the items are packed,
such that the edges of the small items are parallel to the correspoding bin edge.
No rotations of items or bins are allowed. The algorithm is capable to solve the problem
for general packings and robot packings.
The algorithm is a combination of two branch and bound schemes where:
- the outer branching scheme assigns small items to bins without specifying the actual positions
- the inner branching scheme attempts to pack a given subset of items into one bin depending on the chosen
packing pattern (general, robot).
##################################################################################################
The main method of the algorithm is the method BinPack3D(...). It
returns an object of type AllInfo which contains all the information
and results of the executed algorithm.
The parameter description is the following
int n ... Amount of small items
int W... Width of the bin
int H... Height of the bin
int D... Depth of the bin
int[] w... Widths of the small items
int[] h... Heights of the small items
int[] d... Depths of the small items
int[] x... Resulting x-coordinates of the small items
int[] y... Resulting y-coordinates of the small items
int[] z... Resulting z-coordinates of the small items
int[] bno... Resulting bin number of the small items
int nodeLimit... Limit for number of exploration nodes in the outer branching scheme.
If set to zero, the algorithm tries to find an optimal
solution, or terminates if "iterLimit" or "timeLimit" is reached.
"nodeLimit" is treated as a multiple of one thousand, e.g. if nodeLimit = 1000,
the algorithm explores at most "nodeLimit * IUnit" nodes (IUnit = 1000).
int iterLimit... Limit for number of iterations in the inner branching schemes.
If set to zero, the algorithm tries to find an optimal
solution, or terminates if "nodeLimit" or "timeLimit" is reached.
"iterLimit" is treated as a multiple of one thousand, e.g. if iterLimit = 1000,
the algorithm performs at most "iterLimit * IUnit" nodes (IUnit = 1000).
int timeLimit... Time limit for the algorithm. If set to zero, the algorithm tries to find an optimal
solution, or terminates if "nodeLimit" or "iterLimit" is reached.
If the timelimit is reached the algorithm return a heuristic solution.
int packingType... If set to zero the algorithm tries to find an optimal solution
using general packing patterns.
If set to one the algorithm tries to find an optimal solution
using robot packing patterns.
##################################################################################################
For a detailed description of the algorithm and original C-Code refer to:
[1] Silvano Martello, David Pisinger, and Daniele Vigo. "The three-dimensional
bin packing problem." Oper. Res., 48(2):256–267, March
2000.
[2] Silvano Martello, David Pisinger, Daniele Vigo, Edgar Boef, and Jan Korst.
"Algorithm 864: General and robot-packable variants of the threedimensional
bin packing problem." ACM Trans. Math. Softw., 33:7, 01
2007.
##################################################################################################
This C# code is a reimplementation of the original C-Code provided
by David Pisinger at http://hjemmesider.diku.dk/~pisinger/codes.html.
The code comes with no warranty.