Christoph Eckert, SAP SCM Optimizer Development
Gurobi User Conference, Feb 06, 2017
Supply Plan Optimization with the
SAP IBP S&OP Optimizer
Public
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 2Public
Agenda
History of Optimization at SAP
SAP Integrated Business Planning for Sales and Operations Planning (SAP IBP S&OP)
S&OP Model and Features
Some Figures
Summary
History of Optimization at SAP
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 4Public
Optimization at SAPThe 90βs
First optimization engines built end of the 90βs
Optimization for SCM in SAP Advanced Planning and Optimization (SAP APO)
Production Planning & Detailed Scheduling (PP/DS)
Supply Network Planning (SNP)
β MILP approach using commercial solver
Deployment
β MILP approach using commercial solver
Transportation Planning / Detailed Scheduling (TP/VS)
Model Mix Planning (MMP)
β MILP approach using commercial solver
Sequencing (SEQ)
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 5Public
Optimization at SAPThe 2000βs
Added further applications in the 2000βs
Further components of SAP APO
Capable to Match (CTM)
SAP Transportation Management (SAP TM)
Vehicle Scheduling and Routing (VSR)
Carrier Selection (CS)
β MILP approach using open source solver with commercial license
SAP Multiresource Scheduling (SAP MRS) β Planning of Technicians
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 6Public
Optimization at SAPThe 2010βs
More engines using (MI)LP since the 2010βs
All using open source solver with commercial license
Genios β Optimization on SAP NetWeaver
β Customer projects, e.g. βTrim Optimizationβ
SAP Integrated Business Planning for Sales and Operations Planning (SAP IBP S&OP)
Optimization Function Library (OFL) β Optimization on SAP HANA
β e.g. βRetail-Assortment-Planningβ
And more other engines
SAP Transportation Management - Load Planning (SAP TM LP)
SAP Integrated Business Planning for Response (SAP IBP Response)
SAP Transportation Management β Load Consolidation (SAP TM LC)
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 7Public
Optimization at SAPSAP chooses Gurobi
SAP chooses Gurobi as new OEM Partner
June, 2016 β SAP, the leading enterprise software provider in supply chain management, has chosen
Gurobi as an OEM partner. As a result of this agreement, the Gurobi Optimizer has been integrated
into the SAP Integrated Business Planning (SAP IBP) and Advanced Planning and Optimization (SAP
APO) solutions to solve complex optimization problems. In addition, the Gurobi Optimizer enabled a
seamless integration into the SAP HANA in-memory-platform.
http://www.gurobi.com/company/news/sap-chooses-gurobi
Applications using Gurobi as solver
SAP APO β SNP and Deployment (replacing other commercial solver)
SAP IBP S&OP (replacing open source solver)
Enhancements for SAP HANA platform
Memory handling
Thread handling
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 8Public
Optimization at SAPSAP chooses Gurobi
Effort for switching solver to Gurobi
β’ Implementation of API-mapping internal (MI)LP representation β GUROBI model and solver (effort
already done some time ago, only technical mapping on API basis)
β’ Intensive tests on a set of approx. 1000 scenarios β Compare time to optimum or solution quality
after given runtime, depending on customer setting
β’ 86% w/o problems: 52% comparable, 34% better results
β’ 9% solved using Gurobi tuning tool (most times default setting was sufficient) or mapping of previous solver
specific parameters to similar Gurobi solver parameters (e.g. MIPFocus, ScaleFlag, NumericFocus,β¦)
β’ Only few scenarios not βsolvedβ by intensive tuning, some large scenarios not tried to tuned at all
β’ β Very few problems at customers, merely in cases using special solver parameters with the old solver, but
such scenarios had intense parameter tuning for the old solver which we didnβt now
β’ After productive switch only few problems with regards to the change, most could be solved on our
own using experience from tests, only very few needed help from Gurobi support, which reacted
very quickly and proposed a solution
SAP Integrated Business
Planning for Sales &
Operations Planning
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 10Public
SAP Integrated Business PlanningWhat is IBP?
Tom Wallace Definition
Integrated Business Planning is a set of decision-making processes to:
Balance demand and supply
Integrate financial planning and operational planning
Link high-level strategic plans with day-to-day operations
βIntegrated Business Planning (IBP) is the business planning process
for the post-recession era, extending the principles of S&OP
throughout the supply chain, product and customer portfolios,
customer demand and strategic planning, to deliver one seamless
management process.β
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 11Public
SAP Integrated Business PlanningHigh Level Solution Architecture
SAP Integrated Business Planning
Excel: Plan
Sales/
Marketing
Demand
Planning
Finance
Supply
Chain
Executives
Web U
Isft
p |
htt
ps
Ou
t-of-
the-b
ox o
r
co
nfig
ure
d In
teg
ratio
n
Data
Se
rvic
es
or
HC
I
SAP HANAβ’
SAP Jamβ’
IBP Model & EngineAttributes
Key Figures
Scenarios & Simulation
Predictive Analytics
Heuristics & Optimization
Process Workflow
Alerts
Social Collaboration
Web: Analyze
Mobile: Analyze
ERP
CRM
BPC
APO
BW
Any other
system
Files
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 12Public
SAP Integrated Business PlanningSolution Components
Sales & Operations Planning
Supply Chain Control Tower
DemandResponse &
SupplyInventory
SAP HANA Platform
Challenge Possible Deployment Priority
Struggling to synchronize supply and
demand?
SAP Integrated Business Planning
for Sales and Operations
Difficult to determine optimal inventory
levels that support your high customer
service level - across the network?
SAP Integrated Business Planning
for Inventory
Unable to manage and plan across the
complex supply network?
SAP Integrated Business Planning
for Supply
Inability to sense actual demand for a
short-term horizon?
SAP Integrated Business Planning
for Demand
Need to respond to short term changes in
supply and demand?
SAP Integrated Business Planning
for Response
Lack of visibility and information to analyze
and manage the end-to-end supply chain?
SAP Supply Chain Control Tower
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 13Public
SAP IBP for Sales & Operations PlanningSales and Operations Planning Process
β’ Consensus Demand Planning and New Products
β’ Input from Sales, Marketing, Finance, Operations including quantity, price, revenue and margin
1. Demand
β’ Based on updated demand plan, understand capacity and material impacts including contract manufacturing
β’ Understand long term gaps in supply and demand2. Supply
β’ Review and resolve outstanding supply issues
β’ Compare constrained plan with finance plan
β’ Define and compare scenarios 3. Balance
β’ Escalate resolution plans with scenarios if applicable
β’ Review key changes since last meeting4. Executive Review
Repeat
Monthly
Typical Process
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 14Public
SAP IBP for Sales & Operations PlanningWeb UI used for Analytics
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 15Public
SAP IBP for Sales & Operations PlanningExcel UI used for Planning
S&OP Model and Features
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 17Public
SAP IBP Sales & Operations PlanningThe Model β Master and Operational Data
DCPlantSupplier CustomerProductResource
Master Data Model
Location (Plant, DC, Supplier, ...) Lane Product Production Process Model (PPM) Resource
Demands Orders Capacity Profiles
Operational Data (Time Series)
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 18Public
SAP IBP Sales & Operations PlanningThe Model β Features
TransportDiscrete Lots
Minimal Lots
Fix Costs and Cost Rate
Satisfy DemandDelay Costs
Non-Delivery CostsProcure
Fix Costs and Cost Rate
PPM
Products
ProduceDiscrete Lots
Minimal Lots
Fix Costs and Cost Rate
Store
Storage
Capacity
Safety Stock
Transport-
Capacity
Production
Capacity
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 19Public
SAP IBP Sales & Operations PlanningThe Model β Typical Supply Chain
SUP 302
SUP 301 Customer 1
1 A
A Product Capacity
Resource 1 Material
Customer 2
A
Customer 3
A
DC 101
A
DC 102
A
Location
4
4
5
MFG 202
A
1
6
35
4
Multi-level
BOM
MFG 201
A
1
6
35
4
Multi-level
BOM
Production
Source
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 20Public
SAP IBP Sales & Operations PlanningConstraints - Examples
Stock balance equation:
πΊππππ ππππ , πππ, π
= πΊππππ ππππ , πππ, π β π +
π·ππ
π·πππ ππππππ πππ, ππππ , πππ, π
β
π·ππ_ππππ ππππππ
π·πππ _π
π·πππ ππππππ πππ_ππππ ππππππ, ππππ _π, πππ, π + ππππ ππππ
+
πππππππ
π»ππππππππ(ππππ , πππππππ, πππ, π) β
π»ππππ
π»ππππππππ ππππ , πππ, πππππ, π + ππππ ππππ
Maximum inventory:
πΊππππ ππππ , πππ, π β πΊπππππ΄πππΊππππ(ππππ , πππ, π) β€ π΄πππ°πππππππππ³ππππ(ππππ , πππ, π)
Inventory target:
πΊππππ ππππ , πππ, π + πΊπππππ»ππππππΊππππ(ππππ , πππ, π) β₯ π°πππππππππ»ππππππ³ππππ(ππππ , πππ, π)
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 21Public
SAP IBP Sales & Operations PlanningConstraints - Examples
Minimum and maximum lot-size:
π·πππ ππππππ(πππ, ππππ , πππ, π) β€ π΄πππ³πππΊπππ(πππ,ππππ , πππ, π)
resp.
π·πππ ππππππ πππ,ππππ , πππ, π β₯ π΄πππ³ππ πππ,ππππ , πππ, π β π°ππ πππππππ΄πππ·(πππ,ππππ , πππ, π)π·πππ ππππππ πππ,ππππ , πππ, π β€ π΄πππ³ππ πππ,ππππ , πππ, π β π°ππ πππππππ΄πππ·(πππ,ππππ , πππ, π)
Maximum:
π β€ π·πππ ππππππ(πππ,ππππ , πππ, π) β€ π΄ππππππ(πππ,ππππ , πππ, π)
Minimum:
π·πππ ππππππ πππ, ππππ , πππ, π + πΊπππππ³π©π·(πππ,ππππ , πππ, π) β₯ π΄ππππππ(πππ,ππππ , πππ, π)
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 22Public
SAP IBP Sales & Operations PlanningConstraints - Examples
Resource capacity:
πΉππ_πππ
π·πππ ππππππ(πππ_πππ,ππππ , πππ, π) β€ πΉπππͺπππππππ(πππ, π)
Minimum resource consumption:
πΉππ_πππ
π·πππ ππππππ(πππ_πππ,ππππ , πππ, π) + πΊπππππ΄πππΉππ(πππ, π) β₯ π΄πππͺππππππππππ(πππ, π)
Fix costs:
π·πππ ππππππ πππ, ππππ , πππ, π β€ π©πππ΄ β π°ππ ππππππππππ·(πππ,ππππ , πππ, π)
Demands:
π«πππππ ππππ , πππ, π
= π«ππππππππ ππππ , πππ, π +
π³πππ_π
π³ππππ«πππππππ ππππ , πππ, π, ππππ_π + π΅πππ«πππππππ ππππ , πππ, π
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 23Public
SAP IBP Sales & Operations PlanningCost
Production, Transport and Procurement
Fix cost
Cost rate
Violation cost rate for minimum and adjusted values (pseudo hard)
Resource
Minimum resource capacity utilization violation cost rate
Inventory/Stock Holding
Inventory holding cost rate
Maximum inventory violation cost rate
Safety stock violation cost rate
Minimum and maximum coverage violation cost rate
Demand
Non delivery cost rate
Late delivery cost rate
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 24Public
SAP IBP Sales & Operations PlanningObjective
Objective function:
π΄π°π΅(
π«πππππ
π΅ππ_π³πππ_π«πππππππ π πππππ β π΅ππ_π³πππ_π«ππππππππͺπππππππ π πππππ
+
π·ππ
π·πππ ππππππ πππ β π·πππ πͺπππππππ πππ +
π·ππ
π°ππ ππππππππππ· πππ β π·πππ ππππͺπππ πππ
+
π·ππ
π©πππ΄ βπΊπππππ³π©π· πππ + π»ππππππππ, π·ππππππππππ
+
π³πππ΄ππ
πΊππππ ππππππ β π°πππππππππͺπππππππ ππππππ
+
π³πππ΄ππ
πΊππππ_π»πππππ_π΄ππ_πΊππππ ππππππ β π»πππππ_π΄ππ_πΊπππππ½πππππππππͺπππππππ ππππππ
+
πΉππ
πΊπππππ΄πππΉππ πππ β π΄πππΉπππͺππππ½πππππππππͺπππππππ)
Some Figures
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 26Public
SAP IBP Sales & Operations PlanningFigures and Numbers
IBP S&OP customers by industries
Oil and Gas/Chemical
Consumer Products/CPG
Beverage
High-Tech
Consumer Durables
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 27Public
SAP IBP Sales & Operations PlanningFigures and Numbers
Scenario 1 2 3 4 5 6 7 8
Locations 10128 153 886 1149 196 747 85 121
Products 1380 22640 14356 22854 37 312 6970 327
Location Products 41131 119886 56789 404347 1877 9483 20763 48768
Resources 394 5 30 200 12 13 147 5
Transportation Rules 40885 99651 42274 378436 3706 9700 13089 24092
Production Rules 2604 18905 828 7607 89 586 10593 324
Procurement Rules 47 10489 14282 18486 6 17 2271 3
Buckets 25 25 88 121 28 37 27 186
IBP S&OP scenarios by master data numbers
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 28Public
IBP S&OP scenarios by mathematical model
* Virtualized 20 x Intel Xeon [email protected], 256GB main memory, Windows Server 2012 R2
** Time limit used by customer, but by far not the time to the optimum
SAP IBP Sales & Operations PlanningFigures and Numbers
Scenario 1 2 3 4 5 6 7 8
Continuous Variables 2.3M 4.7M 16.9M 99.8M 170439 501592 798708 10.3M
Binary Variables - - - - 2450 11229 28347 8340
Integer Variables - - - - 6350 - 54963 -
Linear Constraints 1.6M 1.9M 7.8M 50.5M 91573 417918 658655 5.3M
Runtime* 21s 165s 18min 7:15h 2:00h** 1:24h 1:00** 2:00**
Memory* 2GB 3.7GB 13.4GB 89.6GB 2.4GB 3.4GB 2.2GB 11.8GB
Summary
Β© 2017 SAP SE or an SAP affiliate company. All rights reserved. 30Public
SAP IBP Sales & Operations PlanningSummary, Challenges & Outlook
Achievements
Good cooperation with Gurobi
Performance of the Solver
Replacement of previous solvers without major problems
Challenges
Very fast response times expected for simulation purpose in S&OP
Numerics
Outlook
Test (hierarchical) multiple objectives to overcome numerical problems by pseudo-hard constraints with big-M
coefficients in the objective
Thank youContact information:
Christoph Eckert
Senior Developer
SCM/IBP/TM Optimizer Development
Products & Innovation | IoT Logistics
SAP SE