Introduction to Supply Chain Modeling
SAP APO OverviewByV K Agnihotri
1Oct-131
2SNP Process Flow
Planning Area AdministrationPlanning Method Determination & Profile Settings Supply NetworkPlanning RunTransport Load BuildingDeployment RunConversion intoPP/DS ordersPP/DS PlanningRelease of SNPPlan to DPInteractive PlanningAPO Master Data Setup Model/Version Creation Supply Chain Model Setup Release of Demand Plan to SNP
Simulation
Management by Exception
2
3
Contents:SNP Run Using OptimizationIntroduction to OptimizationOptimization in SNPConfiguration for Using the SNP Optimizer
3
4At the conclusion of this unit, you will be able to:
SNP Run Using Optimization: Unit ObjectivesExplain the concept of OptimizationExplain how the SNP run is carried out using the SNP OptimizerDefine the relevant costs that are used by the SNP Optimizer to generate a supply planIdentify where the costs are maintainedDescribe how the costs influence the optimization resultExplain the what-if process in SNP Optimizer
4
Introduction to Optimization Models
5
6Optimization-Based Planning ModelsIn 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.These kinds of models are usually called mathematical programs.
6This section will introduce the broad concept of mathematical optimization. Mathematical Optimization is the application of mathematical methods to a group of decisions and constraints to find the best possible combination of decisions as measured by a benchmark goal.Mathematical optimization is usually the foundation which an APS is built upon. While the algorithms and heuristics are too complex to discuss, we will learn how to solve simple problems.The main difference between Material Requirements Planning (MRP) and constraint-based planning (CBP) is that MRP assumes infinite resource capacities while CBP explicitly takes physical, processes and other constraints into consideration.
7Decision VariablesDecisions 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.Examples of Decisions Variables:How much do we invest in new machines?How much do we spend in labor?How many units to make?Repair or replace?
7Every optimization model must have decision variable. Without it, there is no decision to make and nothing to optimize.Decisions are the root of the problem. Typically, decisions take the form of resource allocation.
8Objective FunctionsThe Objective Function is the single benchmark for evaluating all combinations of decisions that satisfy the constraints. It usually represents a quantifiable goalExamples of Objective Functions:Minimize total production costsMinimize total material costsMaximize total sales revenueMinimize total inventory costsMinimize total lead time
F(x,y2)=
8
9ConstraintsConstraints represent limitations on which decision can be made and how decisions can be made. For example, the production capacity is 5000 Units/day.Constraints are also used to apply business rules when solving a problem. For example, all inventory must be non-negative.Other examples of constraints:Market conditions/demandMaterial/suppliesCapacity/resourcesTransportation/logisticsPolicy/managerial
9If a production process has no limiting constraints, then it would produce an infinite amount of systems goal and purpose. This would mean infinite revenue. Is this possible?In the theory of mathematical programming, limiting constraints are also referred to as binding constraints. In this class, we use bottlenecks and limiting constraints interchangeably.Note that while eliminating the existing/current constraint(s) improves the process, it may not necessarily make the entire system of production processes most efficient.
10Steps for Constructing a Planning ModelTypically, a simplified production model of the existing production process that we want to model.
What are the decisions variables?
What are the constraints?
What is the objective function?
F(x,y2)=
10
11Linear and Integer Programming Models
11
12A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear constraints.The linear model consists of the followingcomponents: A set of decision variables. An objective function. A set of constraints. Introduction to Linear Programming
12
13Introduction to Linear ProgrammingThe Importance of Linear ProgrammingMany real world problems lend themselves to linear programming modeling. Many real world problems can be approximated by linear models.There are well-known successful applications in:ManufacturingMarketingFinance (investment)AdvertisingAgriculture
14The Importance of Linear ProgrammingThere are efficient solution techniques that solve linear programming models.The output generated from linear programming packages provides useful what if analysis.Introduction to Linear Programming
14
15Introduction to Linear ProgrammingAssumptions of the linear programming modelThe parameter values are known with certainty.The objective function and constraints exhibit constant returns to scale.There are no interactions between the decision variables (the additivity assumption).The Continuity assumption: Variables can take on any value within a given feasible range.
16The Galaxy Industries Production Problem A Prototype ExampleGalaxy manufactures two toy doll models:Space Ray. Zapper. Resources are limited to1000 pounds of special plastic.40 hours of production time per week.
16
17Marketing requirementTotal production cannot exceed 700 dozens.Number of dozens of Space Rays cannot exceed number of dozens of Zappers by more than 350.Technological inputSpace Rays requires 2 pounds of plastic and 3 minutes of labor per dozen. Zappers requires 1 pound of plastic and 4 minutes of labor per dozen.The Galaxy Industries Production Problem A Prototype Example
17
18 The current production plan calls for: Producing as much as possible of the more profitable product, Space Ray ($8 profit per dozen).Use resources left over to produce Zappers ($5 profit per dozen), while remaining within the marketing guidelines.The current production plan consists of:
Space Rays = 450 dozenZapper = 100 dozenProfit = $4100 per weekThe Galaxy Industries Production Problem A Prototype Example8*(450) + 5*(100)
18
19Management is seeking a production schedule that will increase the companys profit.
20A linear programming model can provide an insight and an intelligent solution to this problem.
20
21Decisions variables:
X1 = Weekly production level of Space Rays (in dozens) X2 = Weekly production level of Zappers (in dozens).
Objective Function: Weekly profit, to be maximizedThe Galaxy Linear Programming Model
21
22Max 8X1 + 5X2 (Weekly profit)subject to2X1 + 1X2 1000 (Plastic)3X1 + 4X2 2400 (Production Time) X1 + X2 700 (Total production) X1 - X2 350 (Mix) Xj> = 0, j = 1,2 (Nonnegativity)The Galaxy Linear Programming Model
22
232.3 The Graphical Analysis of Linear Programming The set of all points that satisfy all the constraints of the model is called aFEASIBLE REGION
23
24 Using a graphical presentation we can represent all the constraints, the objective function, and the three types of feasible points.
24
25The non-negativity constraints
X2
X1
Graphical Analysis the Feasible Region
26
1000500
FeasibleX2Infeasible
Production Time3X1+4X2 2400
Total production constraint: X1+X2 700 (redundant)
500700
The Plastic constraint2X1+X2 1000
X1
700
Graphical Analysis the Feasible Region
27
1000500
FeasibleX2Infeasible
Production Time3X1+4X2 2400
Total production constraint: X1+X2 700 (redundant)
500700Production mix constraint:X1-X2 350The Plastic constraint2X1+X2 1000
X1
700
Graphical Analysis the Feasible Region
There are three types of feasible pointsInterior points.
Boundary points.
Extreme points.
28Solving Graphically for an Optimal Solution
29
The search for an optimal solution
Start at some arbitrary profit, say profit = $2,000...Then increase the profit, if possible......and continue until it becomes infeasible
Profit =$4360
5007001000500X2X1
30 Summary of the optimal solution Space Rays = 320 dozen Zappers = 360 dozen Profit = $4360This solution utilizes all the plastic and all the production hours.Total production is only 680 (not 700).Space Rays production exceeds Zappers production by only 40 dozens.
30
31
Objective Functions, Decision Variables, Constraints in APO
31
32SNP Run Using Optimization: Business Scenario
A company uses the SNP optimizer run , to obtain an optimal solution of their mid-range product flow and to create the production and transportation plan. The Optimizer finds a feasible solution that will take all production and transportation capacities into account while determining a least cost solution.
32
33SNP Optimization
One time period (bucket)Demand at a location
Dependent demand at a location
Processing flow
33
The SNP optimizer makes sourcing decisions based on optimization basedplanning. This means that it uses cost as a basis for deciding the following:
Which products are to be produced, transported, procured, stored, and deliveredand in which quantities (product mix)Which resources and which production process models (PPMs) or productiondata structures (PDSs) to use (technology mix)The dates and times for production, transportation, procurement, storage, andDelivery The locations for production, procurement, storage, and delivery and the source and destination locations for transportation
APO-SNP uses linear programming concepts to determine the cost optimization model. Linear programming (LP, or linear optimization) is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowestcost) in a given mathematical model for some list of requirements represented as linear relationships. Linear programming is a technique for optimizing linear objective functions, subject to linear equality and linear inequality constraints.SNP Optimization
SNP Optimization
There are three parts, or elements, of the optimization problem, which are managed in linear programming:
Objective functionThis is the business goal that the decision maker is trying to achieve (e.g., minimize total cost or maximize profit). A question that might be asked is: What is the SNP optimizer trying to achieve? This might translate, for example, into a simple mathematical equation; Maximize {Revenue Transportation Costs Inventory Holding Costs Penalties}
Decision variablesThese are the unknowns that would affect the outcome (e.g., production date and quantity). What does the SNP optimizer control? Some examples are which plant we manufacture and ship the products to, lot size, and lead time parameters.
SNP Optimization
ConstraintsConstraints are physical and logical limitations (e.g., demand, material availability,and resource capacity). A question that the decision maker might ask is:What will constitute an acceptable optimizer solution? One example is work center capacities. The defined constraints can be hard or soft. Hard constraints are restrictions that are difficult to change (for example, resource capacity), while soft constraints offer flexibility (for example, safety stock). Violations of these constraints are translated into cost penalties.
SNP Optimization StepsFrom a technical perspective, SNP optimization happens in three steps:
1. Data collectionMaster and transactional data are read from the SAP APO database and SAP liveCache and formatted into an input file. The input file is sent to the optimizer server.
2. OptimizationThe SNP optimizer runs a C++ mathematical program that runs on the optimization server. The output from the optimization is formatted into the output file.
3. Results created in SAP liveCache The result of the optimization planning run is created in SAP liveCache. The transaction for accessing the SNP optimizer explanation log is Transaction /SAPAPO/SNPOPLOG.
37
38Optimization MethodsLinear ProgrammingContinuous Linear Optimization ProblemsPrimal Simplex MethodDual Simplex MethodInterior Point MethodDiscrete Linear Optimization ProblemsMixed Integer Linear ProgrammingPrioritizationDecompositionVertical Aggregated PlanningHorizontal Aggregated Planning
38Select the solution method you want to use to optimize your supply network planning:Basic SolveThe optimizer creates an optimal solution based on all available data. This method is the normal simplex method in which all the variables are continuous.DiscreteThe optimizer creates an optimal solution based on all available data. This method is the same as Basic Solve, except that some variables can be made discrete through the profiles. Transportation can be made discrete through the lot size profile, and Production is made discrete through the production process model.Time AggregationThe optimizer speeds up the solution process by grouping data according to time buckets, solving the problem for the earliest time bucket first, then proceeding sequentially through the remaining time buckets.Product DecompositionThe optimizer speeds up the solution process by building groups of products, and solving the problem one product group at a time according to the specifications in the Window size field of the SNP Optimizer profile.Priority DecompositionThe optimizer speeds up the solution process by grouping according to priorities. The optimizer solves the highest priority problem first, then proceeds sequentially through the remaining prioritized groups.IncrementalThis method enables you to select a subset of products before performing the Optimization run. Note: The aggregation and decomposition methods speed up the optimization process, but they do not necessarily produce the optimal solution.
39Optimization MethodsDiscretization
Discretization until a certain dateDetailed Discretization for different restrictions for daily, weekly, or monthly bucketsMaintain discretization in PPM or transportation lane individually
39
Differences between Heuristics and OptimizersWhile designing SNP optimizer, it is important to understand the difference between heuristics and the optimizer.
The simplest SNP algorithm, SNP heuristics, uses lot sizing and lead time calculation and yields an unconstraint plan.
On the other hand, the SNP optimizer creates a finite plan but requires extensive master data maintenance.
Unit11: Optimization | 2005 41
Decision VariablesProduction lot sizesTransportation lot sizesCapacity increase
ObjectivesLateness Storage costs Transportation costs Production costsPenalty for increasing capacityPenalty cost for not maintaining safety stock*Penalty cost for late or non delivery*
Optimization Parameters
ConstraintsProduction capacitiesTransportation capacitiesHandling capacityDue dates (demands)Safety stockDiscrete ValuesProduction Lot SizeTransportation Lot Size
41
SNP Optimizer ConstraintsDuring the SNP optimization run, the system considers hard and soft constraints. The planning run searches through all feasible plans to find the most optimal and cost-effective plan.
The feasibility of a solution will involve due date constraint violations or safety stock constraint violations to find the optimal plan. Due dates and safety stock are soft constraints, which are restrictions that to which you can assign violation costs.
Hard constraints, in turn, reflect the actual capacity constraint, which we cannot change. An example of a hard constraint is production or resource capacity limits per day.
43 The optimizer profile determines the constraints considered for a certain optimization. If you switch off a certain constraint, the system checks againt unlimited capacity, but the costs are still considered
AABCD
Storage CapacityTransport CapacityHandling CapacityProduction CapacitySafety Stock Violation
Determines which constraints areconsidered
Other Constraints
43
SNP Optimizer CostsDuring supply chain modeling of a network, an organization need to determine various supply chain cost factors to which will lead to determine the optimization objective.The defined costs can be either control costs (for example, production costs for computer servers) or penalty costs (for example, not achieving the delivery date promised to the customer)
The overall goal of the optimizer is to minimize costs, taking into consideration the various defined priorities (for example, demand typesales orders versus forecast). The company may like to prioritize sales orders first and then the forecast.
45Costs in the APO Environment (I)Model considers the following costs:Higher non-delivery cost results in: forced productionHigher relative storage cost results in: moving products from one location to another ahead of requirementTransportation cost used to: prioritize source locationTo reduce stock Increase the storage costsCosts are Interdependent!
45The costs and penalties considered in the optimization run have various affects on the results of the run. Some examples are described in this slide.
46Costs in the APO Environment (II)To specify a site manufacturing priority: Production cost in preferred site Transportation cost from preferred siteTo influence inventory storage location: Relative storage costs between sitesTo ensure meeting inventory targets: Safety stock violation penalties
46
47Costs in the APO Environment (III)To meet delivery date early/lateMeet Early: Storage CostMeet Late: Maximum Delay Allowed Storage CostTo use stock before build Storage CostTo prioritize a site for downstream supplyVary Transportation Cost
47
Unsatisfied Demand or DelayWe need to define cost penalties in SAP APO for not satisfying or delaying customer demand
There are two defined parameters that can be maintained to be either global- or location-dependent. The latter takes precedent if both are maintained. The cost parameters that are maintained for unsatisfied demand or delay are as follows:
The minimum cost parameter for demand required by the optimizer is penalty for non-delivery (ND), which is the cost per base unit of demand not satisfied. If this parameter is set to zero, the optimizer will not satisfy any demand.
The delay penalty is another cost parameter, which is defined as the cost per day that a unit of demand is delivered late. If the APO-SNP planning run is performed in buckets, the system calculates the cost per day in buckets. In the master data, we maintain the maximum number of allowed delay days along with the delay penalty field.
The master data is maintained in the SNP1 tab in product master data Transaction /SAPAPO/MAT1.
Profiles Used by the SNP OptimizerThe SNP optimizer result is heavily influenced by the various profile definitions.
The profiles with further control parameters dictate how the optimizer will perform the optimization run. The main profile definitions used by the optimizer during the optimization run.
The two most important profiles used are the optimizer profile and cost profile
Optimizer ProfileIn the optimizer profile, we define the optimization method in the form of linear programming.
The optimizer profile has many tabs The General tab is where we define the supply chain constraints to be considered. Any changes made to the optimizer profile need to be saved before executing the optimizer run.
There are three primary methods for solving continuous linear optimization problems with the optimizer:Primal simplex methodDual simplex methodInterior point method
All three methods arrive at the same optimal solution. The main difference in the application of these methods is the runtime. The method selection is defined in the Solution Method tab in the optimizer.
Basics of the Supply Network OptimiserThe basic idea of the SNP optimizer is to plan the entire supply chain distribution, production and procurement at optimal costs by modeling the complete supply chain as linear equations and solve them by linear programming (LP) or mixed integer linear programming (MILP). The difference between the two lies in the consideration of discrete decisions, as lot size intervals.
The equations have the structure displayed in the following lines. As asimplification the time dependency is neglected. The objective function isMin { Product [(D S) * Penalty + S * SupplyChainCost]} ------- (10.1)
where D represents the total demand quantity, S the total supply quantityand all entries are product and partially location dependent. The supplychain costs contain costs for production, procurement, transport, storageand handling, the penalties are costs for lateness, non delivery and safetystock violation. The constraints for the plan are the limited quantities that can be produced in the plants
Optimiser Set-Up and ScopeSNP optimisation is either accessed from the SNP planning book or which is the more usual way defined as a background planning task in transaction /SAPAPO/SNPOP.
Optimiser Set-Up and Scope Scope & HorizonThe scope for optimisation is selected by products and locations. If a location product is missing e.g. the input component of a PPM the optimizer assumes its availability. Neither constraints nor costs result from excluded Location products. Orders are only created within the optimisation horizon.
Master DataAdditionally to the maintenance of many costs in multiple master data objectsthe usage of the SNP optimizer requires some other master data settings as listed in table
Optimiser Set-Up and ScopeCosts and Constraints
The costs for procurement, safety stock, storage and handling, which aremaintained in the product master, relate to the base unit of the product,
Unit11: Optimization | 2005 55SNP Decisions
55
56Optimization Total CostsTotal Cost (Sum Total)Source of cost data
ProductionPPM
StorageResource
Production resource expansionResource
Storage expansionResource
Penalty cost for safety stockCost Profile
Transport costResource
Transport capacity expansionResource
Penalty for non-deliveryMaster data
Handling capacity expansionResource
Procurement costsMaster data
Delay PenaltyMaster data
56REQUEST THAT GRAPHICS RECREATES THIS TABLE
57Relevant Costs for the Optimizer
Additional costsPPM-header: Variable costsSafety stock:Penalty (cost profile)Material priority:Late delivery (penalty)Non delivery (penalty)ProductionTransportStorageHandling
57
58Running the SNP Optimizer with ConstraintsAfter the constraints are formulated, you run the SNP optimizer to produce the optimal solution. The optimizer utilizes its underlying logic to reveal the best combination of results based on the constraints to produce the optimal solution.
58
59Input Parameters for SNP Optimization RunPlanning VersionLevel IDProduct and LocationPlanning Book and Data ViewPlanning Start and End DateOptimizer and Cost ProfileOptimizer Bound Profile
59Several parameters need to be set at the start of an SNP Optimization run:Planning VersionProduct - if planning individual product Time Bucket Profile - to define the bucketing of the data for planningStart/End Dates - to define the planning horizonOptimizer profile Cost profile
60SNP Optimization Run ResultsDistribution PlanProduction PlanSNP Resulting CostsAlerts
60SNP Resulting CostsThe total costs associated with the replenishment solution proposed by the system; the total costs are broken down in the remaining entries in the results screen and are described in this table, including:Total production costsTotal storage costsTotal costs incurred as a result of a requirement to expand storage capacity.Total penalty costs incurred because the safety stock level fell below the specified requirement for safety stockTotal transportation costsTotal costs incurred as a result of a requirement to expand the handling capacity of one or more resources.Total costs incurred as a result of a requirement to expand the transportation resource capacity.Total costs incurred as a result of a requirement to expand the production resource capacity.Total penalty costs incurred as a result of a delivery that is late.Total penalty costs incurred as a result of a delivery of a product that is less than the quantity ordered.
61SNP Run Using Optimization: Unit Summary
You are now able to:Explain how the SNP run is carried out using the SNP OptimizerDefine the relevant costs that are used by the SNP Optimizer to generate a supply planIdentify where the costs are maintainedDescribe how the costs influence the optimization resultExplain the what-if process in SNP
61
ModelIn our example we look at a single-stage production problem with external sourcing partners. As simple as it might look, the problem is a good starting point for experimenting with the SAP APO optimizer and still provides quick results. The objective function of the (MI)LP model is designed to reduce inventory, optimize production quantities, and optimize procurement of components while maximizing the customer service level.
Technically, the objective is to create a least cost production plan considering the demands, the constraints, and the costs for: production non-delivery (penalty costs) storage
The Supply Chain StructureLet us assume a company selling three main products, P1, P2, and P3. P1is the high-grade and expensive product, P2 and P3 are mid-grade and low-grade products, respectively.
The company has three customer regions C1, C2, and C3 in the system (one might think of DCs, retailers, or large industrial key customers).
All three products are made in the factory F1 which has one production line represented by resource R1. As producing any of the products consumes a certain amount of capacity on the production resource R1 all three products compete for available R1 capacity.
Figure-1 below shows the structure of this example supply chain we want toimplement in SAP APO demonstrating the SNP optimizer setup. the material flow is from left to right along the arrows representing the permissible goods movements, modeled as transportation lanes The customers C1, C2, and C3 can order any of the products P1, P2, and P3. The optimizer decide whether to source it from S1 or S2.
The Supply Chain Structure
Raw Material at Vendor & Plant
Raw material procurement costs in the supply chain example in currency units per piece. The high costs for procurement directly in the factory are an easy way to prevent the optimizer from circumventing the suppliers in the model
FG Costs
Location independent costs in the supply chain example. Delay and no delivery penalties only apply to customer locations where demand is created
ResourceCapacityR18 hrs/day
Production process data in the supply chain example. The values refer to a product base quantity of 1000 pieces, e.g., it takes six hours of R1 capacity to make 1000 pieces of P1
Screen clipping taken: 17/07/2013, 4:32 PM
ObjectivesDecision VariablesConstraints
SNP, Distribution
& PPLateness,
Storage Costs,
Transportation Costs,
Production Costs,
Purchase of additional Capacities
Production Resources, Transportation (Fleets)
ProductsLateness
Production Lot Sizes
Transportation Lot Sizes
Purchase of Additional CapacitiesProduction Capacities
Transportation Capacities Handling Capacity
Due Dates
Safety Stock
Discrete Values
Production Lot Size, Transportation Lot Size,
Extra Shifts
DSLateness
Makespan
Setup CostsResource Allocation (Alternative Machines/Storage)
Start Dates
NOT Lot Sizes or Alternative RecipesTime Constraints (maximal due date, shelf life Minimal production stages, campaign)
Due Dates
Setup Times,
Productivity
Resource network
Calendar
Shifts,
Effectivity of receipts
What?Where ? How ?When ?
DecisionProducts to plan.To source a product from in the given network To produce?
Which process
Which componentsTo produce a
product
Key driversPriority for planning each product Total production cost per location:
Transportation cost
Available capacityTotal cost of production process:
Components
ProcessCost of missed due date:
Late penalty
Storage costs if produced early
Available capacity
DataDemand priority
Customer orders
Forecast
Safety stock Production cost (PPM)
Transportation cost
Resource available capacity PPM
Storage cost
Resource Capacity
Resource costs Demand priority
Delay cost
Max delay
Non-delivery cost
Storage cost