Wit Jakuczun, PhD – CEO at WLOG Solutions [email protected] Optimization with R...

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

Transcript of Wit Jakuczun, PhD – CEO at WLOG Solutions [email protected] Optimization with R...

Page 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.

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

Optimization with R

Bringing the Power of LocalSolver to R: a

Real-Life Case-Study

Page 2: 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 [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, optimizationAnalytical problems:

Page 3: 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 [email protected]

Page 4: 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 [email protected]

One size doesnot fit all

Software ecosystems:R, SAS, Python,

JavaScript, PHP,

Java, C++, …

Optimization:LocalSolver, Gurobi, IBM (ILOG),

Sicstus, ECLiPSe, COIN-OR, GLPK

Page 5: 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 [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: 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 [email protected]

LOCALSOLVER PACKAGE

Page 7: 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 [email protected]

localsolver package architecture

Solution presentationGNU R (e.g. shiny app)

SolvingLocalSolver engine

Model buildingLSP language

Data preparationGNU R

Page 8: 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 [email protected]

LocalSolver engine

Innovative math modeling language New generation hybrid solver

Page 9: 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 [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: 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 [email protected]

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

Page 11: 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 [email protected]

LOGISTIC NETWORK PLANNING FOR POULTRY MEAT PRODUCER

Page 12: 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 [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: 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 [email protected]

THANK YOU!