# IBP for Supply Optimizer: the mathematics behind

### 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.

### Assigned Tags

You must be Logged on to comment or reply to a post.

Hi Carsten,

Thanks for sharing the information.

Question - Can we use global cost factors to prioritize one cost over the other? Example: if non-delivery is a critical requirement then we can assign factor 2 while keeping others 1.

Regards,

Carsten Schumm
Blog Post Author

yes, you can use the global cost factor for such cases. Typically they are used to perform some tests on the impact of the costs, without the need to change each individual cost value.

Another use-case is to check the impact of costs. Example:

To check if procurement / external receipt costs are hindering demand satisfaction, set the global cost factors for external receipt variable and fix costs to 0 and re-run the optimizer. This will disable all external receipt costs => demand satisfaction will most probably rise.

Cheers,

Carsten

Thanks for sharing the Maths behind the Supply Optimizer! Very useful!!!

Hi Carsten,

I have been asked by SAP to use discretization for P-rule in order to enable PROUDNING functionality in optimizer. What value should I set there?

Beyond this question, can you also mention more details about discretization values.

Regards,

Carsten Schumm
Blog Post Author

rounding values (also known as incremental lot-sizes) require also discrete decisions. Hence the discretization horizons also control whether they are active or not.

The discretization horizons define the portion of the complete planning horizon in which the optimizer enables discrete decisions. Typically these decisions are only relevant in the first periods. By reducing the discrete decisions to these periods the performance of the optimizer typically increases drastically.

Example:

planning horizon: 30 periods

discretization horizon for production: 10 periods

=>

In periods 1 to 10 minimum lot-sizes, fix costs and rounding values are considered during optimization.

In periods 11 to 30 they are not considered and are probably violated.

I hope this helps. As a start you can try to disable the discretization horizons totally. But please set a runtime limit in that case to avoid very long runtimes until the optimal solution gets found.

Kind regards,

Carsten

Hi Cartsen

Indeed this was a very helpful Article !!

Thanks

Sanjay

Thanks for the information.

I have some questions that maybe you can help me to solve:

1. How is Net Demand calculated in Optimizer Run? I see it always equal to the receipts KF instead of being the real Net Demand

2. When running Optimizer it produces as soon as possible, without taking into account the inventory cost, I think it should produce as nearer as possible to the demand, shouldn't it?

3. I work with IBP 6.2, and Key Figures for late delivery do not exist on standard PA SAPIBP1, so late delivery is not allowed. Is there any place where SAP explains how to create those KFs? Or have they decommited these KFs?

Best Regards,

Esther

Carsten Schumm
Blog Post Author

Hello Esther,

1. The Optimizer computes a complete, feasible and cost-optimal plan. Thus the demands can be satisfied over multiple sources of supply and don't follow a fixed schema like the heuristic. Therefore the net demand can't be computed like for the heuristic.

2. Yes, if you have inventory holding costs the optimizer should produce just in time, if no other costs, leadtime or resource availabilty requires a build ahead. Please open an according OSS message, if you experience otherwise.

3. Late delivery is allowed in PA SAPIBP1, but the necessary key-figures need to be configured there manually.

Kind regards, Carsten

Hello Carsten,

Could you please tell which key figure needs to be created manually(any specific name) and how we can make system to use it.

Regards,
Dinesh Goyal

Carsten Schumm
Blog Post Author

Hello Dinesh,

http://help.sap.com/ibp-ref
=> Application Help
=> Planning with S&OP Algorithms
=> Key Figures

Usually all relevant Key-Figures should be available in the corresponding SAP-model.

Kind regards,
Carsten

Hi Carsten

How does the Optimizer Calculate the External Procurement Qty ?

I am maintaining a Production ratio of 1 for Source type P, and 0 for Source type U for a component. so basically telling the Optimizer (via input) that do not procure and make inside

It stills tells me (via output) to procure from outside. what drives this Optimizer behavior ?

any inputs would help a lot to analyse my Supply Outputs.

Thanks.

Sanjay

Hi Sanjay,

As far as I know Optimizer is not working based on ratios, but only based on the costs. If the production cost is higher than the external receipt cost rate than that's why optimizer is behaving like this.

