padam87 / bin-packer Goto Github PK
View Code? Open in Web Editor NEW2D bin packing for PHP, with rotation and growth function
License: MIT License
2D bin packing for PHP, with rotation and growth function
License: MIT License
Hello,
Great job :D
Could add a little optimization : these algorithm can be used for truck loading. For 240 width you can put 2 pallets 120x80 or 3 pallets 80x120.
Based on that, if your goal is to optimize the Load Meter, the following code should return [0,0][80,0][160,0] (getX, getY of each block), but it gives [0,0][120,0][0,80]. In the first result, LDM would be 120, in the second it would be 160.
$bin = new Bin(240, 300); $blocks = [ new Block(120, 80, true), new Block(120, 80, true), new Block(120, 80, true), ];
Just an idea :)
when i download the code and try to run the files found in the tests folder i get this error
Fatal error: Uncaught Error: Class "PHPUnit\Framework\TestCase" not found
is their something i need to have toi run them that i am missing please help me i need this code to work for me
Some blocks did not fit in a image
How can I make the unplaced blocks in another image fall?
And I also placed several blocks, but I did not see any rotation or difference
For example:
In this image, the blocks with a red cross can fit in the red rectangle
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.