Imagine yourself moving to another place, and therefore, you need to pack all of your belongings into moving boxes with some capacity. In the classical bin packing model, you would try to minimize the number of boxes, knowing the exact size of each item you want to pack. In the online bin packing problem, you need to start packing the first item into a box, without knowing what other stuff is upcoming. Both settings are somewhat unrealistic, as you are likely not willing to measure the exact size of all your belongings before packing the first item, but you are not completely clueless about what other stuff you have when you start packing. In this article, we introduce the online bin packing with estimates model, where you start packing with a rough idea about the upcoming item sizes in mind. In this model, an algorithm receives a size estimate for every item in the input list together with an accuracy factor $δ$ in advance. Just as for regular online bin packing the items are then presented iteratively. The actual sizes of the items are allowed to deviate from the size estimate by a factor of $δ$. Once the actual size of an item is revealed the algorithm has to make an irrevocable
In this paper, we study the {\em green bin packing} (GBP) problem where $β\ge 0$ and $G \in [0, 1]$ are two given values as part of the input. The energy consumed by a bin is $\max \{0, β(x-G) \}$ where $x$ is the total size of the items packed into the bin. The GBP aims to pack all items into a set of unit-capacity bins so that the number of bins used plus the total energy consumption is minimized. When $β= 0$ or $G = 1$, GBP is reduced to the classic bin packing (BP) problem. In the {\em constrained green bin packing} (CGBP) problem, the objective is to minimize the number of bins used to pack all items while the total energy consumption does not exceed a given upper bound $U$. We present an APTAS and a $\frac 32$-approximation algorithm for both GBP and CGBP, where the ratio $\frac 32$ matches the lower bound of BP. Keywords: Green bin packing; constrained green bin packing; approximation scheme; offline algorithms
Robotic bin packing is very challenging, especially when considering practical needs such as object variety and packing compactness. This paper presents SDF-Pack, a new approach based on signed distance field (SDF) to model the geometric condition of objects in a container and compute the object placement locations and packing orders for achieving a more compact bin packing. Our method adopts a truncated SDF representation to localize the computation, and based on it, we formulate the SDF minimization heuristic to find optimized placements to compactly pack objects with the existing ones. To further improve space utilization, if the packing sequence is controllable, our method can suggest which object to be packed next. Experimental results on a large variety of everyday objects show that our method can consistently achieve higher packing compactness over 1,000 packing cases, enabling us to pack more objects into the container, compared with the existing heuristics under various packing settings.
We study three fundamental three-dimensional (3D) geometric packing problems: 3D (Geometric) Bin Packing (3D-BP), 3D Strip Packing (3D-SP), and Minimum Volume Bounding Box (3D-MVBB), where given a set of 3D (rectangular) cuboids, the goal is to find an axis-aligned nonoverlapping packing of all cuboids. In 3D-BP, we need to pack the given cuboids into the minimum number of unit cube bins. In 3D-SP, we need to pack them into a 3D cuboid with a unit square base and minimum height. Finally, in 3D-MVBB, the goal is to pack into a cuboid box of minimum volume. It is NP-hard to even decide whether a set of rectangles can be packed into a unit square bin -- giving an (absolute) approximation hardness of 2 for 3D-BP and 3D-SP. The previous best (absolute) approximation for all three problems is by Li and Cheng (SICOMP, 1990), who gave algorithms with approximation ratios of 13, $46/7$, and $46/7+\varepsilon$, respectively, for 3D-BP, 3D-SP, and 3D-MVBB. We provide improved approximation ratios of 6, 6, and $3+\varepsilon$, respectively, for the three problems, for any constant $\varepsilon > 0$. For 3D-BP, in the asymptotic regime, Bansal, Correa, Kenyon, and Sviridenko (Math.~Oper.~Res
Optimal charging of electric vehicle (EVs) depends heavily on reliable sensor measurements from the battery pack to the cloud-controller of the smart charging station. However, an adversary could corrupt the voltage sensor data during transmission, potentially causing local to wide-scale disruptions. Therefore, it is essential to detect sensor cyberattacks in real-time to ensure secure EV charging, and the developed algorithms must be readily adaptable to variations, including pack configurations. To tackle these challenges, we propose adaptable fine-tuning of an XgBoost-based cell-level model using limited pack-level data to use for voltage prediction and residual generation. We used battery cell and pack data from high-fidelity charging experiments in PyBaMM and `liionpack' package to train and test the detection algorithm. The algorithm's performance has been evaluated for two large-format battery packs under sensor swapping and replay attacks. The simulation results also highlight the adaptability and efficacy of our proposed detection algorithm.
The automation of warehouse operations is crucial for improving productivity and reducing human exposure to hazardous environments. One operation frequently performed in warehouses is bin-packing where items need to be placed into containers, either for delivery to a customer, or for temporary storage in the warehouse. Whilst prior bin-packing works have largely been focused on packing items into empty containers and have adopted collision-free strategies, it is often the case that containers will already be partially filled with items, often in suboptimal arrangements due to transportation about a warehouse. This paper presents a contact-aware packing approach that exploits purposeful interactions with previously placed objects to create free space and enable successful placement of new items. This is achieved by using a contact-based multi-object trajectory optimizer within a model predictive controller, integrated with a physics-aware perception system that estimates object poses even during inevitable occlusions, and a method that suggests physically-feasible locations to place the object inside the container.
The Geometric Bin Packing (GBP) problem is a generalization of Bin Packing where the input is a set of $d$-dimensional rectangles, and the goal is to pack them into unit $d$-dimensional cubes efficiently. It is NP-Hard to obtain a PTAS for the problem, even when $d=2$. For general $d$, the best-known approximation algorithm has an approximation guarantee exponential in $d$, while the best hardness of approximation is still a small constant inapproximability from the case when $d=2$. In this paper, we show that the problem cannot be approximated within $d^{1-ε}$ factor unless NP=P. Recently, $d$-dimensional Vector Bin Packing, a closely related problem to the GBP, was shown to be hard to approximate within $Ω(\log d)$ when $d$ is a fixed constant, using a notion of Packing Dimension of set families. In this paper, we introduce a geometric analog of it, the Geometric Packing Dimension of set families. While we fall short of obtaining similar inapproximability results for the Geometric Bin Packing problem when $d$ is fixed, we prove a couple of key properties of the Geometric Packing Dimension which highlight fundamental differences between Geometric Bin Packing and Vector Bin Packing
While rectangular and box-shaped objects dominate the classic discourse of theoretic investigations, a fascinating frontier lies in packing more complex shapes. Given recent insights that convex polygons do not allow for constant competitive online algorithms for diverse variants under translation, we study orthogonal polygons, in particular of small complexity. For translational packings of orthogonal 6-gons, we show that the competitive ratio of any online algorithm that aims to pack the items into a minimal number of unit bins is in $Ω(n / \log n)$, where $n$ denotes the number of objects. In contrast, we show that constant competitive algorithms exist when the orthogonal 6-gons are symmetric or small. For (orthogonally convex) orthogonal 8-gons, we show that the trivial $n$-competitive algorithm, which places each item in its own bin, is best-possible, i.e., every online algorithm has an asymptotic competitive ratio of at least $n$. This implies that for general orthogonal polygons, the trivial algorithm is best possible. Interestingly, for packing degenerate orthogonal polygons (with thickness $0$), called skeletons, the change in complexity is even more drastic. While constan
Post-training quantization (PTQ) has evolved as a prominent solution for compressing complex models, which advocates a small calibration dataset and avoids end-to-end retraining. However, most existing PTQ methods employ block-wise reconstruction, which neglects cross-block dependency and exhibits a notable accuracy drop in low-bit cases. To address these limitations, this paper presents a novel PTQ method, dubbed Pack-PTQ. First, we design a Hessian-guided adaptive packing mechanism to partition blocks into non-overlapping packs, which serve as the base unit for reconstruction, thereby preserving the cross-block dependency and enabling accurate quantization parameters estimation. Second, based on the pack configuration, we propose a mixed-precision quantization approach to assign varied bit-widths to packs according to their distinct sensitivities, thereby further enhancing performance. Extensive experiments on 2D image and 3D point cloud classification tasks, using various network architectures, demonstrate the superiority of our method over the state-of-the-art PTQ methods.
The problem of packing of equal disks (or circles) into a rectangle is a fundamental geometric problem. (By a packing here we mean an arrangement of disks in a rectangle without overlapping.) We consider the following algorithmic generalization of the equal disk packing problem. In this problem, for a given packing of equal disks into a rectangle, the question is whether by changing positions of a small number of disks, we can allocate space for packing more disks. More formally, in the repacking problem, for a given set of $n$ equal disks packed into a rectangle and integers $k$ and $h$, we ask whether it is possible by changing positions of at most $h$ disks to pack $n+k$ disks. Thus the problem of packing equal disks is the special case of our problem with $n=h=0$. While the computational complexity of packing equal disks into a rectangle remains open, we prove that the repacking problem is NP-hard already for $h=0$. Our main algorithmic contribution is an algorithm that solves the repacking problem in time $(h+k)^{O(h+k)}\cdot |I|^{O(1)}$, where $I$ is the input size. That is, the problem is fixed-parameter tractable parameterized by $k$ and $h$.
We investigate how forces spread through frictionless granular packs at the jamming transition. Previous work has indicated that such packs are isostatic, and thus obey a null stress law which, independent of the packing history, causes rays of stress to propagate away from a point force at oblique angles. Prior verifications of the null stress law have used a sequential packing method which yields packs with anisotropic packing histories. We create packs without this anisotropy, and then later break the symmetry by adding a boundary. Our isotropic packs are very sensitive, and their responses to point forces diverge wildly, indicating that they cannot be described by any continuum stress model. We stabilize the packs by supplying an additional boundary, which makes the response much more regular. The response of the stabilized packs resembles what one would expect in a hyperstatic pack, despite the isostatic bulk. The expected stress rays characteristic of null stress behavior are not present. This suggests that isostatic packs do not need to obey a null stress condition. We argue that the rays may arise instead from more simple geometric considerations, such as preferred contact
Monitoring of internal short circuit (ISC) in Lithium-ion battery packs is imperative to safe operations, optimal performance, and extension of pack life. Since ISC in one of the modules inside a battery pack can eventually lead to thermal runaway, it is crucial to detect its early onset. However, the inaccuracy and aging variability of battery models and the unavailability of adequate ISC datasets pose several challenges for both model-based and data-driven approaches. Thus, in this paper, we proposed a model-free Koopman Mode-based module-level ISC detection algorithm for battery packs. The algorithm adopts two parallel Koopman mode generation schemes with the Arnoldi algorithm to capture the Kullback-Leibler divergence-based distributional deviations in Koopman mode statistics in the presence of ISC. Our proposed algorithm utilizes module-level voltage measurements to accurately identify the shorted battery module of the pack without using specific battery models or pre-training with historical battery data. Furthermore, we presented two case studies on shorted battery module detection under both resting and charging conditions. The simulation results illustrated the sensitivity
Granular matter takes many paths to pack. Gentle compression, compaction or repetitive tapping can happen in natural and industrial processes. The path influences the packing microstructure, and thus macroscale properties, particularly for frictional grains. We perform discrete element modeling simulations to construct packings of frictional spheres implementing a range of stress-controlled protocols with 3D periodic boundary conditions. A volume-controlled over-compression method is compared to four stress-controlled methods, including over-compression and release, gentle under-compression and cyclical compression and release. The packing volume fraction of each method depends on the pressure, initial kinetic energy and protocol parameters. A non-monotonic pressure dependence in the volume fraction, but not the coordination number occurs when dilute particles initialized with a non-zero kinetic energy are compressed, but can be reduced with the inclusion of drag. The fraction of frictional contacts correlates with the volume fraction minimum. Packings were cyclically compressed 1000 times. Response to compression depends on pressure; low pressure packings have a constant volume fr
We introduce API Pack, a massive multi-programming language dataset containing over one million instruction-API calls for improving the API call generation capabilities of large language models. Our evaluation highlights three key findings: First, fine-tuning on API Pack enables open-source models to outperform GPT-3.5 and GPT-4 in generating code for entirely new API calls. We show this by fine-tuning CodeLlama-13B on 20,000 Python instances from API Pack. Second, fine-tuning on a large dataset in one language, combined with smaller datasets from others, improves API generation accuracy across multiple languages. Third, we confirm the benefits of larger datasets for API generalization, as increasing fine-tuning data to one million instances enhances generalization to new APIs. To support further research, we open-source the API Pack dataset, trained model, and code at https://github.com/zguo0525/API-Pack.
It is commonly believed that the most efficient way to pack a finite number of equal-sized spheres is by arranging them tightly in a cluster. However, mathematicians have conjectured that a linear arrangement may actually result in the densest packing. Here, our combined experimental and simulation study provides a realization of the finite sphere packing problem by studying non-close-packed arrangements of colloids in a flaccid lipid vesicle. We map out a state diagram displaying linear, planar and cluster conformations of spheres, as well as bistable states which alternate between cluster-plate and plate-linear conformations due to membrane fluctuations. Finally, by systematically analyzing truncated polyhedral packings, we identify clusters of $56\leq N \leq 70$ spheres, excluding $N=57$ and 63, that pack more efficiently than linear arrangements.
In the classic circle packing problem, one asks whether a given set of circles can be packed into a given container. Packing problems like this have been shown to be $\mathsf{NP}$-hard. In this paper, we present new sufficient conditions for packing circles into square and triangular containers, using only the sum of the circles' areas: For square containers, it is possible to pack any set of circles with a combined area of up to approximately 53.90% of the square's area. And when the container is a right or obtuse triangle, any set of circles whose combined area does not exceed the triangle's incircle can be packed. These area conditions are tight, in the sense that for any larger areas, there are sets of circles which cannot be packed. Similar results have long been known for squares, but to the best of our knowledge, we give the first results of this type for circular objects. Our proofs are constructive: We describe a versatile, divide-and-conquer-based algorithm for packing circles into various container shapes with optimal worst-case density. It employs an elegant subdivision scheme that recursively splits the circles into two groups and then packs these into subcontainers. W
The problem of packing smaller objects within a larger object has been of interest since decades. In these problems, in addition to the requirement that the smaller objects must lie completely inside the larger objects, they are expected to not overlap or have minimum overlap with each other. Due to this, the problem of packing turns out to be a non-convex problem, obtaining whose optimal solution is challenging. As such, several heuristic approaches have been used for obtaining sub-optimal solutions in general, and provably optimal solutions for some special instances. In this paper, we propose a novel encoder-decoder architecture consisting of an encoder block, a perturbation block and a decoder block, for packing identical circles within a larger circle. In our approach, the encoder takes the index of a circle to be packed as an input and outputs its center through a normalization layer, the perturbation layer adds controlled perturbations to the center, ensuring that it does not deviate beyond the radius of the smaller circle to be packed, and the decoder takes the perturbed center as input and estimates the index of the intended circle for packing. We parameterize the encoder
As neural networks are increasingly employed in machine learning practice, how to efficiently share limited training resources among a diverse set of model training tasks becomes a crucial issue. To achieve better utilization of the shared resources, we explore the idea of jointly training multiple neural network models on a single GPU in this paper. We realize this idea by proposing a primitive, called pack. We further present a comprehensive empirical study of pack and end-to-end experiments that suggest significant improvements for hyperparameter tuning. The results suggest: (1) packing two models can bring up to 40% performance improvement over unpacked setups for a single training step and the improvement increases when packing more models; (2) the benefit of the pack primitive largely depends on a number of factors including memory capacity, chip architecture, neural network structure, and batch size; (3) there exists a trade-off between packing and unpacking when training multiple neural network models on limited resources; (4) a pack-aware Hyperband is up to 2.7x faster than the original Hyperband, with this improvement growing as memory size increases and subsequently the
This study experimentally investigates the temperature distribution and behavior of a 48V Lithium-Ion (Li-ion) battery pack during two charge-discharge cycles using 25 thermocouples. Results indicate that better convective heat transfer occurs at the external surfaces of the pack, while middle cells reach maximum temperatures. Differences are also observed in the behavior of the three modules. The discharge cycle shows a temperature rise of 5.8°C with a pack temperature gradient increasing from 1.3°C to 2.7°C. The study highlights the importance of assessing the thermal behavior of each module and the complexity of the Li-ion battery pack system. Findings on the battery cells, modules, and pack in the same study can provide valuable insights for designing efficient cooling systems for Li-ion battery packs.
We continue the study of two recently introduced bin packing type problems, called bin packing with clustering, and online bin packing with delays. A bin packing input consists of items of sizes not larger than 1, and the goal is to partition or pack them into bins, where the total size of items of every valid bin cannot exceed 1. In bin packing with clustering, items also have colors associated with them. A globally optimal solution can combine items of different colors in bins, while a clustered solution can only pack monochromatic bins. The goal is to compare a globally optimal solution to an optimal clustered solution, under certain constraints on the coloring provided with the input. We show close bounds on the worst-case ratio between these two costs, called "the price of clustering", improving and simplifying previous results. Specifically, we show that the price of clustering does not exceed 1.93667, improving over the previous upper bound of 1.951, and that it is at least 1.93558, improving over the previous lower bound of 1.93344. In online bin packing with delays, items are presented over time. Items may wait to be packed, and an algorithm can create a new bin at any tim