Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Gianluca Costa
TwoBinPack
Scala architecture for two-dimensional packing
http://gianlucacosta.info/
Two-dimensional packing problems
Knapsack:
Strip:
There are several algorithms, but...
...what about
human reasoning?
Main requirements
We need a dedicated software tool
Create problem
instances
Let users play and
find solutions
Gather solu...
TwoBinPack – ScalaFX apps
TwoBinManager
 Create problem instances
 Export problem bundles
 Import solutions created by ...
TwoBinPack – Basic workflow
TwoBinManager TwoBinGame
Problem Bundle
User Solutions
TwoBinManager – Main window
TwoBinGame – Game window
Architecture layers
Architecture details
● Written in Scala, with just a handful of POJOs (Plain Old
Java Objects)
●
● Extensive test coverage...
Integration with external systems
TwoBinManager
External system
Standard Problem
Extensible architecture
TwoBinManager
Generators Importers
Analytics Providers
First tests – Setup
● 8 bundles, then 16
● Each bundle contains 7 problems of different
estimated difficulty – from fairly...
First tests – Result excerpts
Frame height
% of optimal
solutions
10 40%
15 21%
20 6%
Rotation
% of optimal
solutions
No 1...
Official website
http://gianlucacosta.info/TwoBinPack
Conclusions
Gnoseological
results
Enhanced
algorithms
Open source
framework
Plugins &
New apps
Special thanks
● Special thanks, for their valuable advice and
suggestions, to:
– Professor Silvano Martello
– Prof. Manue...
Elegance always matters
Thanks for your attention! ^__^!
Upcoming SlideShare
Loading in …5
×

TwoBinPack - Scala architecture for two-dimensional packing

436 views

Published on

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/

Published in: Technology
  • Be the first to comment

  • Be the first to like this

TwoBinPack - Scala architecture for two-dimensional packing

  1. 1. Gianluca Costa TwoBinPack Scala architecture for two-dimensional packing http://gianlucacosta.info/
  2. 2. Two-dimensional packing problems Knapsack: Strip:
  3. 3. There are several algorithms, but... ...what about human reasoning?
  4. 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. 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. 6. TwoBinPack – Basic workflow TwoBinManager TwoBinGame Problem Bundle User Solutions
  7. 7. TwoBinManager – Main window
  8. 8. TwoBinGame – Game window
  9. 9. Architecture layers
  10. 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. 11. Integration with external systems TwoBinManager External system Standard Problem
  12. 12. Extensible architecture TwoBinManager Generators Importers Analytics Providers
  13. 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. 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. 15. Official website http://gianlucacosta.info/TwoBinPack
  16. 16. Conclusions Gnoseological results Enhanced algorithms Open source framework Plugins & New apps
  17. 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. 18. Elegance always matters Thanks for your attention! ^__^!

×