Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TwoBinPack - Scala architecture for two-dimensional packing

TwoBinPack - Scala architecture for two-dimensional packing

Operations Research is the science and art of solving practical - often very difficult - problems with mathematical elegance, minimalism and efficiency.

Two-dimensional packing consists of paramount, well-known classes of problems that can arise in a wide variety of contexts - from warehouse stocking to cargo loading, or wood craftsmanship and page layouts, ...

TwoBinPack is a comprehensive Scala architecture, employing hybrid OOP-FP techniques, designed to interactively tackle the above problems and study - via dedicated, extensible analytics tool - how they are usually solved by people, therefore enabling both practical solving and long-term statistical analysis, to gather further insight on the topic.

Last but not least, it is my MSc project in Computer Engineering! ^__^

Official website: http://gianlucacosta.info/TwoBinPack/

Gianluca Costa

December 19, 2016

More Decks by Gianluca Costa

Other Decks in Programming


  1. Main requirements We need a dedicated software tool Create problem

    instances Let users play and find solutions Gather solutions and consult analytics We need to…
  2. TwoBinPack – ScalaFX apps TwoBinManager  Create problem instances 

    Export problem bundles  Import solutions created by TwoBinGame  Consult analytics TwoBinGame  Play with two-dimensional packing problems  Create solution files for TwoBinManager
  3. Architecture details • Written in Scala, with just a handful

    of POJOs (Plain Old Java Objects) • • Extensive test coverage; tests are all based on the expressive Scalatest framework • Open source, published on GitHub under the GPLv3 license OOP FP Hybrid Architecture
  4. First tests – Setup • 8 bundles, then 16 •

    Each bundle contains 7 problems of different estimated difficulty – from fairly easy (but not trivial) to very difficult • Each problem has a time limit, according to the above difficulty • User base of ~200 students, at the universities of Bologna and Reggio Emilia These data are courtesy of the Operations Research groups at Unibo and Unimore.
  5. First tests – Result excerpts Frame height % of optimal

    solutions 10 40% 15 21% 20 6% Rotation % of optimal solutions No 19% Yes 26% Time limit (in minutes) Average % gap from optimal solution 4 9.8% 5 8.7% 6 6.6% 7 6.7% These data are courtesy of the Operations Research groups at Unibo and Unimore. Medium-difficulty problem, assigned to everyone
  6. Special thanks • Special thanks, for their valuable advice and

    suggestions, to: – Professor Silvano Martello – Prof. Manuel Iori – Prof. Enrico Malaguti – Dr. Maxence Delorme