Upload
gianluca-costa
View
171
Download
1
Embed Size (px)
Citation preview
Gianluca Costa
TwoBinPackScala 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 probleminstances
Let users play andfind solutions
Gather solutions andconsult analytics
We need to…
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
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; tests are all based on the expressive Scalatest framework
● Open source, published on GitHub under the GPLv3 license
OOP FPHybrid
Architecture
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 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.
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
Conclusions
Gnoseologicalresults
Enhanced algorithms
Open sourceframework
Plugins &New apps
Special thanks
● Special thanks, for their valuable advice and suggestions, to:
– Professor Silvano Martello
– Prof. Manuel Iori
– Prof. Enrico Malaguti
– Dr. Maxence Delorme
Elegance always mattersThanks for your attention! ^__^!