Abstract
A set of tri-axial ellipsoids, with given semi-axes, is to be packed into a rectangular box; its widths, lengths and height are subject to lower and upper bounds. We want to minimize the volume of this box and seek an overlap-free placement of the ellipsoids which can take any orientation. We present closed non-convex NLP formulations for this ellipsoid packing problem based on purely algebraic approaches to represent rotated and shifted ellipsoids. We consider the elements of the rotation matrix as variables. Separating hyperplanes are constructed to ensure that the ellipsoids do not overlap with each other. For up to 100 ellipsoids we compute feasible points with the global solvers available in GAMS. Only for special cases of two ellipsoids we are able to reach gaps smaller than \(10^{-4}\).
Similar content being viewed by others
References
Cafieri, S., Lee, J., Liberti, L.: On convex relaxations of quadrilinear terms. J. Glob. Optim. 47(4), 661–685 (2009). doi:10.1007/s10898-009-9484-1
Chernov, N., Stoyan, Y., Romanova, T., Pankratov, A.: Phi-functions for 2D objects formed by line segments and circular arcs. Adv. Oper. Res. (2012). doi:10.1155/2012/346358
Choi, Y.K., Chang, J.W., Wang, W., Kim, M.S., Elber, G.: Continuous collision detection for ellipsoids. IEEE Trans. Vis. Comput. Graph. 15(2), 311–325 (2009). doi:10.1109/TVCG.2008.80
Dirac, P.A.M.: The Principles of Quantum Mechanics. Oxford University Press, Oxford (1974)
Donev, A., Cisse, I., Sachs, D., Variano, E.A., Stillinger, F.H., Connelly, R., Torquato, S., Chaikin, P.M.: Improving the density of jammed disordered packings using ellipsoids. Science 303(5660), 990–993 (2004). doi:10.1126/science.1093010
Donev, A., Stillinger, F.H., Chaikin, P.M., Torquato, S.: Unusually dense crystal packings of ellipsoids. Phys. Rev. Lett. 92, 255,506 (2004)
Halmos, P.R.: Finite-Dimensional Vector Spaces. Springer, New York (1974)
Kallrath, J.: Combined strategic design and operative planning in the process industry. Comput. Chem. Eng. 33, 1983–1993 (2009)
Kallrath, J.: Cutting circles and polygons from area-minimizing rectangles. J. Glob. Optim. 43, 299–328 (2009)
Kallrath, J.: Polylithic modeling and solution approaches using algebraic modeling systems. Optim. Lett. 5, 453–466 (2011). doi:10.1007/s11590-011-0320-4
Kallrath, J., Rebennack, S.: Cutting ellipses from area-minimizing rectangles. J. Glob. Optim. 59(2–3), 405–437 (2014). doi:10.1007/s10898-013-0125-3
Systems, Lindo: Lindo API: User’s Manual. Lindo Systems Inc, Chicago (2004)
Lubachevsky, B.D., Stillinger, F.H.: Geometric properties of random disk packings. J. Stat. Phys. 60(5–6), 561–583 (1990)
Man, W., Donev, A., Stillinger, F.H., Sullivan, M.T., Russel, W.B., Heeger, D., Inati, S., Torquato, S., Chaikin, P.M.: Experiments on random packings of ellipsoids. Phys. Rev. Lett. 94, 198,001 (2005). doi:10.1103/PhysRevLett.94.198001
Misener, R., Floudas, C.: ANTIGONE: algorithms for continuous/integer global optimization of nonlinear equations. J. Glob. Optim. 59, 503–526 (2014)
Romanova, T., Scheithauer, G., Krivulya, A.: Covering a polygonal region by rectangles. Comput. Optim. Appl. 48(3), 675–695 (2011)
Stoyan, Y.G., Chugay, A.: Packing cylinders and rectangular parallelepipeds with distances between them. Eur. J. Oper. Res. 197(1), 446–455 (2008)
Tawarmalani, M., Sahinidis, N.V.: Convexification and Global Optimization in Continuous and Mixed-Integer Nonlinear Programming: Theory, Algorithms, Software, and Applications. Nonconvex Optimization and its Applications Series. Kluwer Academic Publishers, Dordrecht (2002)
Uhler, C., Wright, S.J.: Packing ellipsoids with overlap. SIAM Review 55(4), 671–706 (2013). doi:10.1137/120872309
Waldron, K., Schmiedeler, J.: Kinematics. In: Siciliano, B., Khatib, O. (eds.) Handbook of Robotics, pp. 9–33. Springer, Oxford (2008)
Acknowledgments
Thanks are directed to Prof. Dr. Siegfried Jetzke (Ostfalia Hochschule, Salzgitter, Germany) for his interest in this work, comments on the manuscript and discussion about the usefulness of ellipses and ellipsoids in real world problems. The author is grateful to Dr. Arash Rezaeian (WIEH Erdgashandelshaus, Berlin, Germany) for his careful proof reading and production of the figures. Finally, we appreciate the constructive reviews of the referees.
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix 1: Notation
We begin with a summary of the notation used in the derivation of the model.
- \(\mathsf {A}\) :
-
Positive definite and symmetric matrix defining ellipsoids; we call this also the shape-rotation matrix.
- \(\mathbf {c}\) :
-
Objective function coefficient vector of auxiliary problems; \(\mathbf {c}^{\top } = (1,0,0)\) or \(\mathbf {c}^{\top } = (0,1,0)\) or \(\mathbf {c}^{\top } = (0,0,1)\)
- \(\mathsf {D}_i\) :
-
Diagonal matrix for ellipsoid i with eigenvalues of \(\mathsf {A}_i\) on the diagonal
- \(\delta _{mn}\) :
-
Kronecker delta function takes value 1 if the indices m and n are equal, otherwise it takes the value zero 0
- \(\mathcal {L}\left( \mathbf {x}, \bar{\lambda }\right) \) :
-
Lagrangian function
- \(\lambda _{id}\) :
-
Eigenvalue of matrix \(\mathsf {A}_{i}\); \(\lambda _{i1} = a_i^{-2}\), \(\lambda _{i2} = b_i^{-2}\), and \(\lambda _{i3} = c_i^{-2}\)
- \(\bar{\lambda }\) :
-
Lagrangian multiplier associated with ellipsoid equation
- \(\rho \) :
-
Density of ellipsoids; \(0 \le \rho \le 1\)
- \(\mathsf {R}_{\theta i}\) :
-
Rotation matrix for ellipsoid i at angle \(\theta _i\)
- \(x_{id}^{\mathrm {-}}\) :
-
Minimal extension of ellipsoid i in dimension d
- \(x_{id}^{\mathrm {+}}\) :
-
Maximal extension of ellipsoid i in dimension d
- \( \iota \) :
-
Selected ellipsoid \(\iota \) is to be located in the first octant of the rectangular box
- \(\varLambda \) :
-
Affine transformation matrix of the unit sphere \(\varLambda :=(a,b,c) \)
The notation used in the mathematical programming models is summarized in the following sections.
1.1 Indices and sets
- \(d \in \{1,2,3\}\) :
-
Index for the dimension; \(d=1\) represents the length and \(d=2\) the width, and \(d=3\) the height of the box
- \(i\in \mathcal {I}:= \{ 1, \ldots , n \}\) :
-
Objects (ellipsoids or spheres) to be packed
- \((i,j) \in \mathcal {I}^{\mathrm {co}}\) :
-
Pairs of congruent ellipsoids; we assume \(i < j\)
1.2 Data
- \(a_{i}\) :
-
The largest semi-axis of ellipsoid i; \(a_i \ge b_i \ge c_i\)
- \(b_{i}\) :
-
2nd largest semi-axis of ellipsoid i; \(a_i \ge b_i \ge c_i\)
- \(c_{i}\) :
-
Smallest semi-axis of ellipsoid i; \(a_i \ge b_i \ge c_i\)
- \(\overline{D}_{ij}\) :
-
Bound on the distance variables \(d_{ij}^\mathrm{ab}\) and \(d_{ij}^\mathrm{be}\)
- \(\varDelta \) :
-
Relative gap
- \(R_i\) :
-
Radius of sphere i to be packed
- \(S_{d}^{-}\), \(S_{d}^{+}\) :
-
Minimum (lower bound) and maximum size (upper bound) of the extension of the rectangular box in dimension d
- \(V_{i}\) :
-
Volume of ellipsoid i; \(V_{i} = \frac{4}{3}\pi a_{i}b_{i}c_{i}\)
- \(V^{-}\), \(V^{+}\) :
-
Lower and upper bounds on volume, v, of the rectangular box obtained during the computation
- \(V^\mathrm{ci, -}\) :
-
Minimal volume of the design rectangle to host the inner spheres associated with the ellipsoids. \(V^\mathrm{ci, -}\) provides a lower bound on the associated ellipsoid packing problem
- \(V^\mathrm{ci, +}\) :
-
Volume of the rectangular box to host the outer spheres associated with the ellipsoids. \(A^\mathrm{ci, -}\) provides an upper bound on the associated EPP
- \(\varLambda _{inn}\) :
-
Elements of affine transformation matrix
1.3 Decision variables
- \(d^\mathrm {c}_{ijd}\) :
-
Difference of the center coordinates of ellipsoid i and j
- \(\mathbf {n}^\mathrm {H}_{ij}\) :
-
Normal vector of the hyperplane \(H_{ij}\) separating ellipsoid i and j; in the GAMS implementation we use \(n^\mathrm {H}_{ijd}\) for each coordinate direction d subject to \(-1 \le n^\mathrm {H}_{ijd} \le +1\)
- \(L_{ij}\) :
-
Elements of the rotation matrix \(\mathsf {L}\) in the half-space approach; the elements are subject to the bounds \(-1 \le R_{ij} \le +1\)
- \(R_{ij}\) :
-
Elements of the rotation matrix \(\mathsf {R}\); the elements are subject to the bounds \(-1 \le R_{ij} \le +1\)
- \(u_{jkmn}\) :
-
Auxiliary variables considered only for tuples with \(j\le m\) and \(k\le n\)
- v :
-
Volume of the rectangular box; \(v^*\) defines (globally) optimal volume
- \(v_i\) :
-
Auxiliary variable representing the trigonometric term \(\cos \theta _i\); \(v_i \in [-1,1]\) for ellipsoid i when using the one-axis-one angle-approach
- \(w_i\) :
-
Auxiliary variable representing the trigonometric term \(\sin \theta _i\); \(w_i \in [0,1]\) for ellipsoid i when using the one axis-one angle approach
- \(x_{d}^{\mathrm {R}}\) :
-
Extension of the rectangular box in dimension d
- \(x_{id}^0\) :
-
Coordinates of the center vector of ellipsoid i
- z :
-
Waste of the rectangular box; \(z = v - \sum \nolimits _{i \in \mathcal {I}} V_{i}\)
- \(\theta _{i}\) :
-
Orientation angle of ellipsoid i; \(\theta _{i} \in [0,2\pi ]\)
The model contains only continuous variables.
Appendix 2: Detailed derivations
1.1 Bounds on rotation matrices
A rotation matrix \(\mathsf {R}\) in real space \({\mathbb {R}}\) is a \(n\times n\) matrix with the following properties:
i.e., the inverse matrix \(\mathsf {R}^{-1}\) of \(\mathsf {R}\) is just the transposed matrix \(\mathsf {R}^{\mathrm {T}}\). From (6.1 ) we follow and proof that for all elements \(R_{ij}\) the following bound inequalities
are true. These bounds are useful to provide them to the global solvers. The proof only exploits \(\mathsf {R}^{\mathrm {T}}\mathsf {R}=\mathbbm {1}\) and works as follows:
is equivalent to
Therefore, using the transposed form, we also have
As (6.3) must be fulfilled for all \(\{ik\}\), it is especially true for \(k=i\), which implies
As in (6.4) we have \(\mathop {\textstyle \sum }_{j}R_{ji}^{2}=\mathop {\textstyle \sum }_{j}R_{ij}^{2}=1\) for all i, it follows \(\left| R_{ij}\right| \le 1\) for all \(\forall \{ij\}\). Thus, as we work in real space \({\mathbb {R}}\), we can add the bounds
1.2 Minimal and maximal extensions of rotated ellipsoids
We compute the extreme extensions, \(x_{id}^{\mathrm {-}}\) and \(x_{id}^{ \mathrm {+}}\), of ellipsoid i in dimension d with center \(x_{id}^{0}\) from the optimization problems
subject to the ellipsoid equation (2.10); for \(d=1\) we use \(\mathbf {c}^{\top }:=(1,0,0)\), for \(d=2\) we select \(\mathbf {c}^{\top }:=(0,1,0)\), and for \(d=3\) we use \(\mathbf {c}^{\top }:=(0,0,1)\). Instead of using (2.10), we solve the modified and easier optimization problem
respectively, subject to ellipsoid equation
for an origin-centered ellipsoid. Note, however, that ellipsoid i cannot be placed at the origin, the left-bottom corner of the rectangular box. Actually, a lower bound on the center coordinate, \(x_{id}\), in all coordinate directions d is given by
if we assume that the semi-axis of ellipsoid i are sorted according to \( a\ge b\ge c\).
The Lagrangian function of both optimization problems (6.6) and (6.7) reads
with the unrestricted Lagrangian multiplier \(\bar{\lambda }\in \mathbb {R}\). The first-order Karush–Kuhn–Tucker (KKT) conditions follow as
together with (6.8).
We left-multiply (6.11) by \(\mathbf {x}^{\top }\), (this operation is safe, as the origin cannot be an extremum) and exploit (6.8) to obtain \(x_{d}+2\bar{\lambda }=0\) for all d . This enables us to substitute \(\bar{\lambda }\) from (6.11) yielding
with
For the first dimension (\(d=1\), x-axis) the three equations in (2.32) read
As \(x_{1}\ne 0\) (the origin cannot be a stationary point of this problem), we divide the 2nd and 3rd equation by \(x_{1}\) and derive
At first, let us express \(x_{2}\) and \(x_{3}\) as functions of \(x_{1}\). This leads to
If we enter the expressions (6.17) into (6.13), we obtain
from which we further derive
and thus
where we exploit the fact that
(cf. Eigenvector Decomposition). From the geometrical background of the optimization problems (6.6) and (6.7), we know that each problem has a unique, global extremum. We further know that the global extremal values necessarily satisfy the KKT conditions (6.8) and (6.11). Because we have not excluded any global optima in our derivation to obtain (6.18) which leads to exactly two points, we know that \(x_{1}\) in (6.18) gives the global optimum for (6.7) and (6.6); we just need to select the proper one.
The minimal and maximal extensions of the ellipsoid in the first dimension, \((d=1)\), then reduce to
and
respectively. Note that these formulae are similar to (18) and (19) in [11] obtained for the maximal extensions of ellipses (2D case). If the ellipsoids were spheres (\(a=b=c=r\)), for \(\theta _{1}=\theta _{2}=\theta _{3}=0\), we obtain \( x_{1}^{\mathrm {+}}=x_{1}^{0}+abc\sqrt{b^{-2}c^{-2}-0}=x_{1}^{0}+r\).
Similarly, for \(d=2\) we derive
At first, let us express \(x_{1}\) and \(x_{3}\) as functions of \(x_{2}\). This leads to
If we enter the expressions (6.17) into (6.13), we obtain
from which we further derive
and thus
which finally leads to
Similarly, for \(d=3\) we derive
At first, let us express \(x_{1}\) and \(x_{2}\) as functions of \(x_{3}\). This leads to
If we enter the expressions (6.30) into (6.29 ), we obtain
from which we further derive
and thus
Therefore, the minimal and maximal extensions of ellipsoid i in the third dimension, \((d=3)\), reduce to
and
respectively.
1.3 Inner rectangular box
Inner rectangular boxes can be computed by maximizing the first octant volume xyz (later we multiply this by \(2^{3}\)) subject to the condition that the point (x, y, z) is on the ellipsoid and fulfills the equality
The Lagrangian function is
The KKT are
Multiplication by y and x of the first, and z and y of the second and third equation, gives
and
which can be reduced to
where we have exploited that \(z\ne 0\) and \(x\ne 0\). That implies
Together with
we thus obtain
or
and the volume maximal volume of the complete rectangular box is
which is approximately half the volume \(\pi abc\) of the ellipsoid.
1.4 Plotting ellipsoids
Knowing the rotation-shape matrix A and the origin \(\mathbf {x}^{0}\), we exploit the ellipsoid equation
to obtain \(\mathbf {x}^{\top }=(x,y,z)\) and plot the ellipsoid.
leads to
If we introduce spherical coordinates (\(\theta \),\(\varphi \)) with \(-\pi /2\le \theta \le \pi /2\) and \(0\le \varphi \le 2\pi \) we get
for the coordinates of a point (X, Y, Z) on the unit sphere, resp.,
Finally, with the scaling function \(\rho =\rho (\theta ,\varphi )\) we obtain the ellipsoid points
and from (6.33)
Note that \(\rho \) is the extension of the ellipsoid measured from the center of the ellipsoid in the direction of \((\theta ,\varphi )\). Thus, it is always positive and bounded by \(c\le \rho \le a\), if we assume that \(a\ge b\ge c\).
Considering the origin \(\mathbf {x}^{0}\), we obtain the parametric representation of the ellipsoid
Rights and permissions
About this article
Cite this article
Kallrath, J. Packing ellipsoids into volume-minimizing rectangular boxes. J Glob Optim 67, 151–185 (2017). https://doi.org/10.1007/s10898-015-0348-6
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10898-015-0348-6