Supply Chain Management Blog Posts by SAP
Expand your SAP SCM knowledge and stay informed about supply chain management technology and solutions with blog posts by SAP. Follow and stay connected.
cancel
Showing results for 
Search instead for 
Did you mean: 
carsten_schumm
Product and Topic Expert
Product and Topic Expert
31,076

Introduction


To find the cost-optimal solution, the optimizer transforms the IBP for Supply model into a mathematical representation. This representation is called Mixed-Integer Linear Program (MILP, see also Linear programming - Wikipedia, the free encyclopedia). This MILP can be solved to a mathematical proven optimal solution. A basic understanding of these MILPs is required for the further explanations.

Continuous variables


The variables in the model resemble the decisions, material flows and inventory-situation in the Supply plan:

  • Production: each possible production gets its own variable, which equals the produced amount of the main output-product. For each period and production (P-rule) combination one variable is required.

  • Transport: each possible transport inside the network or to a customer requires an own variable. They equal the transported amount of a distinct product over a transport-lane. For each period and transport C- and T-rules) one variable is required.

  • External receipt/procurement: for each period and external receipt (U-rule) one variable is used to define the amount of procured material.

  • Demand: for each consensus demand a variable resembles the satisfied amount. A helper variable with the non-delivered amount (demand quantity minus the satisfied amount) is used to penalize the non-deliveries in the objective function.

  • Inventory: for each period, product and location-combination one variable reflects the current inventory level.


Binary variables


Currently two features of the model require binary decisions:

  1. Minimum lot-sizes on transport and production: the optimizer needs to decide to transport resp. produce 0 or at least the minimum lot-size amount. Therefore a binary variable is required for each period to represent this decision.

  2. Fix costs: similar to the minimum lot-sizes a decision variable is required for the fix costs in each period.


As binary (and integer) variables have a high impact on the MILP-solver runtime, it is recommended to avoid them as far as possible. By setting the discretization horizon in the optimizer profile it is possible to limit these binary decisions to the first periods in the planning horizon:



Constraints


The constraints in the mathematical model combine the variables with the business-logic of the Supply model:

  • Stock-Balance equation: this equation ensures the integrity of the inventory level. It also ensures the correct material-flow and satisfaction of the bill-of-material for the Production-rules, as the same variables are used in the different equations. For each period, product and location combination it looks like this:
    inventory-level in period n =
        inventory-level in period n-1 // carry-over of previous period
        + incoming transports         // all transport arriving in this period
        + production receipts         // production-receipts (as main product or co-product)
        + external receipt            // procured amount
        - outgoing transports         // all transport leaving in this period
        - production component usage  // used amount for production of other products

  • Resources: for all resources and periods a constraint ensures that the capacity of the resource is not exceeded:
    sum of resource-usages <= resource-capacity

  • Adjusted and minimum values: These values set resp. restrict some of the decision variables. But as they can't be satisfied in all cases (e.g. due to missing material) they are modelled as semi-hard (often also called pseudo-hard) constraints. This avoids infeasibilities in the mathematical model. Due to very high costs for violations of these constraints they are usually all fulfilled.


Objective function


As our model is cost-based, the objective is of course to minimize these costs. Consequently the objective function contains all costs:

Objective function =

  all non-delivery variable costs

  + all transport variable costs

  + all transport fix costs

  + all production variable costs

  + all production fix costs

  + all external receipt variable costs

  + all external receipt fix costs

  + all inventory holding variable costs

  + all inventory target violation variable costs

  + all maximum inventory violation variable costs

Variable costs are based on the corresponding amount of the product. Sometimes they are also called rate costs.

Example: variable costs for transport of product P1 from location L1 to location L2 are 0.001 in period 3. If an amount of 100 is transported in this period, this results in 100 * 0.001 additional costs in the objective function.

Fix costs arise if an amount is greater than 0, but are independent of the amount itself.

Example: fix costs for transport of product P1 from location L1 to location L2 are 1.5 in period 2. If any amount greater than 0 is transported in this period, this results in additional costs of 1.5 in the objective function.

Note: The different cost-types can be multiplied with global cost-factors set in the optimizer profile:


Example: by setting the global cost-factor for External Receipt Variable Cost to a small value (e.g. 0.001), it is possible to check if the procurement costs hinder demand-satisfaction.

