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/

84cfa5aa96405be9af4874ba266785af?s=128

Gianluca Costa

December 19, 2016
Tweet

Transcript

  1. Gianluca Costa TwoBinPack Scala architecture for two-dimensional packing http://gianlucacosta.info/

  2. Two-dimensional packing problems Knapsack: Strip:

  3. There are several algorithms, but... ...what about human reasoning?

  4. 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…
  5. 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
  6. TwoBinPack – Basic workflow TwoBinManager TwoBinGame Problem Bundle User Solutions

  7. TwoBinManager – Main window

  8. TwoBinGame – Game window

  9. Architecture layers

  10. 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
  11. Integration with external systems TwoBinManager External system Standard Problem

  12. Extensible architecture TwoBinManager Generators Importers Analytics Providers

  13. 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.
  14. 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
  15. Official website http://gianlucacosta.info/TwoBinPack

  16. Conclusions Gnoseological results Enhanced algorithms Open source framework Plugins &

    New apps
  17. Special thanks • Special thanks, for their valuable advice and

    suggestions, to: – Professor Silvano Martello – Prof. Manuel Iori – Prof. Enrico Malaguti – Dr. Maxence Delorme
  18. Elegance always matters Thanks for your attention! ^__^!