1
DEPLOYING GUROBI MODELS USING THE
OPALYTICS CLOUD PLATFORM
David Simchi-Levi Pete Cacioppi
Professor MIT Chief Scientist Opalytics
Chairman Opalytics
October 20th 2015
2 Confidential ©Copyright 2015 | Opalytics Inc.
Agenda
• Introduction
• Supply Chain Risk Optimization
• Opalytics Network Risk
• End to End Analytics Development
• Summary
• Q&A
3 Confidential ©Copyright 2015 | Opalytics Inc.
Challenges • Need to solve Unique problems
– One size does not fit all
– New opportunities
• Reliable analytics and processes
– Data validation
– Tested analytics
• Ability to quickly deploy to users on a light platform
– Easy to use and train interface
– Data and Scenario management
• Provide Easy integration with other systems
– Extract corporate data
• Role-based access to information
– Ability to share results in different formats
4 Confidential ©Copyright 2015 | Opalytics Inc.
Cloud based services Off-the-Shelf
ApplicationsCustom Solutions
Opalytics Cloud Platform (OCP)
• Simple to deploy• ETL services• File management• Dynamically allocate
resources(solvers, storage)
• Specialized analytics to specific problems
• Deploy various solutions in the same environment
• Network Risk• Multi Echelon
Inventory• Network Design• Segmentation
A Platform to Build Analytic Applications that Drive Business DecisionsA Platform to Build Analytic Applications that Drive Business DecisionsA Platform to Build Analytic Applications that Drive Business DecisionsA Platform to Build Analytic Applications that Drive Business Decisions
5 Confidential ©Copyright 2015 | Opalytics Inc.
Opalytics Cloud Platform Features
ERP
BI
Excel
JSON
Excel
CSV
JSON
External
NoSQL
Database
Data
Validation
Geo-coding
Solver
Identification
File and
scenario
Management
User
Management
Roles and
Authentication
Solvers
Dynamic Solver
Deployment
Solution
Reports &
Visualization
External
Systems
Data Editing
and
Validation
Graphics
and
maps
SolverSolver
(i) Public Cloud; (ii) Private Cloud; (iii) Corporate (i) Public Cloud; (ii) Private Cloud; (iii) Corporate (i) Public Cloud; (ii) Private Cloud; (iii) Corporate (i) Public Cloud; (ii) Private Cloud; (iii) Corporate
6 Confidential ©Copyright 2015 | Opalytics Inc.
Visualization
7 Confidential ©Copyright 2015 | Opalytics Inc.
Agenda
• Introduction
• Supply Chain Risk Optimization
• Opalytics Network Risk
• End to End Analytics Development
• Summary
• Q&A
8 Confidential ©Copyright 2015 | Opalytics Inc.
Managing Supply Chain Risk: Challenge
• Very difficult to predict many sources of risk,
especially the unknown-unknown
• Impact of disruption can be devastating
• Large investment in identifying every possible risk in
the supply chain
• Existing tools and techniques have been inadequate
– Mostly ad-hoc, intuition, gut feeling
– Exposure to risk may reside in unlikely places
– May lead to the wrong actions and waste resources
– No ability to prioritize mitigation investment
8
9 Confidential ©Copyright 2015 | Opalytics Inc.
Illustrating Our Approach
Engine Plants
Contract
Manufacturers
Assembly
Suppliers
Steel Bar
Suppliers
Raw Chemical
Suppliers
Sheet Steel
Suppliers
• TimeTimeTimeTime----ToToToTo----Recover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruption
Assembly
Plants
Stamping Plants
2015 New England Supply Chain Conference & Educational Exhibition
10 Confidential ©Copyright 2015 | Opalytics Inc.
Illustrating Our Approach
Engine Plants
Contract
Manufacturers
Assembly
Suppliers
Steel Bar
Suppliers
Raw Chemical
Suppliers
Sheet Steel
Suppliers
• TimeTimeTimeTime----ToToToTo----Recover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruption
Assembly
Plants
Stamping Plants
TTR =2 Weeks
2015 New England Supply Chain Conference & Educational Exhibition
11 Confidential ©Copyright 2015 | Opalytics Inc.
Illustrating Our Approach
Engine Plants
Contract
Manufacturers
Assembly
Suppliers
Steel Bar
Suppliers
Raw Chemical
Suppliers
Sheet Steel
Suppliers
• TimeTimeTimeTime----ToToToTo----Recover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruption
Assembly
Plants
Stamping Plants
2 Weeks
1 Week2 Weeks
2 Weeks
2 Weeks
TTR =2 Weeks
2 Weeks
2015 New England Supply Chain Conference & Educational Exhibition
12 Confidential ©Copyright 2015 | Opalytics Inc.
• TimeTimeTimeTime----ToToToTo----Recover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruption
• Performance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measure
Illustrating Our Approach
Engine Plants
Contract
Manufacturers
Assembly
Suppliers
Steel Bar
Suppliers
Raw Chemical
Suppliers
Sheet Steel
Suppliers
Assembly
Plants
Stamping Plants
2 Weeks
1 Week2 Weeks
2 Weeks
2 Weeks
TTR =2 Weeks
2 Weeks
2015 New England Supply Chain Conference & Educational Exhibition
13 Confidential ©Copyright 2015 | Opalytics Inc.
2 Weeks$1.5B
1 Week$100M
• TimeTimeTimeTime----ToToToTo----Recover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruption
• Performance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measure
Illustrating Our Approach
Engine Plants
Contract
Manufacturers
Assembly
Suppliers
Steel Bar
Suppliers
Raw Chemical
Suppliers
Sheet Steel
Suppliers
Assembly
Plants
Stamping Plants
2 Weeks
2 Weeks
2 Weeks
TTR =2 Weeks
2 Weeks
2 Weeks$400M
2 Weeks$100M
2 Weeks$2.5B
TTR =2 WeeksPI = $400M
2 Weeks$300M
2015 New England Supply Chain Conference & Educational Exhibition
14 Confidential ©Copyright 2015 | Opalytics Inc.
2 Weeks$1.5B
• TimeTimeTimeTime----ToToToTo----Recover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruption
• Performance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measure
• Risk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenariosRisk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenariosRisk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenariosRisk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenarios
Illustrating Our Approach
Engine Plants
Contract
Manufacturers
Assembly
Suppliers
Steel Bar
Suppliers
Raw Chemical
Suppliers
Sheet Steel
Suppliers
Assembly
Plants
Stamping Plants
2 Weeks
1 Week
2 Weeks
2 Weeks
TTR =2 Weeks
2 Weeks
2 Weeks$400M
1 Week$100M
2 Weeks$100M
2 Weeks$2.5B
TTR =2 WeeksPI = $400M
2 Weeks$300M
2015 New England Supply Chain Conference & Educational Exhibition
15 Confidential ©Copyright 2015 | Opalytics Inc.
2 Weeks0.6
• TimeTimeTimeTime----ToToToTo----Recover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruptionRecover (TTR): The time it takes to recover to full functionality after a disruption
• Performance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measurePerformance Impact (PI): Impact of a disruption for the duration of TTR on a given performance measure
• Risk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenariosRisk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenariosRisk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenariosRisk Exposure Index (REI): Normalizes the PI by the maximum PI over all disruption scenarios
Illustrating Our Approach
Engine Plants
Contract
Manufacturers
Assembly
Suppliers
Steel Bar
Suppliers
Raw Chemical
Suppliers
Sheet Steel
Suppliers
Assembly
Plants
Stamping Plants
2 Weeks
1 Week
2 Weeks
2 Weeks
TTR =2 Weeks
2 Weeks
2 Weeks0.16
1 Week0.04
2 Weeks0.04
2 Weeks1.0
TTR =2 WeeksREI = 0.16
2 Weeks0.12
2015 New England Supply Chain Conference & Educational Exhibition
16 Confidential ©Copyright 2015 | Opalytics Inc.
Benefits of using the Risk Exposure Index
• It provides a $ measure of risk--it estimate the cost of risk
• It is based on the entire network rather
• It avoids the need to forecast the unknown-unknown;
• It forces a discussion to understand why TTR for similar
facilities or suppliers is different
• It forces a process to reduce TTR in various stages of the
supply chain;
• It makes sure you have a good understanding of supply chain
dependencies.
Visualizing a Simple ModelVisualizing a Simple ModelVisualizing a Simple ModelVisualizing a Simple Model
Plants
…
Parts
P1
P2
P3
…
P6
P7
P8
…
P3
P4
P5
Nodes (conceptual)
…
Transition (between
nodes)
P1
P2
P3
P6
P7
P4
P5P8
Bill of Materials Diagram
Model FormulationModel FormulationModel FormulationModel Formulation
Model Formulation:Model Formulation:Model Formulation:Model Formulation:
• Each optimization problem corresponds to a single disruption scenario
• The optimization problems are linear programs
� Important because a typical supply chain requires the analysis of tens of thousands of
possible disruption scenarios
Model FormulationModel FormulationModel FormulationModel Formulation
Model Formulation:Model Formulation:Model Formulation:Model Formulation:
Bill of Material ConstraintTotal production at node j (corresponding to a part at a particular facility) is bounded by the
volumes allocated from its upstream nodes
Model FormulationModel FormulationModel FormulationModel Formulation
Model Formulation:Model Formulation:Model Formulation:Model Formulation:
Parts Allocation ConstraintTotal allocation volume of node i is constrained by its production and its pipeline inventory
Model FormulationModel FormulationModel FormulationModel Formulation
Model Formulation:Model Formulation:Model Formulation:Model Formulation:
Disruption ConstraintProduction of node j is halted due to disruption
Model FormulationModel FormulationModel FormulationModel Formulation
Model Formulation:Model Formulation:Model Formulation:Model Formulation:
Demand loss constraintsLoss of production for vehicle j is lower bounded by the demand minus the production over
the TTR duration
Model FormulationModel FormulationModel FormulationModel Formulation
Model Formulation:Model Formulation:Model Formulation:Model Formulation:
Production capacity constraintsTotal production of all nodes at site/plant α is bounded by its capacity
Ford’s Supply Chain: The ChallengeFord’s Supply Chain: The ChallengeFord’s Supply Chain: The ChallengeFord’s Supply Chain: The Challenge
LLLLarge multiarge multiarge multiarge multi----tier supply chain networktier supply chain networktier supply chain networktier supply chain network
� Complex bill of materials and supply chain structure
� Over 50 manufacturing plants
� 10 tiers of suppliers
� 1400 tier 1 supplier companies with 4,400
manufacturing sites in over 60 countries
� 55,000 different parts
� 6 million vehicles produced annually
Performance Impact of Different Supplier’s SitesPerformance Impact of Different Supplier’s SitesPerformance Impact of Different Supplier’s SitesPerformance Impact of Different Supplier’s Sites
Number of Sites
Performance Impact
Another 2773 sites with No Impact
2773
805
142252
154
408
1
201
401
601
801
1001
1201
1401
1601
1801
No Impact Very Low Low Medium High Very High
Performance Impact and Total Spent at Supplier SitePerformance Impact and Total Spent at Supplier SitePerformance Impact and Total Spent at Supplier SitePerformance Impact and Total Spent at Supplier Site
27 Confidential ©Copyright 2015 | Opalytics Inc.
Time-to-Recover and Time-to-Survive
Time-to-Recover (TTR): The time it takes the supply chain to return to 100% capacity after a disruption.
Time-to-Survive (TTS): Time duration where service is not interrupted under any disruption
TTR < TTS
Robust Supply Chain
28 Confidential ©Copyright 2015 | Opalytics Inc.
Time-to-Survive across all Tier 1 suppliers
0
50
100
150
200
250
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9 1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9 2
10
20
30
40
50
>5
0
Nu
mb
er
of
Su
pp
liers
TTS (weeks)
29 Confidential ©Copyright 2015 | Opalytics Inc.
Agenda
• Introduction
• Supply Chain Risk Optimization
• Opalytics Network Risk
• End to End Analytics Development
• Summary
• Q&A
30 Confidential ©Copyright 2015 | Opalytics Inc.
User Management
31 Confidential ©Copyright 2015 | Opalytics Inc.
Folder and Scenario Management
32 Confidential ©Copyright 2015 | Opalytics Inc.
Model Tables
33 Confidential ©Copyright 2015 | Opalytics Inc.
Data Editing & Validation
34 Confidential ©Copyright 2015 | Opalytics Inc.
Solver Parameters
35 Confidential ©Copyright 2015 | Opalytics Inc.
Solver Run
36 Confidential ©Copyright 2015 | Opalytics Inc.
Results
37 Confidential ©Copyright 2015 | Opalytics Inc.
Agenda
• Introduction
• Supply Chain Risk Optimization
• Opalytics Network Risk
• End to End Analytics Development
• Summary
• Q&A
38 Confidential ©Copyright 2015 | Opalytics Inc.
Challenges in deploying MIP Solvers • Complex skills needed for simple MIP solves
– Learn a whole language for basic MIP?
– Separate data from solver to accommodate multiple stand alone
formats.
• Debug and test
– Failure to check data integrity beforehand leads to
big headaches afterwards.
• Deploy to end users– Apply rich GUI.
– Exploit cloud scalability and data sharing.
– MIPs have their own data mining challenges.
39 Confidential ©Copyright 2015 | Opalytics Inc.
End to end Analytics development� Step 1: Develop Analytics
– Define Data: schema, keys, types, validation rules
– Develop Solver (ticdat, gurobipy, scikit-learn, many more)
– Create input files in order to test the schema
– Debug using standard development tools.
� Step 2: Deploy with Opalytics Cloud Platform
– Schema and data validation recognized by OCP.
– OCP provides off-the-shelf rich GUI.
� Step 3: Add Visualization
– Opalytics can efficiently customize your graphic needs.
– Plug into tools like Tableau.
� Step 4 : Go live!
– Integrate into systems of record.
– Don't forget to support it!
40 Confidential ©Copyright 2015 | Opalytics Inc.
The Final End of End-to-End
Solver
Opalytics Cloud Platform
41 Confidential ©Copyright 2015 | Opalytics Inc.
Opalytics Data Library (ticdat)
• ticdat is a Python library dedicated to Prescriptive
Analytics (superset of MIP).
• Define input and output schema and data integrity rules.
• Creates template for readable, consistent, Pythonic data
structures.
• Recognize data integrity problems.
• Test the engine locally with sample data.
– Excel, CSV, Access, SQLite, hard-coded and customized formats.
• Engines that use ticdat can be easily deployed via the OCP.
42 Confidential ©Copyright 2015 | Opalytics Inc.
Learn 3 thing to write a basic MIP model
1. Superficial Python - dictionaries, tuples, attributes,
loops and functions.
2. ticdat for reading and writing tabular data. – Data object factory for Pythonic data structures with context
specific names.
– ticdat supports the most common stand alone data sources and is
easily extended
3. gurobipy for representing mathematical equations and
solving a MIP.– gurobipy.tuplelist meshes with ticDat’s usage of tuples as
dictionary keys.
43 Confidential ©Copyright 2015 | Opalytics Inc.
Add 3 thing to create a stand-alone pilot
1. Check each data table for duplicate rows.
– Row duplication recognized via identifier fields (i.e.
primary keys)
2. Connect tables with foreign key relationships.
– Foreign keys simply capture “this is one of those”
relationship between tables.
– You have primary keys and foreign keys right now, but
you might not know what to call them.
3. Define data types for actual data fields.– Numerical or not, ranges (to include infinity), nullability, string
choices.
44 Confidential ©Copyright 2015 | Opalytics Inc.
Remember everything to support your
solver
1. Python/ticdat skills support the entire developer process.
– Interactive analysis, proof-of-concept, application.
– The Python tools you use to build your solver can connect directly
to the OCP.
2. The syntax and tools you learn for one create a more efficient
thought process for all.
– Avoid the Tower-of-Babel, skip the cognitive-switch.
3. Python and ticdat connect you to both the cloud computing and
interactive programming movements.
– Jupyter, Google Cloud Datalab, matplotlib
45 Confidential ©Copyright 2015 | Opalytics Inc.
Agenda
• Introduction
• Supply Chain Risk Optimization
• Opalytics Network Risk
• End to End Analytics Development
• Summary
• Q&A
46 Confidential ©Copyright 2015 | Opalytics Inc.
Opalytics Supports You!
• Empowers Business Analytics developers
• Provides tools for Data Management and
Debugging of your Gurobi Model
• Fast deployment to users through Light IT
47 Confidential ©Copyright 2015 | Opalytics Inc.
More Information
• For general information - www.opalytics.com
• For demo - [email protected]