Best Regards,

Ana

I tried input of a very high External Receipt Cost Rate (which is a lot more than the Production cost rate.) & even then it did give me an External procurement Qty,

So I am wondering what is causing it to tell me to procure when i have capacity still remaining to be used ? Should'nt it use up the entire in-house capacity available & then look for external procurement ?

Regards

Sanjay

Carsten Schumm
Blog Post Author

Hello Sanjay,

maybe the production source items can't be sourced or cause a higher total cost than the external receipt. To make the production work please ensure that all components can be sourced and that the total sum for the production (i.e. production itself + possible neccessary transports / procurements / ... for the components) is lower than the external receipt cost.

Additionally please note that the optimizer will never generate negative inventory levels to overcome missing sourcing options.

Regards, Carsten

Thanks Carsten.

Let me check on the points you mentioned, and i will come back with more insights on this.

Meanwhile, can you suggest any other links / information which talks more about the Optimizer & its behavior in detail ?

Thanks again.

Sanjay

Carsten Schumm
Blog Post Author

Hello Sanjay,

please check the official documentation and the training contents. Currently I am not aware of more detailed information concerning the optimizer.

Thanks and regards, Carsten

Hello again,

I have one more question, regarding now Lot Sizes. As I unerstand from the post, it is possible to make the Optimizer to consider Lot Sizes but for that I understand you need to add a discretization horizon.

First question:

Which are the units of these horizons? days? weeks?

Second question:

Whenever I add a Horizon for Production in Discretizaton tab, Optimizer is going to error (Value of Key Figure PROJECTED INVENTORY too large, no external receipt can be planned for product XXX location XXX because required amount is too large...)

But if in case this Horizon I increase Default Horizon, no error is returned, but also Lot Size is not considered.

Is there any additional setting I need to perform?

Best Regards,

Esther Meléndez.

Carsten Schumm
Blog Post Author

Hello Esther,

the unit for the discretization horizons is periods. I.e. if you specify a horizon of 10, the corresponding discrete decisions will be respected in the first ten periods.

The errors you experience are strange, please open an according incident, so that we can analyze that issue. Often these errors occur if some costs are missing (e.g. inventory holding costs and production costs) - without them the optimizer may decide to produce a very high amount, yielding in such errors.

The Default Horizon in the optimizer profile is only relevant if some of the more specific discretization horizons are null (no value maintained).

KInd regards,
Carsten

Hi Carsten,

Thanks for a great article.

I wanted to understand if there any key differences between SAP APO Optimizer and SAP IBP Optimizer ? One of companies I am working with, has had a very had time with getting results from SAP APO Optimizer and thus would like to understand if anything has changed in the algorithm , interpretation of results, overwriting of results etc. from SAP APO Optimizer.

Carsten Schumm
Blog Post Author

Hello Vijay,

which APO Optimizer are you referencing?
APO SNP Optimizer is quite similar to the S&OP Optimizer from an algorithmic point of view. Data model and UIs are of course quite different.

With suitable costs and a properly setup model (e.g. no missing sources) usually the result of the optimizer is quite understandable. On complex scenarios it is sometimes harder to see why the optimizer made a specific decision, but they can be usually explained quite well.

The overwriting of results is in IBP very easy: just provide the relevant adjusted key-figures. The optimizer tries to respect them with highest priority. I.e. as long as they don't forbid a valid plan, they are fulfilled.

Kind regards,
Carsten

Thanks Carsten. That Helped.

Also SAP told me that APO SNP optimizer had option to use COPT 10 Parameters but IBP optimizer does not have any such feature. Since I am not very familiar with SNP optimizer, can you please elaborate on what is the implication of not having this COPT10 parameters in IBP. Also some of the other differences I understood were No Cost Functions, Consideration for storage resources is different in APO vs IBP - multiple resources can be considered in IBP vs only single storage resources in APO, Only single transportation methods can be used inside IBP.

Can you please comment on this.

Also can you please confirm if the behavior of transportation costs, handling & storage resources is the same in both IBP and APO optimizers?

Thanks
Vijay

Carsten Schumm
Blog Post Author

Hello Vijay,

sorry for the late response.