In the message-protocol the different parts of the objective function in the solution can be seen:


Additionally the objective function value and its bound are displayed. In some cases (e.g. decomposition used) the bound is not available.

Conclusion


This rough description hopefully eases the usage of the optimizer in IBP for Supply. Please let me know if further questions on this topic arise. Also please note that further blogs concerning the optimizer are planned during the next months.

75 Comments
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi,

for consensus demands you'll need mainly CUSTOMER, PRODUCT and SOURCECUSTOMER.

for independent demands you'll need mainly LOCATION, PRODUCT and SOURCELOCATION.

As I can't offer consulting for such non optimizer-related modelling questions here, please use the community function 'Ask a question' if the application help isn't sufficient.

Regards, Carsten
carsten_schumm
Product and Topic Expert
Product and Topic Expert
Hello Tej,

minimum and incremental lot-size aren't supported for external receipts. Please model such a 'receipt' as a production sources which just outputs the corresponding product and doesn't require any component.

Another option would be to set the minimum and incremental lot-size on a location source from the vendor location to a consuming location. To avoid inventory at the vendor location you'll then need to add inventory holding costs there.

Kind regards, Carsten
tejbonagiri
Explorer
0 Kudos
Hi Carsten,

 

Thank you very much for quick response as usual 🙂

 

Best Regards,

Tej
cemijares
Explorer
0 Kudos
Hi Carsten,

I wanted to ask any changes from the statements above for 1802.

COPT10 parameters -- If the client has invested a great deal in implementing specific COP10 parameters in their APO systems, will there be options to up-port these solutions without going through new POs with Optimization Expert Consulting?  Examples would be blocking some buckets in the et_constraints table via COPT10 parameters, amongst others.

The fairshare behavior represented previously by the cost-functions can be checked by optimization output log tables, as it had been in APO as well?

 

Trasportation methods with different costs, in one transportation lane --> what was the reason why this was removed in IBP?

 

Thanks a lot!

Christia
cemijares
Explorer
0 Kudos
Hi Dinesh,

By any chance, have you sorted this one out already?

Thanks

Christia
carsten_schumm
Product and Topic Expert
Product and Topic Expert
Hello Christia,

you have to go over Optimization Expert Consulting if you can't model it via standard features. As the data model is different between APO and IBP many of the special parameters aren't available in IBP. For example the one for et_constraints you mentioned. But there are good chances that such a functionality can be achieved via aggregated constraints and/or adjusted values.

Input- and Output-tables are available via the optimizer diagnosis files (see note 2427153 for more information), but their main purpose is for SAP support only.

Concerning different costs for one transportation lane: they are supported via mode of transport.

Kind regards,
Carsten
tejbonagiri
Explorer
0 Kudos
Hi Carsten,

Can you please suggest if it is possible to control the costs associated with Adjusted Transport Receipts so that it can be violated to meet the Demand.

In situations, where Demand > Adjusted Transport Receipt, we want Non-delivery to be given higher priority over Adjusted (Non-Delivery Costs to be greater than costs associated with Adjusted).

We cannot use Minimum Transport Receipts as it doesn't consider constraints in upstream location. Please let us know your thoughts on this,

Thanks,

Tej

 
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Tej,

per definition the adjusted constraints must always be treated with the highest priority. Thus you can't achieve the wanted behavior via costs.

Minimum transport would be the correct way for this - but as you noted they don't have an impact on the upstream location. Please create a request on the Influencer Portal to make the requirement visible (ideally we have a new key-figure to define minimum transport quantities which are respected on the lane itself, like MINCONSTRAINEDDEMAND).

As a workaround you can use a minimum aggregated transport which just contains the one transport. But this is probably a little bit cumbersome to handle.

Kind regards,
Carsten
tejbonagiri
Explorer
0 Kudos
Hi Carsten,

Thank you for your quick response. In this scenario, we're are already maintaining Minimum Aggregated Transport, but the client also wants to have a minimum constraint at lowest level.

I think it would be great if we have one of the 2 options

a) New KF like MINCONSTRAINEDDEMAND on the lane which checks upstream location's constraints

b) Control pseudo costs of Adjusted so that they're less than Non-Delivery (some what similar to user constraints in APO),

But, I guess the only way now is to create a request in Influencer Portal, Please confirm & I'll do that.

Thanks again,

