Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
Optimization with R
Bringing the Power of LocalSolver to R: a
Real-Life Case-Study
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
Diversity challenges at WLOG Solutions
• finance, logistics, production, telecoms, publicIndustries:
• on-site, near shore, off shoreDelivery models:
• consulting, solution implementation, trainingContract types:
• data fusion, prediction, visualization, simulation,
optimizationAnalytical problems:
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
One size does
not fit all
Software ecosystems:
R, SAS, Python,
JavaScript, PHP,
Java, C++, …
Optimization:
LocalSolver, Gurobi, IBM (ILOG),
Sicstus, ECLiPSe, COIN-OR, GLPK
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
Optimization tool heaven for R
• Seamless to wrap into R processing workflow
• Separation of model and data specification
• High level definition of optimization task
• Swiss army knife (we would love to get a free
lunch )
• Reliable support and continued development
• Free and open-source
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
LOCALSOLVER PACKAGE
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
localsolver package architecture
Solution presentation
GNU R (e.g. shiny app)
Solving
LocalSolver engine
Model building
LSP language
Data preparation
GNU R
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
LocalSolver engine
Innovative math modeling language New generation hybrid solver
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
Why localsolver package?
Current optimization
packages
• Many tools for one task
• Low level API
• Low performance
• Restricted modelling
approach
localsolver package
• One tool for many tasks
• High-level API
• High performance
• Wide range of
applications
• What we got:
• Shorter projects
• Simpler to debug
• Lower delivery costs
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
Solving k-medoids: a comparison
Rglpk
• 45 LOC
• 1 hour including „stupid”
bugs
• Need to populate
constraint matrix from R’s
data structures
• No high-level math
modelling language
localsolver
• 18 LOC
• 15 minutes spent mostly
inventing model
• Staying with R’s data
structures
• Flexible high-level math
modelling language
http://rsnippets.blogspot.com/2014/07/comparing-localsolver-with-rglpk-on-k.html
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
LOGISTIC NETWORK PLANNING
FOR POULTRY MEAT PRODUCER
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
Poultry meat logistic network planning
problem
Factories
3 locations
Warehouses
18 locations
3 different sizes
Customers
3000 locations
Products
2 types (fresh,
processed)
thousands of SKUs
Choose optimal locations and
capacities of warehouses
Wit Jakuczun, PhD – CEO at WLOG Solutions
wit.jakuczun@wlogsolutions.pl
THANK YOU!

Bringing the Power of LocalSolver to R: a Real-Life Case-Study

  • 1.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl Optimization with R Bringing the Power of LocalSolver to R: a Real-Life Case-Study
  • 2.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl Diversity challenges at WLOG Solutions • finance, logistics, production, telecoms, publicIndustries: • on-site, near shore, off shoreDelivery models: • consulting, solution implementation, trainingContract types: • data fusion, prediction, visualization, simulation, optimizationAnalytical problems:
  • 3.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl
  • 4.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl One size does not fit all Software ecosystems: R, SAS, Python, JavaScript, PHP, Java, C++, … Optimization: LocalSolver, Gurobi, IBM (ILOG), Sicstus, ECLiPSe, COIN-OR, GLPK
  • 5.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl Optimization tool heaven for R • Seamless to wrap into R processing workflow • Separation of model and data specification • High level definition of optimization task • Swiss army knife (we would love to get a free lunch ) • Reliable support and continued development • Free and open-source
  • 6.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl LOCALSOLVER PACKAGE
  • 7.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl localsolver package architecture Solution presentation GNU R (e.g. shiny app) Solving LocalSolver engine Model building LSP language Data preparation GNU R
  • 8.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl LocalSolver engine Innovative math modeling language New generation hybrid solver
  • 9.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl Why localsolver package? Current optimization packages • Many tools for one task • Low level API • Low performance • Restricted modelling approach localsolver package • One tool for many tasks • High-level API • High performance • Wide range of applications • What we got: • Shorter projects • Simpler to debug • Lower delivery costs
  • 10.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl Solving k-medoids: a comparison Rglpk • 45 LOC • 1 hour including „stupid” bugs • Need to populate constraint matrix from R’s data structures • No high-level math modelling language localsolver • 18 LOC • 15 minutes spent mostly inventing model • Staying with R’s data structures • Flexible high-level math modelling language http://rsnippets.blogspot.com/2014/07/comparing-localsolver-with-rglpk-on-k.html
  • 11.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl LOGISTIC NETWORK PLANNING FOR POULTRY MEAT PRODUCER
  • 12.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl Poultry meat logistic network planning problem Factories 3 locations Warehouses 18 locations 3 different sizes Customers 3000 locations Products 2 types (fresh, processed) thousands of SKUs Choose optimal locations and capacities of warehouses
  • 13.
    Wit Jakuczun, PhD– CEO at WLOG Solutions wit.jakuczun@wlogsolutions.pl THANK YOU!

Editor's Notes

  • #4 Tego nie łapię – toolbox?
  • #5 Jakie story za tym slajdem? Ja bym jednak pokazał, że analityka bez optymalizacji nie jest pełna.
  • #6 Ostatnie to nie do końca bo LocalSolver jest proprietrary
  • #9 O Innovation24 nie warto wspomnieć?
  • #10 Jakaś fajniesza prezentacja?
  • #11 Te ni