bringing the power of localsolver to r: a real-life case-study

13
Wit Jakuczun, PhD – CEO at WLOG Solutions [email protected] Optimization with R Bringing the Power of LocalSolver to R: a Real-Life Case-Study

Upload: wit-jakuczun

Post on 12-Apr-2017

83 views

Category:

Data & Analytics


0 download

TRANSCRIPT

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

Optimization with R

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

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

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, optimization

Analytical problems:

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

One size doesnot fit allSoftware ecosystems:R, SAS, Python,JavaScript, PHP,Java, C++, …

Optimization:LocalSolver, Gurobi, IBM (ILOG), Sicstus, ECLiPSe, COIN-OR, GLPK

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

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

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

LOCALSOLVER PACKAGE

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

localsolver package architecture

Solution presentationGNU R (e.g. shiny app)

SolvingLocalSolver engine

Model buildingLSP language

Data preparationGNU R

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

LocalSolver engine

Innovative math modeling language New generation hybrid solver

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

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

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

Solving k-medoids: a comparisonRglpk• 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

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

LOGISTIC NETWORK PLANNING FOR POULTRY MEAT PRODUCER

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

Poultry meat logistic network planning problem

Factories

3 locations

Warehouses18 locations3 different sizes

Customers

3000 locations

Products 2 types (fresh, processed)thousands of SKUs

Choose optimal locations and capacities of warehouses

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

Wit Jakuczun, PhD – CEO at WLOG [email protected]

THANK YOU!