Download the PHP package keydev/laff-analyzer without Composer
On this page you can find all versions of the php package keydev/laff-analyzer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download keydev/laff-analyzer
More information about keydev/laff-analyzer
Files in keydev/laff-analyzer
Package laff-analyzer
Short Description PHP Implementation of the Largest Area Fit First (LAFF) 3D (three dimension) box packing algorithm
License MIT
Informations about the package laff-analyzer
PHP-LAFF Analyzer
PHP Implementation of the Largest Area Fit First (LAFF) 3D (three dimensions: length, width, height) box packing algorithm.
With this library you can easily:
- get the required dimensions of the container that will fit all given packages,
- split packages per defined amount of containers,
- split packages per layer in a given container,
- get information about the wasted amount of space per container and per layer,
- get the number of remaining packages that couldn't fit into given containers,
Algorithm definition
Implementation of the used algorithm was defined by M. Zahid Gürbüz, Selim Akyokus, Ibrahim Emiroglu, and Aysun Güran in a paper called "An Efficient Algorithm for 3D Rectangular Box Packing".
Installation
Note To use this library you need PHP in version 8.1+
Usage
Get the size of the required container for selected packages
Check how many packages can be fitter into a given container
Development
To install dependencies, launch the following commands:
Run Tests
To execute full test suite, static analyse or coding style fixed, launch the following commands:
Kudos
There is already a library for LAFF in PHP: Cloudstek/php-laff; while both use the same algorithm, the internals is different. The main difference between those libraries is that this one can work on an array of containers. I want to say "thank you" for the work on that library in the past!