We have a similar option in IBP to pass special parameter like COPT10 in APO. So there is no disadvantage there. Nevertheless they are only needed in rare cases in conjunction with our Optimization Expert Consulting services.

Cost-functions are mostly used to get an even distribution if similar costs are involved. As of IBP 1611 there is the ability to enable fair-share distribution in the optimization profile, which internally creates cost-functions. Please let us know if you have further requirements.

The S&OP-optimizer currently only supports storage- and production-resources. No handling-resources.

Transportation costs are similar to the SNP-optimizer. Multiple transportation resources are currently not possible, but can be modeled via additional locations.

Hope this helped,
Carsten

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

Carsten Schumm
Blog Post Author

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

Hello Carsten Schumm

Need your inputs on a scenario that we are working on for an utility industry

We are facing tough times in introducing the below 2 constraints in to the Optimizer engine...

Raw Material Constraint: Government draws a control line on how much we can consume from a source of supply(irrespective of its availability), and that control line varies dynamically from period to period and government decides it. So every time the optimizer runs, it should look in to that control line value first, and accordingly it should plan the production or if the supply is not sufficient, it should naturally opt for other sources of supply.

Capacity Constraint: Capacity varies dynamically in the production facility. Accordingly the optimizer should consider a production facility, if the capacity is not sufficient it should opt for another production facility to meet the demand.

Carsten Schumm
Blog Post Author

Hello Venkat,

I think this can be solved via a resource constraint: All production sources which use the raw-material consume a special resource with a consumption rate equal to the component consumption rate.
=> the total resource consumption equals the consumed raw-material.

With an according capa-supply for this resource you can limit the material consumption to the wanted value.

The alternate Source Of Supplies which doesn't need that raw-material need higher costs than the productions with the raw-material. => The raw-material gets used up first.

You need to define all your resources in the system. This can't be done in the optimizer profile.
Then you need production sources for the different resources. Example:
Production-Source 1 uses resource A to produce P.
Production-Source 2 uses resource B to produce P.
If you first want to fully utilize resource A the total production costs using production-source 1 needs to be lower than the ones from production-source 2.

Hope this helped,
Carsten

Hello Carsten,

Though you replied late, you provided the latest solution 🙂

2 more doubts popped up, please shed some light also on that..

Usage of "CapaSupply" key figure for "Raw Material availability" constraint: One source of supply is mapped to multiple production facilities. We want to restrict the source of supply itself instead of the Production facility capacity, so can Stock on Hand or Projected Stock key figure would do for this scenario. Lets say the source of supply has 100 Uom material, but we want to restrict the usage to only 70 for a specific period. So if we manually maintain Stock on Hand or Projected stock key figures with 70 for that period in excel, before running the Optimizer engine, will it respect this 70 value for supply planning?

Doubt 2: Where can i configure the Optimizer profile. Under which tile this transaction is in ?

Carsten Schumm
Blog Post Author

Hello Venkat,

Key figure Stock on Hand defines the initial inventory in the first planning period. The values in other periods are not used in any way during planning.

Key figure Projected Stock is an output key figure and thus can't be used too for such a purpose.

The only direct ways to influence source of supply are the adjusted, minimum and maximum key-figures. For your use case the maximum production could be used - as it influences the produced amount of the output product you must consider the corresponding coefficients.

The Optimizer Profile is available in the Web-UI:
=> Open App Configuration
=> Manage Planning Operators

=> select Planning Operator Type SCM in the left
=> open the Optimizer Profile for the wanted Planning Operator via column Optimizer Profile

Cheers, Carsten

Thanks Carsten for the swift reply.

Found the Optimizer profile and will play with the key figures as per your suggestions.

Cheers,

Hi Carsten

Thanks for the article!

I am seeing strange behaviour when running an optimiser problem in our system. The system doesn't seem to be honouring the transport variable costs even though they have been set. It doesn't even report them in the log!:

Transport cost rates are generally set to 1.0 and global cost factors also 1.0. Transports are being created but are not responding to the high cost set on one non-preferred lane.

Regards
Steve

Carsten Schumm
Blog Post Author

Hello Steve,

this is strange. If the problem still exists please open an according incident.