Tej
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Tej,

you can have several aggregated constraints which cover the same transport (hope there is no limitation on application/excel level). So you could define one at the lowest level and others at higher levels.

Nevertheless please add an request for option a) in the Influencer Portal.

Thanks, Carsten
tejbonagiri
Explorer
0 Kudos
Sure, Thanks Carsten, will do.
Former Member
0 Kudos
Hi Carsten,

It may sound repetitive to you, but I have to say 'a great article indeed'.

I have just started my journey in IBP and facing a difficult problem to solve.

Problem: Client has 4 product families for production. Each product family has 4-5 individual products. Company wants to produce one family for 20 days then keep switch to a different product family. But the idea is to produce one family for 20 days. They want to generate a rough cut plan for this situation.

Optimizer  as of now is mixing product families in the final output.

We have tried production cycle lot size, production lead time, transportation minimum lot size but none are giving satisfactory results.

Do you have any insights?

 

 
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Abhishek,

thanks for your comment!

Currently such results can only be achieved by limiting the optimizer to produce only the wanted product family. I.e. the production sources for the other product families needs to be disabled. There are several options to do this. For example the mentioned production cycles: there you need to set key-figure SUBPERIODFIRSTPRODUCTION to 0 for the production sources that shouldn't produce.

Another option is to define aggregated production constraints for the different product families. With a maximum value of 0 you can easily disable the product families that shouldn't be produced.

Kind regards,
Carsten
SatishWaghmare
Active Contributor
0 Kudos
Carsten,

Great article. Thanks a bunch for sharing this information.

I have a question related to S&OP Optimizer not considering the Additional Lot-Size Policy Demand(ADDITIONALLOTSIZEDEMAND).  We noticed that Additional Lot-Size Policy Demand was not fulfilled by S&OP Optimizer.  However there was enough capacity available weeks prior to weeks in which this demand was exist.  The Additional Lot-Size Policy Demand is created based on Target Periods of Supply(SUBPERIODSOFSUPPLY).  How do we ensure that Additional Lot-Size Policy Demand(ADDITIONALLOTSIZEDEMAND) is always fulfilled?

We want Optimizer to move forward to where we have capacity available to meet ADDITIONALLOTSIZEDEMAND.  We need to make sure that is happening or we will have not made the product early enough or it won't recommend the product at all. If there is a capacity constraint during the week, then optimizer should create planned receipt in earlier weeks based on capacity availability.

Awaiting your inputs.

Thank you
Satish Waghmare
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Satish,

ADDITIONALLOTSIZEDEMAND is an output key-figure.

When there are capacity shortages, the optimizer will perform according pre-builds if they are cost-optimal. I.e. with the additional inventory holding costs for the pre-build amounts, it must still be profitable to fulfill the demands. Please check your cost model if you experience different results.

If this doesn't help, please describe your scenario and wanted results of the optimizer.

Kind regards, Carsten
neeraj_deshkar1
Active Participant
0 Kudos


Hi Carsten,

Thanks for wonderful explanation on IBP optimizer.

Could you please explain how objective function bound is calculated by optimizer?

Are the decomposition options available in IBP optimizer? I do not see any option in optimizer profile.

Thanks,

Neeraj

carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Neeraj,

thanks for your comment.

A short description on the objective bound and the solving process can be found here: https://www.gurobi.com/resource/mip-basics/

Decomposition is currently only available via our optimization expert consulting. Basic options in the optimizer profile for decomposition are on our roadmap and will probably appear in the first half of next year.

Kind regards,
Carsten

pmadaan0
Explorer
0 Kudos
Hi Carsten

Thank you for this blog. I had a question related to plugging wastage quantities in Optimizer. We have a separate shelf life engine running which is churning out the wastage quantities. We wanted optimizer to consider these wastage quantities and plan.

Currently I can see no place where I can plug these quantities for a foolproof solution. We explored INVENTORYCORRECTION and INDEPDENDENTDEMAND Key figures but both are incapable of handling this all the scenarios (Constrained supply and unconstrained supply).

Please suggest if you have come across this case and ways we can model it in Optimizer.

Appreciate you taking time to read this. Thanks in advance.

Thanks

Priyanka

P.S I have also raised this on answers.sap.com but was not able to get any complete solution.

