Date: 04 Oct 2012 Ravindra Deokule Chandan Dubey Nikhil Kalkar
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 2 Objective The objective of this session is to provide insight on the basics of optimization. Provide overview on the standard SNP optimizations features & its usability. Discuss few SNP Optimizer scenarios and their setup
Target Audience
All SAP APO practitioners IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 3 Contents 1. What is Optimization? 2. What is Business Optimization? 3. Optimization Methods & Architecture 4. About SNP Optimizer - Optimizer Logic - Optimizer Master Data - Optimizer Setup - Optimizer Run & Log Interpretation 5. SNP Optimization Scenario- Case Studies Scenario 1: Choice of plant (more than one plant supplying a customer) Scenario 2: Choice of PDS within a plant
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 4 What is Optimization? IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 5 Some background Designer Considerations Reduce Thermal emission from thrust Reduce Radar detection Reducing radar detection when the aircraft opens its weapons bays Instability of Design Aerodynamic Limitation Electromagnetic Emission
Reduce Payload
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 6 Optimization is the process of finding the greatest or least value of a function for some constraint, which must be true regardless of the solution. How to arrive at the objective function is illustrated in the below farmer issue example; John Doe has area A sq. m of farm land - Can plant Rice or Wheat - Selling Price of Rice is Sr and Sw of wheat - Amount he can spend on fertilizer is F (usage rate is Fr & Fw) - Amount he can spend on pesticide is P (usage rate is Pr & Pw)
Simplex method the equation becomes; - Ar 0; Aw 0; X1 0; X2 0; X3 0; X4 0 - Ar + Aw + X1 = A - FrAr + FwAw + X2 = F - PrAr +PwAw + X3 = P - SrAr +SwAw +X4 = S Optimization Process Farmer need to maximize the selling price to maximize the profit! He needs to decide the area Ar for rice and area Aw for wheat?? Constraints: Total Area cannot exceed A Amount for Pesticides & Fertilizer Cannot exceed P& F resp. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 7 7 Optimization-Based Planning Models In constraint-based planning, production processes can be represented as optimization models.
A production model based on optimization consists of Objective Function (s), Decision Variables and Constraints based on market conditions, physical processes and resources/capacity. Objective Function: The Objective Function is the single benchmark for evaluating all combinations of decisions that satisfy the constraints. It usually represents a quantifiable goal, and sometimes two or more goals e.g Farmer need to maximize the selling price to maximize the profit! Decision Variables: Decisions variable are the independent variables of the problem. Typically, decisions take the form of Production lot sizes, Transport lot sizes, Purchase of additional capacities and so on .E.g. What is the area for Rice & Wheat plantation needs to be decided?
Constraints: Constraints represent limitations on which decision can be made and how decisions can be made. e.g. Total Area cannot exceed A Sq Meters e.g. Total expenses on Fertilizers & Pesticides cannot exceed F & P? Constraints are also used to apply business rules when solving a problem. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 8 8 Optimization- Methods & Architecture Linear Programming Continuous Linear Optimization Problems Primal Simplex Method Dual Simplex Method Interior Point Method Discrete Linear Optimization Problems Mixed Integer Linear Programming Prioritization Decomposition Vertical Aggregated Planning Horizontal Aggregated Planning
APO Optimization Architecture IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 9 About SNP Optimizer IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 10 10 SNP Optimizer Logic Objective: The objective of the SNP Optimiser is to produce a plan that minimises the overall supply chain cost whilst meeting the constraints. Total supply chain cost = Storage cost + Transportation cost + Production cost + Penalty for violating Safety Stock + Penalty for delayed deliveries + Penalty for non-delivery
Two types of constraints considered by Optimizer. Hard constraints: These are constraints that may under no circumstances be violated - Lot sizes (Minimum and Rounding value) in case Discretization is used. Resource capacities in case it is selected in optimizer profile. Transportation lead times IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 11 11 SNP Optimizer Logic (2) Soft constraints: These are constraints that may be violated if required to reach a feasible plan: - Optimiser cost settings Safety stock levels Example: An example is provided in the next slide to illustrate the optimiser logic. The optimiser does not work through a step by step process as shown here, but this is done to make the example easier to understand. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 12 Optimiser Logic Example SU Storage cost = 7 SU-DC Storage cost = 1 PDC Storage cost = 4 Transportation cost = 0 Transportation cost = 0 Transportation cost = 999 W4 Demand 100 W4 Demand 100 Produce Line 1: 60 in W4, 10 in W3 Produce Line 2: 20 in W4, 10 in W3 W3 Ship 20 W4 Ship 100 (Received W5) Store 20 for 1 week (W3) W4 Ship 80 W5 Forecast 110 W5 Safety Stock 30 W4 Closing stock 40 Lead time = 7 days Lead time = 0 days Line Cost Capacity W3 Capacity W4 1 0 10 60 2 1 20 20 Step 1: Take note of (a) Forecast and stock in PDC, (b) Alternative packing lines in SU - Line 1 is the preferred line, (c) Alternative routes preferred route via SU-DC Step 2: Cheapest route selected Demand propagated to SU (taking 1 week lead time into account) Step 3: Production cost and free capacity of alternative lines considered to determine how much to produce on each line and when. Step 4: W3 production shipped immediately and kept in SU-DC for one week where it will incur the lowest storage cost Step 5: W4 production shipped to SU-DC Step 6: Stock shipped from SU-DC to PDC in W4 to meet demand in W5 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 13 SNP Optimizer Master Data IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 14 14 Optimizer Costs Penalty costs are used to ensure the correct planning behaviour. Costs are only required where a choice needs to be made. Example: if there is only one possible transportation route, no transportation cost is required. Non Delivery Penalty Late Delivery Penalty Max days Late Delivery Safety Stock Penalty Storage Cost Transportation Cost Production Cost Procurement Cost Cost of Increasing Capacities IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 15 15 Delay and Non Delivery Penalty Maintained on SNP1 tab of location-product master Maximum Delay: Maximum number of days that a product is allowed to be delivered after the demand date.
Delay Penalty: Penalty incurred (per Unit per Day) in case the product is delivered late (applicable only up to the Maximum Delay).
Non Delivery: Penalty (per Unit) of product that cannot be delivered within the period specified by the Maximum Delay. Generally Non Delivery Penalty is set as a very high value as Non Delivery of product means direct business loss.
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 16 16 Delay and Non Delivery Penalty (2) Example: In case if 5 Units of the product can be delivered only after 6 days after the demand date, penalty = 5*3000*6= 90000 For the same example: if 5 Unit cannot be delivered within 7 days, penalty = 5*3000000 = 15000000 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 17 17 Storage and Target Stock Penalty Maintained on Procurement tab of location-product master Storage cost: Cost (per Unit per day) to keep product in stock on a location. Example storage costs: Factory = 9 Factory DC = 7 Primary DC = 5 Secondary DC = 7 Example Safety Stock Penalty: 150 Total storage cost at Primary DC for the week 31.2012 in example below = 608*5*7 = 21280 Safety Stock violation for same example = (1600 - 608)*150*7 = 1041600
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 18 18 Transportation Cost Maintained on Transportation Lane Transportation cost: cost of using this lane (per Unit) Example Settings: Do not maintain cost where there is no choice of lane. Cost of 10 for non-preferred T Lane. Cost of 0 for preferred T Lane. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 19 19 Production Cost Maintained on SNP PPM Single level variable cost: Cost per PPM output quantity Example settings: Preferred PPM = 0/Unit Alternative 1 = 1/Unit, Alternative 2 = 2/Unit etc.
Production cost per Unit = 200/100 = 2
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 20 20 Lot Size Maintained in ECC material master, integrated to APO location-product
Minimum Lot Size should be a multiple of the Rounding Value. Rounding value will only work if the Discretization check box is set in the SNP PPM. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 21 Optimizer Settings IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 22 Optimizer Settings The planning result is influenced by: - Master data (as described before) - Optimiser Profile - Cost Profile - Priority Profile
This section describes the settings in the Profiles. These normally do not require regular changes, but it is important to understand the influence of certain parameters.
Optimiser profile Cost profile IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 23 Optimizer Profile Optimization method can be selected here. Select Capacities and Lot Sizes that you want optimizer to respect. These are Hard Constraints. Absolute Deviation means SS short fall quantity (Not the percentage value of short fall quantity) will be multiplied with the penalty to get an absolute value. Shelf life planning can be done with Optimizer.
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 24 Optimizer Profile (2) Quota arrangements can be considered in optimizer. You need to define cost of falling below or exceeding the quota. It can be modified to get an optimized Quota Value, if selected in the background optimizer run. Product interchangeability is supported with Optimizer. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 25 Optimizer Profile (3) Constraints on this Tab are respected in case of Discrete Planning. Number of Periods maintained here are periods by which Optimizer will respect these constraints. It is used for problem simplification.
Linear Planning is unconstrained planning. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 26 Optimizer Profile (4) Runtime is split down between the number of sub problems within the selection by the optimiser. Number of iterations Number of times optimiser will try to improve the first solution it finds. Whichever is reached fist will stop that solution. If all 6 improvements are reached first then it will give an Optimal Solution. Heuristic first solution Reduces runtimes. Runs Heuristics internally to get first solution. Then Optimizer tries to improve the first solution.
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 27 Time Allocation Product decomposition this is used to split up the products in logical sub problems. The total time is then shared across all the problems using an internal formula within the optimiser recognising how many problems and how many elements are there to the calculation. - This time is allocated to problem 1 - After problem 1 completed then time is re-allocated (time left divided by no of problems left using the same dynamic calculation) this is repeated until all problems have been solved.
So optimiser calculates solutions within 120 mins, if it finds 6 feasible solutions each better than the last then the optimiser stops when it reaches 6 even if it has only used half time allocated. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 28 Optimizer Profile (5) Select all the horizons you want Optimizer to respect. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 29 Optimizer Profile (6) IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 30 Optimizer Run IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 31 Interactive Run Points to remember when running the optimiser on-line: Select the product across the full supply chain (i.e. include all relevant locations). If the product is produced on a constrained resource, include all products on this line. In case you want to see results and not wish to save them then after running optimizer and analyzing results you can press refresh and do not save the result. It will however generate optimizer log which can be accessed though transaction /SAPAPO/SNPOPLOG.
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 32 Interactive Run (2) Load your network in planning book and use Optimizer Button which will take you to the next screen shown below: IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 33 Background Run You can schedule your Optimizer Jobs in background. It will create and save orders in Live Cache. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 34 Optimizer Log IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 35 Optimizer Log A detailed log is created for every optimiser run For both background as well as interactive runs.
The log contains a lot of information
- Inputs utilised for the calculation - Outputs from the calculations - Error Messages from the run - Trace File: It is the detail of what happened in the Optimiser server
Transaction /SAPAPO/SNPOPLOG: Here you will see details about Optimizer runs like runtimes, Selection ID, User etc.
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 36 Optimizer Log (2) Optimizer work in 3 steps and related runtimes can be seen here: - Runtime1. Read and delete orders, model creation and populating input log. Runtime2. Model consistency check and computation at ILOG server. Runtime3. Order creation in Live Cache, Output Log generation.
Message log will contain summary of master data consistency check and Solution result Optimal or Feasible.
Tables in Optimizer Log are mentioned below:
Input Parameters: Info about Planning Book, Data View, Cost Profile, Optimizer Profile etc.
Location Products: List of location product given to optimizer as input.
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 37 Optimizer Log (3) Deletion Time Period: Complete horizon in which deletion happened for each location product. Input Log: Below mentioned are few important tables:
ET_BUCKDF Bucket Definitions
ET_LOCMAT Location Products
ET_QTAHEAD Quota Arrangement (Header Data) ET_QTAITEM Quota Arrangement (Item Data) ET_RESOURCE Production Resources IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 38 Optimizer Log (3) ET_ARC T Lane MOT ET_ARCMAT Product specific MOT ET_RESC Available capacity of Production resources ET_PROMO PPMs
ET_PRORES Resource consumption in PPMs ET_DEMAND Demands
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 39 Optimizer Log (4) Results Log: Below mentioned are few important tables: IT_LOCMAT Location Products IT_RESOURC Production Resources (Standard capacity) IT_ARCMAT Stock Transfers
Message Log: It contains Stepwise details of the Optimizer run.
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 40 Optimizer Log (5) Trace File: This is a large file containing details of the optimizer run at the server. This lists the sub problems the optimiser has used product decomposition for to break up the problems. It also states success of that sub problem. Optimum Solution Found - This is where the optimiser has found solutions that cannot be improved within the number of iterations maintained in the optimizer profile.
Feasible solution found for this sub problem, but time-out - This is where the optimiser has found a solution, however it has not had time to complete improvements.
No Solution Found - This is where the problem the optimiser is trying to solve cannot be solved in the time allocated. No results will be seen in the planning book for these products. Optimizer patch upgrade should be considered. IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 41 Planning Scenarios IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 42 SNP Optimizer Scenarios Scenario 1: Choice of plant (more than one plant supplying to the customer)
Scenario 2: Choice of PDS within a plant
Scenario 3: Choice of source of supply - internal production vs sub-contractor
IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 43 Planning Scenarios 1 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 44 Scenario 1: Choice of plant (more than one plant supplying a customer) DC Mfg Plant 2 Mfg Plant 1 Demand forecast at DC Plant 1 is the preferred source, Plant 2 is 2 nd option Plant 1 is loaded 100% before loading Plant 2 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 45 Scenario 1: Choice of plant (more than one plant supplying a customer) Master Data Product S100001 DC 10001 Mfg Plants BP0Y ( P) BP01 Source of Supply PPM_S100001_BP0Y PPM_S100001_BP01 PPM Single level cost 1 99 Resources WPP_ROL_BP0Y_001 WCM_HRM_BP01_001 Procurement type E E Transportation Lane Mode Duration Transport ation cost BP0Y -> 10001 Truck 24 H 0.01 BP01 -> 10001 Truck 48H 0.1 Procurement cost Prod storage cost 0.01 Safety stock penalty 0.01 DC Mfg Plant Mfg Plant S100001 @ BP0Y S100001 @ BP01 Procurement cost Prod storage cost 0.05 Safety stock penalty 0.01 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 46 S1 Material Master data Material (S100001) @ DC (10001) SNP1 tab and Procurement tab Material (S100001) @ Primary plant (BP0Y) SNP1 tab and Procurement tab Material (S100001) @ Secondary plant (BP01) SNP1 tab and Procurement tab IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 47 S1 Transportation data Transportation Lane BP0Y -> 10001 BP01 -> 10001 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 48 S1 Resource data Resource capacity @ BP0Y Resource capacity @ BP01 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 49 S1 PPM data PPM @ BP0Y PPM @ BP01 Cheaper plant IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 50 Planning situation before run Planning Book Forecast @ DC 10001 Planning Book Production (planned) @ plant BP0Y Planning Book Production (planned) @ plant BP01 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 51 Planning situation before run Resource load at resource 1 Resource load at resource 2 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 52 Planning situation after run DC 10001 Plant1 BP0Y Plant1 BP01
Cheaper plant loaded to 100% capacity
Cheaper plant loaded to 100% capacity
Remaining demand is fulfilled by alternate plant IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 53 Planning situation after run Resource load at resource 1 Resource load at resource 2 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 54 Planning Scenarios 2 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 55 Scenario 2: Choice of PDS within a plant Same product can be manufactured via multiple methods PDS1 is the preferred options, PDS2 is the 2 nd option PDS1 is fully loaded before loading PDS2 PDS1 PDS2 Mfg Plant IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 56 Scenario 2: Choice of PDS within a plant Master Data PDS1 PDS2 Mfg Plant Product S200001 Mfg Plants BP0Y Source of Supply PPM_S200001_P_BP0Y PPM_S200001_BP0Y PPM Single level cost 1 2 Resources WPP_ROLA_BP0Y_001 WBFIN_JSM_BP0Y_001 Requirement Type Non delivery Delay penalty Max Delay Regard as customer demand 0 0 0 Regard as corrected demand forecast 0 0 0 Regard as demand forecast 21 1 20 Regard as demand forecast 1,000 1 10 Regard as demand forecast 2,000 1 20 Regard as demand forecast 3,000 1 30 S200001 @ BP0Y IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 57 S2 Material Master data Material (S200001) @ Plant (BP0Y) SNP1 tab and Procurement tab IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 58 S2 Resource data Resource capacity 1 WPP_ROLA_BP0Y_001 Resource capacity 2 WBFIN_JSM_BP0Y_001 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 59 S2 PPM data PPM 1 - Primary PPM 2 - Secondary IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 60 Planning situation before run Planning Book Forecast @ Plant BP0Y IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 61 Planning situation before run Resource load at resource 1 WPP_ROLA_BP0Y_001 Resource load at resource 2 - WBFIN_JSM_BP0Y_001 IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 62 Planning situation after run Plant BP0Y Demand is fulfilled by preferred resource First preferred resource s is loaded 100% and remaining demand is fulfilled by another resource IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 63 Planning situation after run Resource load at resource 1 Resource load at resource 2 Preffered resource is utilized t0 100% capacity First Preferred resource is loaded 100% and remaining demand is fulfilled by another resource IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 64 Questions!! IBM Global Business Services Copyright IBM Corporation 2007 SCM SOQ| 12-Aug-14 65 Thanks You!!