Thanks, Carsten

Hello Carsten,

Nice blog and good information.

Need your expert help on Optimizer behavior for safety stock. System is not considering safety stock(TARGETINVENTORY KF).

1. System is not considering safety stock maintained in "Safety Stock"attribute of Product-location MDT. Not generating supply as well as not populating TARGETINVENTORY KF. How we can copy safety stock master data into target inventory and manually adjust the same.
2. Even when I maintained SOPSAFETYSTOCK and get TARGETINVENTORY populated, system is still not considering TARGETINVENTORY and generating supply. if I have demand of 1000 and maintained safety stock 500. system should generate - 1500 but it is not behaving that way. TARGETINVENTORYVIOLATIONCOST is also maintained but in optimizer log, it shows no violation.

Regards,

Dinesh Goyal

Carsten Schumm
Blog Post Author

Hello Dinesh,

thanks for you comment.

1. S&OP planning algorithms only consider safety stocks in KF INVENTORYTARGET. The 'safety stock' in master data is used in IBP Inventory if I remember it correctly. Don't know exactly how to populate the KF from the MDT - but this should be possible. Please ask for help in the community if you can't figure it out yourself.
2. Please check the name of your KF. It must be: INVENTORYTARGETVIOLATIONCOSTRATE.
In some of the shipped SAP-models this one had unfortunately a wrong name.

Cheers, Carsten

Thanks Carsten!!

I was informed by  SAP support team about wrong KF name of COST, this solved my issue for now but I wanted to show case material master safety stock mapping in IBP and safety stock planning. I am still not able to find out how I can populate INVENTORYTARGET KF from from MDT. Please let me know if you get any information.

Regards,

Dinesh Goyal

Hi Dinesh,

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

Thanks

Christia

Thank you Carsten for this background.

Can you clarify how the optimizer works with lots and resource constraints? The customer will use Discretization to respect incremental lot sizes. The question is whether the resulting lots are respected during resource constraining (i.e. will the lot size be respected or will it be split?).

Example – Two products have a lot size each of 500 in period 1 (total is 1000) but the resource has a constraint of 800 per period. Will the optimizer split the quantity of each lot to 400 for each product in period 1 and 100 each in period 2 assuming the penalty of increasing capacity is far greater than the cost of late delivery and all other costs for the 2 products are the same?​

Regards, Michael Louey

Carsten Schumm
Blog Post Author

Hello Michael,

in the discretization horizon the optimizer will always respect the lot-sizes. Thus in your example the optimizer will produce 500 in period 1 and 500 in period 2 (assuming  that there is demand).

Lot-sizes are only ignored outside the discretization horizon or if the corresponding source is adjusted (e.g. adjusted production of 400 in your case).

Hope this helps!

Cheers, Carsten

Hello Carsten,

Appreciate your efforts in providing insights to all the user community.

Question: We are using both SOPDAFETYSTOCK to enter the discrete quantity, as well as using SUBPERIODNUM and  SUBPERIODSOFSUPPLY to calculate the safety stock requirement based on Day's of Supply.

But the INVENTORYTARGET KF only shows the SOPSAFETYSTOCK quantity (the KF calculation shows that). How do you influence the calculation of INVENTORYTARGET KF to account for Safety DOS and Safety Stock quantity? Without Safety DOS, the Inventory Holding Cost is not reflected correctly and hence the Optimizer results are not correct. The NETDEMAND and PROJECTEDSTOCK considers both and hence the calculation is correct for these 2 KF's. But INVENTORYTARGET and INVENTORYHOLDINGCOST only reflects SOPSAFETYSTOCK...without the Safety DOS.

Thanks,

Mangesh

Carsten Schumm
Blog Post Author

Hello Mahgesh,

I don't know if I get your question right, but in general the optimizer adheres to static (KF INVENTORYTARGET) and dynamic (KF SUBPERIODSOFSUPPLY) safety stock. If both are present it'll try to fulfill the sum of them.

The amount of the dynamic safety stock can't be seen directly in the system as it relies on the dynamic supplies. If you create a simple example (e.g. one demand which should be covered early), you'll see a raised corresponding projected inventory on the supplying location.

