Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

Two-dimensional packing problems Knapsack: Strip:

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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…

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

TwoBinPack – Basic workflow TwoBinManager TwoBinGame Problem Bundle User Solutions

Slide 7

Slide 7 text

TwoBinManager – Main window

Slide 8

Slide 8 text

TwoBinGame – Game window

Slide 9

Slide 9 text

Architecture layers

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

Integration with external systems TwoBinManager External system Standard Problem

Slide 12

Slide 12 text

Extensible architecture TwoBinManager Generators Importers Analytics Providers

Slide 13

Slide 13 text

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.

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

Official website http://gianlucacosta.info/TwoBinPack

Slide 16

Slide 16 text

Conclusions Gnoseological results Enhanced algorithms Open source framework Plugins & New apps

Slide 17

Slide 17 text

Special thanks ● Special thanks, for their valuable advice and suggestions, to: – Professor Silvano Martello – Prof. Manuel Iori – Prof. Enrico Malaguti – Dr. Maxence Delorme

Slide 18

Slide 18 text

Elegance always matters Thanks for your attention! ^__^!