Code Monkey home page Code Monkey logo

bin-packer's People

Contributors

padam87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bin-packer's Issues

Optimization

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 :)

CODE NOT WORKING

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

Did not fit blocks and rotate problem

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.