Concerning INVENTORYHOLDINGCOSTRATE: if this one is higher than the INVENTORYTARGETVIOLATIONCOSTRATE, then it is cheaper for the optimizer to violate the (static and dynamic) inventory targets than to fulfill them due to the higher costs for inventory. Thus if you have both, please make sure that then inventory target violation cost rate is higher.

Hope this helps.

Kind regards, Carsten

Hello Carsten,

Yes we are seeing that the Optimizer is working fine considering the INVENTORYHOLDINGCOSTRATE and INVENTORYTARGETVIOLATIONCOSTRATE.

But the original question was INVENTORYTARGET only shows static safety stock and not the sum of Static and Dynamic Safety stock. Hence the INVENTORYHOLDINGCOST only displays the cost based on Static Safety Stock, instead of the sum of static and dynamic safety stock.

Could you pl enlighten us on how to display the correct INVENTORYTARGET, with both static and dynamic safety stock?

Thanks,

Mangesh

Carsten Schumm
Blog Post Author

Hello Mangesh,

all key-figures you mentioned are INPUT-key figures to the S&OP planning algorithms. They are not updated after optimization or heuristic runs.

There is currently no possibility to display the amounts of the dynamic safety stock, as these values are usually very hard to reconstruct (may be propagated through several levels of the supply chain) and would require some sort of pegging, which is not available in S&OP.

Cheers, Carsten

Hi Carsten

Thanks for the mathematics behind the IBP Optimizer however I would like to understand how minimum transport/production receipts will react when we input to supply engine. will those minimum quantities flow as dependent demand to component or not ?

Regards

Sudhakar

Carsten Schumm
Blog Post Author

Hello Sudhakar,

as in the most cases this depends on the costs. If you have inventory holding costs, these receipts will be used as components or to fulfill demands, assuming that the inventory targets are satisfied.

If there are no 'consumers' for the minimum receipts these materials will be held on stock.

Regards, Carsten

Hello Carsten,

We are experiencing issue with the Stock-On-Hand inventory quantity being considered while executing Heuristics/Optimizer.

If we set the PLANNING_TPLEVEL = 4 i.e. Month, then the Stock On Hand is not considered, but as we update the TPLEVEL to 3 i.e. Week, then the Stock On Hand is considered.

Any suggestions on how to make the Heuristics/Optimizer to respect the Stock On Hand, when executing it on Monthly level?

Thanks,

Mangesh

Carsten Schumm
Blog Post Author

Hello Mangesh,

sorry, I can't help you there. The logic happens in a pre-processing step, that is transparent to the heuristics/optimizer. Please open an according incident.

Cheers, Carsten

Hi Carsten,

Hi Carsten,

Thanks for explaining the mathematics behind IBP optimizer in simple terms.

I have a question regarding fair share calculation.

We have 4 products P1, P2, P3 & P4. All products are being produced on same resource. Demand for P1 is 250, P2 is 500, P3 is 750 & P4 is 1000 in period 1. Resource can produce maximum 1000 products per period.

We have activated fair share option in optimizer profile. Segments for non delivery & inventory holding are specified as 4. However optimizer plans production receipts as mentioned below for all 4 products.

P1 = 125, P2 = 250, P3 = 375, P4 = 250

Expectation was to have proportionate receipts created as below.

P1 = 100, P2 = 200, P3 = 300, P4 = 400

Please let us know if we are missing any parameter setting.

Thanks,

Neeraj

Carsten Schumm
Blog Post Author

Hello Neeray,

unfortunately the optimizer can't perform a perfect fair-share - the fair-sharing happens on the segment-level, but not inside a segment. The segments are equally distributed based on the amounts. The non-delivery costs are the highest in the first segment, a little lower in the second and so on. So the optimizer will satisfy first the first segment, then the second, etc.

In your example each segment has these amounts:

P1: 62.5, P2: 125, P3: 187.5, P4: 250

As 1000 can be produced, the first segment can be fully satisfied, i.e. P1 receives 62.5, P2 125 etc. This leaves 375 to distribute for segment 2. These can be arbitrarily distributed as they have all the same non-delivery costs.

