Deploying Predictive
Analytics Solutions
Dr. Stephan Gerali – Lockheed Martin
Dr. Rafael Pacheco – SAP
SESSION CODE: BI1521
How Lockheed Martin Space Systems
Uses Predictive Analytics to Forecast
Supply Chain Management
Performance
Analyze the Business Case for Forecasting
Supplier Scheduling Performance
Learn How to Utilize SAP Technologies to Build a
Robust Predictive Analytics Capability
Provide Lessons Learned in the Development of
Lockheed Martin’s Predictive Analytics Solution
Company:
Headquartered in Bethesda, Md., Lockheed Martin is a Global Security and Aerospace Company that is Principally Engaged in the Research, Design, Development,
Manufacture, Integration and Sustainment of Advanced Technology Systems, Products & Services
Employees:
112,000 Domestic & International Employees
Operations:
Domestically, 542 Facilities in 500 Cities Throughout All 50 States
Internationally, Business Locations in 70 Nations & Territories
LOCKHEED MARTIN OVERVIEW
2014 Sales:
$45.6 Billion
Backlog:
$80.5 Billion
Cash Flow from Operations:
$3.9 Billion
Stock Ticker Symbol:
Ranked 59thon the 2014 Fortune 500 List of
Largest Industrial Corporations
LMT, on the New York Stock Exchange
Aeronautics, with Approximately $14.9 Billion in 2014 Sales which includes Tactical Aircraft, Airlift, and Aeronautical Research and Development Lines of Business
Information Systems & Global Solutions (IS&GS), with Approximately $7.8 Billion
in 2014 Sales that Includes C4I, Federal Services, Government & Commercial IT Solutions
Missiles and Fire Control, with Approximately $7.7 Billion in 2014 Sales that
Includes the Terminal High Altitude Area Defense System, Joint Light Tactical Vehicle, PAC-3 Missiles as some of its High-Profile Programs
Mission Systems and Trainingwith Approximately $7.1 Billion in 2014 Sales,
which Includes Naval Systems, Platform Integration, Simulation and Training and Energy Programs Lines of Business
Space Systems, with Approximately $8.1 Billion in 2014 Sales which Includes
Space Launch, Commercial Satellites, Government Satellites, and Strategic Missiles Lines of Business
LOCKHEED MARTIN BUSINESS AREAS
LOCKHEED MARTIN SPACE SYSTEMS
Supply Chain Management Definition:
Supply Chain Management (SCM) is "the Systemic, Strategic Coordination of the Traditional Business Functions & the Tactics Across these Business Functions within a Particular Company for the
Purposes of Improving the Long-Term Performance of the Individual Companies and the Supply Chain as a Whole.“
Supply Chain Management Proposition:
If You Can Better Predict (with Reliability), When a Part Will Arrive, You can Better Plan, Manage & Optimize Your Supply Chain to Improve Cost, Schedule & Quality Constraints
SUPPLY CHAIN MANAGEMENT
Lockheed Martin SSC Supply Chain:
Lockheed Martin SSC Manages Over 5,200+ Suppliers (1,500+ First Tier Suppliers)
375,000 Annual Inbound / Outbound Shipments
Shipments Originate from 22 Countries
200+ Transportation Service Providers
Highly Regulated Parts & Materials
Represents ~70% of Final Product Cost
SUPPLY CHAIN MANAGEMENT LEAD TIMES
1. Run MRP to Generate Planned Order 2. Convert Planned Order to PR 3. Release / Approval PR 4. Convert PR to PO 5. Negotiate & Place PO with Supplier 6. Supplier Manufacturing 7. Source Inspection 8. Deliver Part / Material 9. Receive Part / Material at Dock 10. Inspect Part / Material 11. Place Part / Material on Floor or to StockPlanner /
PR Release
Lead Time
Buyer
Lead Time
Supplier
Lead Time
Goods
Receipt
Lead Time
MRP Input: Program / Production Need Dates PR = Purchase Requisition PO = Purchase OrderLEAD TIMES BUSINESS CASE
• Lead Times Updated Quarterly Based on Buyer’s Knowledge & Average Lead Times
• Lead Times Require ETL (Extract, Transform & Load) from Lead Times Maintenance Tool to ERP
• Opportunities Exist for Automating Lead Times
• Lead Times Updated Daily to Reflect Current Market Conditions (with Delegate Support)
• Lead Times Updated Right to ERP
• Recommended Lead Times Created Based on Predictive Analytics Algorithms
• More Accurate (Real Time) Lead Times Available in ERP
• Better Forecasted Lead Times to Reduce Maintenance Overhead for Lead Time Updates
• Better Foresight into Delivery of Parts Supporting SSC Programs
Problems
Solutions
Benefits
Lead Time Maintenance Tool
• Provide the Ability to be Notified Daily When Parts are Received
• Provide the Ability to Update Lead Times After Parts are Received
• Provide the Ability to Recommend Lead Times using Historical Projections
Improve Material Master Lead Time Accuracy by 25%
Reduce SCA/Buyer Lead Time Maintenance Effort by
80%
Recommend Optimal Lead Times for Current Parts &
New Parts
Near Real-Time Report of Recommended “Optimal”
Material Master Lead Times with Direct Auto Update of
ERP
Descriptive Analytics
– Uses Data Aggregation & Data
Mining Techniques to Provide Insight into the Past
(“What Has Happened?”)
Predictive Analytics
– Uses Statistical Models &
Forecast Techniques to Understand the Future
(“What Could Happen?”)
Prescriptive Analytics
– Uses Optimization & Simulation
Algorithms to Advice on Possible Outcomes
(“What Should We Do?”)
DATA ANALYTICS
Predictive Analytics is the Practice of Extracting Information from
Existing Data Sets in Order to Determine Patterns & Predict Future
Outcomes & Trends
Predictive Analytics Forecasts What Might Happen in the Future with
an Acceptable Level of Reliability
Statisticians & Data Miners Utilize the R Programming Language for
Statistical Computing & Forecasting
SAP HANA Integrates the Power of the R Programming Language with
an In-Memory Database Capable of Performing Quick Data Analytics
CURRENT SAP ARCHITECTURAL LANDSCAPE
SAP HANA In-Memory Database and Platform for Predictive Analytics
SAP Client Tools
SAP Predictive Analysis, SAP InfiniteInsight, SAP Lumira
In-Memory Processing Engine
Application Function Library
R-Engine R Script R-Server Text-Analysis Spatial Processing Rules Engine Business Function Library Predictive Analysis Library Full-Text Search Graph Engine Automated Predictive Library Location
Data MachineData
Time-Series Data Transaction Data Unstructured Data Real-time (Stream) Data Data Connectors
SAP Business Suite SAP SLT ABAP Accelerators SAP ERP SAP Data Services
Application Function Modeler SAP HANA Studio • Cluster Analysis • Classification Analysis • Regression Analysis • Association Analysis • Time Series Analysis • Data Preparation • Statistical Algorithms • Social Network Analysis SAP ERP
Custom App
SAP ABAP
FOCUSED SAP ARCHITECTURAL LANDSCAPE
Database ABAP Program Database w rit e read Real-Time Replication with SAP LT ABAP AcceleratorRead Lead Times
Source: ("SAP LT Replication Server Overview", 2014)
SAP HANA SAP ERP SAP DS Scheduled Job R Server R Runtime 1 Database 2 ProcedureR Stored 3 ProcessingStatistical Calc Engine w rit e read 4
SAP Advanced Business Application Programing (SAP ABAP): Provides the Ability to Build Custom Applications for Managing
Lead Times
SAP Enterprise Resource Planning (SAP ERP):
Provides the Ability to Handle Purchase Requisitions Data (Including Lead Times)
SAP Landscape Transformation (SAP SLT):
Provides Real Time Data Replication from SAP ERP to our SAP HANA Database for all Purchase Requisitions to Allow Predictions to be Performed
SAP HANA (SAP HANA):
Provides an In-Memory Database to Handle High Transaction Rates & Complex Query Processing for Lead Times
SAP Data Services (SAP DS):
Provides Scheduling & Execution of Predictive R Code R Server (R Server):
Provides the Execution of R Code to Support Predictions SAP ABAP Accelerator (SAP ABAP Accelerator):
Provides ABAP Program with the Ability to Access Predicted Lead Time Data through SAP HANA
SAP Advanced Business Application Programing (SAP ABAP): Provides the Ability to Build Custom Applications for Managing
Lead Times
SAP Enterprise Resource Planning (SAP ERP):
Provides the Ability to Handle Purchase Requisitions Data (Including Lead Times)
SAP Landscape Transformation (SAP SLT):
Provides Real Time Data Replication from SAP ERP to our SAP HANA Database for all Purchase Requisitions to Allow Predictions to be Performed
SAP HANA (SAP HANA):
Provides an In-Memory Database to Handle High Transaction Rates & Complex Query Processing for Lead Times
SAP Data Services (SAP DS):
Provides Scheduling & Execution of Predictive R Code R Server (R Server):
Provides the Execution of R Code to Support Predictions SAP ABAP Accelerator (SAP ABAP Accelerator):
Provides ABAP Program with the Ability to Access Predicted Lead Time Data through SAP HANA
LEAD TIMES DATA FLOW
Buyer Part Received ERP 5 6 Email (Workflow) Scanned / Manually EnteredHANA
Lead Times Maintenance Tool (Web)
ABA P Acc ele ra to r 7 8 R Server Data Services 2 R Stored Procedure 3 Statistical Processing 4 Write Results 10 Commit 9 Re su lts 1 Lead Ti m e Dat a (SA P SLT )
LEAD TIME MAINTENANCE
Supplier Lead Time Maintenance Tool
http://servername/MaterialMasterLeadTime/GetSupplierLeadTimeView
Supplier Lead Time Maintenance Tool
Update Recommended Planned Delivery Time
Plant Part Number Part Number Desc Current Planned Delivery Time 80% Probability LT Avg LT Mid LT Mode LT Purchasing Group Purchasing Group Desc MRP Controller MRP Desc
DEN ABCDEFG00001 Bolt Pattern 1 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00002 Bolt Pattern 2 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00003 Bolt Pattern 3 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00004 Bolt Pattern 4 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00005 Bolt Pattern 5 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00006 Bolt Pattern 6 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00007 Bolt Pattern 7 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00008 Bolt Pattern 8 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00009 Bolt Pattern 9 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00010 Bolt Pattern 10 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00011 Bolt Pattern 11 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I
Save LT 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 Clear LT
LEAD TIME DELEGATATION
Supplier Lead Time Maintenance Tool
http://servername/MaterialMasterLeadTime/GetSupplierLeadTimeView
Supplier Lead Time Maintenance Tool
Update Recommended Planned Delivery Time
Plant Part Number Part Number Desc Current Planned Delivery Time 80% Probability LT Avg LT Mid LT Mode LT Purchasing Group Purchasing Group Desc MRP Controller MRP Desc
DEN ABCDEFG00001 Bolt Pattern 1 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00002 Bolt Pattern 2 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00003 Bolt Pattern 3 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00004 Bolt Pattern 4 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00005 Bolt Pattern 5 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00006 Bolt Pattern 6 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I DEN ABCDEFG00007 Bolt Pattern 7 5.00 2.00 1.01 0.70 1.50 43J Sys Pwr AV2 PROJ I
Save LT 2.00 2.00 2.00 2.00 2.00 2.00 2.00 Clear LT
Plant DEN Purchasing Group 43J MRP Controller AV2 CCAS
DEN
43I
Lockheed Martin Team Had Extensive Knowledge in:
Lockheed Martin Had Knowledge to Build an Integrated Solution for Lead
Times but Needed Assistance with Predictive Capability for Lead Times to
Help Meet Customer’s Aggressive Delivery Requirements
Partnered with SAP Data Science (John Sullivan & Rafael Pacheco) to Help
with the Data Science Aspect of Project & Help Deliver Predictive Capability
Now We Will Walk Through the Data Science Aspects of this Project
LOCKHEED MARTIN & SAP DATA SCIENCE
SAP ABAP
SAP ERP
SAP SLT
SAP HANA
SAP ABAP Accelerator
PREDICTIVE ANALYTICS
Regression
Analysis
Cluster
Analysis
Classification
Analysis
Outlier
Detection
Probability
Distribution
Link
Prediction
Predictive
Analytics
Time Series
Analysis
Association
Analysis
Manufacturing Retail/CPG Transport & Logistics High Tech
Oil and Gas Public sector Utilities Sports Banking
PREDICTIVE ANALYTICS PROCESS
Statistical
Techniques
Business
Rules
Historical
Data
Predictive
Models
Predictive
Analytics
Assumptions
Explanators
Example: Supplier Lead Time
The Time Between the Purchase Order Receipt Dock Date & the
Time the Purchase Order Item is Initially Placed (in Calendar
Days)
SOLUTION PROCESS (PROBLEM)
Purchase Requisition (PR) Release Date PO Item Placed Date PO Item Actual Receipt Dock Date
…
…
Clean Data – Outliers
Construct a Hierarchy Between Material and Part
Family, e.g.
Material: ABC123456789
Part Family 10: ABC1234567
Part Family 8: ABC12345
Construct Empirical Density Function for Material &
Part Family 12, 10, 8, 6
Determine the Cumulative Probability Distribution
Select the Desired Probability (the Item will be
Supplied on Time for the Material or Part Family
within Certain Probability)
Recommend the Lead Time Value from the Number
of Records in Material, Part Family 12, 10, 8, 6
SOLUTION PROCESS (BOX PLOT)
IQR
Q3 Q1
First Quartile
(Q
1) or the 25
thPercentile
Q
2Called the
Median
or the 50
thPercentile
Third Quartile
(Q
3) or the 75
thPercentile
Interquartile Range
IQR = Q
3- Q
1
Lower Fence
: Q1-1.5 X IQR
Upper Fence
: Q3-1.5 X IQR
Outliers
: Points Beyond the Fences
Q1-1.5 X IQR Q3-1.5 X IQR
Median
Probability Density Function PDF(
x
) Where
x
is a
Random Variable (Lead Time)
Cumulative Density Function CDF(
x
) from PDF(
x
)
SOLUTION PROCESS (PDF & CDF)
x x
Material Number
Family Part 6
SOLUTION PROCESS (FIT)
x x
PDF(x) CDF(x)
PDF(x) CDF(x)
x x
Data for Material Number is Sparse & CDF is not as Smooth as that of Family Part 6
Therefore, the Recommend Lead Time comes from Family Part 6
R Code is Embedded in SAP HANA
SQL Code in the Form of a RLANG
Procedure (See SQLScript Code on
Right)
SAP HANA Databases Uses External
R Server Environment to Execute R
Code (See Picture On Right)
SAP HANA Calculation Engine
Handles Communications Between R
Server & HANA
SOLUTION PROCESS (SAP HANA & R INTEGRATION)
Use R-Studio for Development & Testing of Code
Data can be Retrieved or Written from/to SAP
HANA via JDBC Connections
Deploy in HANA for Production: R code is
Embedded in SAP HANA SQL Code in the Form
of a RLANG Procedure (as Described Earlier)
Running SQL in R is Much Slower than Running SQL in
HANA & Forwarding Entire SQL Results to R
One Material Per Call ~ 10 seconds
Computer Time for About 60,000 Material Numbers ~ 7
Days! Not Feasible
PROCESS SOLUTION (LESSONS LEARNED)
xyz6 <- caracter_m6;
nxyz6 <- nchar(xyz6);
input6.dat <- fn$sqldf('select * from data_input where Material_Number like "$xyz6%" ', row.names =
FALSE);
xyz8 <- caracter_m8;
nxyz8 <- nchar(xyz8);
input8.dat <- fn$sqldf('select * from data_input where Material_Number like "$xyz8%" ', row.names =
SQL Queries Should Be Moved from R to HANA
Replace (Row Bind)
rbind
by Pre-Allocating Vectors
Instead of Data-Frames
Computer Time for about 60,000 Material Numbers
Reduced from 7 Days to 4 Hours!
Analyze the Business Case for Forecasting
Supplier Scheduling Performance
Learn How to Utilize SAP Technologies to Build a
Robust Predictive Analytics Capability
Provide Lessons Learned in the Development of
Lockheed Martin’s Predictive Analytics Solution
THANK YOU FOR ATTENDING
Thank You for Attending!
Dr. Stephan Gerali
Lockheed Martin Enterprise Business Services
[email protected]
Dr. Rafael Pacheco
SAP America Data Science
Bertolucci, J. (2013, December 31). Big Data Analytics: Descriptive Vs. Predictive Vs. Prescriptive -InformationWeek. Retrieved March 2, 2015, from http://www.informationweek.com/big-data/big-data-analytics/big-data-analytics-descriptive-vs-predictive-vs-prescriptive/d/d-id/1113279
SAP HANA R Integration Guide. (2014, January 1). Retrieved March 2, 2015, from
http://help.sap.com/hana/sap_hana_r_integration_guide_en.pdf
Who We Are · Lockheed Martin. (2015, January 1). Retrieved March 3, 2015, from
http://www.lockheedmartin.com/us/who-we-are.html
Our Businesses · Lockheed Martin. (2015, January 1). Retrieved March 3, 2015, from
http://www.lockheedmartin.com/us/who-we-are/organization.html
Space Systems Company Portfolio. (2013, January 1). Retrieved March 3, 2015, from
http://www.lockheedmartin.com/content/dam/lockheed/data/corporate/documents/suppliers/Space-Systems-Supplier-Conference-2014.pdf
Supply Chain Management. (2015, February 27). Retrieved March 3, 2015, from
http://en.wikipedia.org/wiki/Supply_chain_management
Supply Chain Threat Management. (2013, January 1). Retrieved March 3, 2015, from
http://www.lockheedmartin.com/content/dam/lockheed/data/corporate/documents/suppliers/Space-Systems-Supplier-Conference-2014.pdf
Shi, X. (Director) (2014, November 1). SAP HANA Predictive Analysis Library. SAP Webcast. Lecture conducted from SAP.
SAP LT Replication Server Overview. (2014, July 1). Retrieved March 5, 2015, from
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70dd6e62-0113-3110-f58e-92aa5a784377?QuickLink=index&overridelayout=true&59511066929077