https://answers.sap.com/questions/13431287/modeling-expiry-stock-in-sap-ibp-time-series-based.html
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Priyanka,

I have no better answer than the one already posted: with additional demands for the wastages you get the maximum control. With according non-delivery costs you can prioritize against the other demands. Why doesn't work this in your scenario?

BR, Carsten
pmadaan0
Explorer
0 Kudos
Hi Carsten

Thanks for your response. Really appreciate.

If we model wastage as demand (INDEPDENDENTDEMAND) and mark the late delivery as not allowed (because its the kind of demand which should not be allowed to be met late) the optimizer automatically prioritizes this demand over the CONSENSUSDEMAND at the Customer where late delivery is allowed.

Hence if we have a constrained situation where INITIALINVENTORY in week 1 = 1000 and there is customer demand every Week of 1000 and INDEPENDENTDEMAND in Week 5 = 1000 with no supply available till the 10th week the optimizer prefer to carry the inventory from Week 1 to 5 to meet the INDEPENDENTDEMAND and meets all the CONSENSUSDEMAND  late instead of meeting the CONSENSUSDEMAND in Week 1.

Hence the open question if there is a clean way to do this.

Thanks and looking forward for your reply.

Thanks

Priyanka

 

 

 

 
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Priyanka,

to get the desired result you have to setup the non-delivery costs accordingly. E.g. non-delivery costs of CONSENSUSDEMAND way higher than the ones for your wastage demands and the late delivery costs higher than non-delivery costs of wastage demands.

Then the optimizer will cut the wastage demands instead of delivering the consensus demands late. I suggest to involve our optimization expert consulting service for a proper cost setup.

Kind regards, Carsten
pmadaan0
Explorer
0 Kudos
Thanks again for your response Carsten!

If we set up the non-delivery costs of CONSENSUSDEMAND way higher than the ones for wastage demands and the late delivery costs higher than non-delivery costs of wastage demands then when there is a conflict between WK(n+1) CONSENSUSDEMAND  and WK(n) wastage demand in a constrained supply scenario it would prefer to meet the WK(n+1) CONSENSUSDEMAND with the expired stock instead of WK(n) wastage demand  and will let go of that wastage demand.

 

Therefore we think that there is no one solution that will give the correct results with Expiry stock modeling. If we fine tune one scenario the other gets disturbed.

Please let us know your thoughts.

 

Thanks a lot!

Priyanka

 
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Priyanka,

I'm not quite sure when you want the wastage demands to be fulfilled. But I am confident that this can be achieved via according cost settings. Maybe the inventory holding costs have to be aligned as well. Please contact our expert consulting if you need further help. We can't provide detailed consulting via customer cases, blogs or other platforms.

Thanks, Carsten
saxos
Explorer
0 Kudos
Hello Carsten,

Thank you for the explanation of the mathematical relationships.

8 years after opening this post, I have a question regarding the objective function (bound= in the SAP IBP Optimizer in conjunction with discrete optimization. Does the objective function take into account the constraints that may occur due to discretisation, or does discretisation almost always leave a gap?

Example:
3 products are manufactured on the same resource. For all 3 products there are requirements of 50 pieces each over all periods. The machine can produce 150 per week, limited by the capacity supply.
The production min-lot sizes in the discretisation are 150.
Would there always be a functional gap in this constellation?

 

And my second and last question:

Is it a problem to have 18 weeks of discretisation horizon while having 12 weeks of frozen horizon? I guess that the optimizer is smart enough to shorten the discretisation and therefor also the runtime down to 6 weeks of actual discretisation.

 

Thanks for your answer!

Samuel
carsten_schumm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Samuel,

no, also discrete problems are often solved optimally. I.e. the gap between objective bound and objective value gets 0/very small.
For more information please check for example this page: https://www.gurobi.com/resources/mixed-integer-programming-mip-a-primer-on-the-basics/

In your example (assuming identical costs), the optimizer will produce 150 of one of the products in the first week, 150 of another one in the second week and 150 of the third product in the third week. Then it will start again with the first product. With this all demands as of the third planning week will be fully satisfied. This is an optimal solution, i.e. the gap is 0.

Concerning your question on discretization and freeze horizon: yes, as in the freeze horizon the decisions are fixed, no according discrete decision variables are required there. I.e. only discrete decisions for the decisions in weeks 13 to 18 are required.

Best regards, Carsten