If you raise the number of segments, the result will look more like you expect it. But please note the number of segments is limited to 10 for performance reasons.

Kind regards,
Carsten

Dear Carsten,

We use S&OP optimizer to reallocate goods on central DC to workshops representing different demand streams=customers

However Optimizer suggests (especially painful in case of current week) to redistribute not only Stock on hand (INITIALINVENTORY) but also Goods in transit (MINTRANSPORT) that has not been accepted yet by DC. Based on this suggestion SAP ERP won`t be able to create any stock movement due to ATP check and it has no sense even to try doing it. What might be the solution?

We thought to "hide" the value of Inbound transit copying it to Inventory Target but this results in that Heuristics also stops seeing as inbound - so it won`t work.

Carsten Schumm
Blog Post Author

Hello Oleg,

the optimizer works purely on costs. So if you don't want to redistribute the initial inventory and goods in transit we have to raise these costs.

First of all please clarify why the optimizer moves these goods. A typical case is that the inventory holding cost rates for the same product is different at different locations.
=> the optimizer will move the material to the cheapest locations.

The solution for such scenarios is to add transportation cost rates. They must be higher than difference of the inventory holding cost rates. If the material gets stored for several periods even higher transportation cost rates are required.

Kind regards, Carsten

HI Carsten

I have a  Scenario  where there is a HUB and multiple vendors

say cost  in contract

for vendor A is  \$ 60

for vendor B is \$ 50

For Vendor C is \$70

1. so based on cost based source of supply optimization  , will Optimizer recommend vendor  B which is the lowest among all 3 vendors

2, Am using a custom planning Area  which I created of my own

what are my input key figures  the Technical names of standard unified planning area   that I should create in my custom Planning Area as in put for Supply optimizer  in IBP

what are my output key figures the Technical names of Standard unified planning are that should create in my custom Planning Area as output for Supply optimizer in IBP

3  What all master data  should I use to model this scenario in IBP

Carsten Schumm
Blog Post Author

Hello,

if you use external receipts to model the vendors and set according values in EXTERNALRECEIPTCOSTRATE you'll get the expected result in key-figure RECEIPT.

The required master data and key-figures depend on the exact modelling. E.g. whether you use CONSENSUSDEMAND or INDEPENDENTDEMAND. Please refer to the application help for details. For example you can find all relevant key-figures here: https://help.sap.com/viewer/feae3cea3cc549aaa9d9de7d363a83e6/1802/en-US/28369155bb43292de10000000a44147b.html

Kind regards,
Carsten

HI Carsten

Thanks for your response , what would be the master data required if I use

Consensus Demand

Independent Demand

Could you please help with the master data required for these above specific demands for running my optimizer scenario

and also what would be the Transport related key figures and Master data

Carsten Schumm
Blog Post Author

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

Hi Carsten,

Thank you for a great article & providing quick responses for everyone, appreciate your efforts.

Can you please suggest if there is a way to influence the Lot Size (Minimum & Incremental) for External Receipts as well as I don't see that in Discretization settings & client wants to generate External Receipts based on Lot Size requirements so that they're ready for execution in SAP ECC without any consolidation logic when being converted to Purchase Orders.

I tried maintaining Horizon for External Receipts in the profile but that is not helping as well. Please suggest,

Thank you,

Tej

Carsten Schumm
Blog Post Author

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

Hi Carsten,

Thank you very much for quick response as usual 🙂

Best Regards,

Tej

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
Blog Post Author

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

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
Blog Post Author

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

Sure, Thanks Carsten, will do.

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
Blog Post Author

Hello Abhishek,

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

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.

Thank you
Satish Waghmare

Carsten Schumm
Blog Post Author

Hello Satish,

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

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
Blog Post Author

Hello Neeraj,

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

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.

Thanks

Priyanka

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

Carsten Schumm
Blog Post Author

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

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

Priyanka

Carsten Schumm
Blog Post Author

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

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.

Thanks a lot!

Priyanka

Carsten Schumm
Blog Post Author

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

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.

Samuel

Carsten Schumm
Blog Post Author

Hello Samuel,

no, also discrete problems are often solved optimally. I.e. the gap between objective bound and objective value gets 0/very small.