Wednesday, July 27, 2016

Master planning

Dynamics AX master planning (MP) covers the short-term calculation of material and capacity requirements. Matching supply and demand to get net requirements of a product.
Similar to forecast scheduling batch job, here we run a master scheduling batch job that creates net requirements for an item and corresponding planned orders.

Static and Dynamic master plans
On a higher level, you can also devise a strategy of having two kinds of master plans, static and dynamic.
Master planning parameters (Master planning> Setup> Parameters) has two options for current static master plan and current dynamic master plan. Master scheduling batch job usually runs every night calculating net requirements for all items. The result of that calculation is available in the static master plan. The static plan is the master plan to be used in purchase and production management for scheduling orders. It is the default plan when accessing the planned orders forms. On the other hand, the sales department needs a plan to run simulations in order to check possible delivery dates in sales orders. Therefore, sales requires running a master scheduling simulation locally, which is for the individual item only. The result of that simulation is available in the dynamic master plan.

Three options:

1. For a basic setup, you need only static plan setup. We don't specify the dynamic plan.

2. Or use the same plan for both static and dynamic. If you enter the same master plan for the static and the dynamic master plan in the master planning parameters, you run a one master plan strategy. Planned orders of current master scheduling simulations in sales update the static plan, which is used in purchasing and production. Depending on your company's requirements, this could be useful.

3. Last option would be to use separate plans for both. In order to apply a two master plan strategy, you need to enter a different master plan for the static and the dynamic plan. When running the batch job for static master scheduling in the night, it usually copies the static plan into the dynamic plan in order to base simulations on the current static plan. In this case, simulations in sales will start applying a common data basis with purchase and production management in the morning. Simulation throughout the day do not change planned orders in the static plan, thereby avoiding problems in purchasing and production caused by planned orders changing every moment.

Important note MP uses table InventSumLogTTS to assist in its calculations. Problem is this table can grow big quickly. MS and LCS diagnostics recommend to keep this table clean. MP batch job can do this cleaning for you but it requires that your dynamic plan is set. Even if you dont use dynamic plans, it is better if you set it same as your static plan. This way each run of MP job, will delete unwanted records from this table.
See class ReqCalcScheduleItem\InsertItemSched

Master plan
First thing required is setting up master plans (Master planning > Setup > Plans > Master plans). A master plan covers multiple scenarios you want handled in your master planning.
Ticking the 'Include on-hand inventory' and 'Include inv. Transactions' boxes will ensure that any stock on hand and open purchase orders will be included in planned order calculations.
The ‘Include demand forecast’ must also be ticked to ensure that the forecast entered against each item is included in the calculations.
Reduction Principle could be set to None.
Time fences, safety times, action and futures messages will not be set at the plan level. These will be set at the Coverage group level as the Master plan settings override the coverage group.
Futures messages fast tab - used to specify if requirement date on planned order should automatically update to calculated futures date
Action messages fast tab- used to specify if requirement date on planned order should automatically update to action date
Safety margin - add 2,3 days for buffer. Cushion to help you for delays. Its going to add up on top of Coverage group safety margin. Be careful.

Master plan parameters
General tab - Define your static and dynamic plans
Planned orders tab - Find trade agreements. This is to find the vendor for an item when the primary vendor is not specified on an item. Two criteria - minimum lead time or lowest price.
Standard update - Grouping planned orders into individual purchase orders when firming them. By vendor, buyer group etc. I have done customisations to add group by warehouse (InventDimId), maybe in another post.

Time fences
What is time fences? No of days master planning should look out from today to find transaction. It can be applied on Master plan or Coverage group. As said above, Master plan will override Coverage group.
For eg, if Coverage time fence is 100 days, it will look in future 100 days for all receipts and demand to do its calculations.
Coverage is longest, firming is shortest.
Explosion - usually same as coverage. Used in production. It’s the no of days in which if it finds a planned production order it will be exploded into its net requirements. You need 10 of item a, 5 of item b etc
Capacity - used to schedule work orders, resources, resource groups.
Action, Futures - calculation on no of days requirements where you will have action and futures messages.
Freeze - no of days you are not allowed to create new planned orders
Firming - automatically firm an order after a no of days

Calendar setup
Calendars in AX are used to basically set what days I can order products and can be set at different levels Warehouse, Vendor and Item Coverage Group.
The standard logic of master planning is that Item Coverage Group overrides the Vendor which overrides the warehouse (store).
Based on this we can use this logic to set up basic calendars against the warehouse (store) showing that they can order every week day.
Then if required we can set a different calendar against the Vendor if we only order products from this Vendor on different days.
The last option is to set a calendar against individual coverage group which we can then set against an item or group of items.

Using this logic should hopefully limit the number of calendars that we need to configure and should also limit the number of coverage groups that we will need to create.

Example of a warehouse and its calendar property.

Warehouse has a default calendar with working times set; which days they can order. Assumption is for most stores this will be Monday-Friday. 

Working times

Note: if you run master scheduling and calendar days are not open, no Net requirements/Planned orders will be created against the items.

Coverage groups
Coverage groups are the main tool that master planning will use on when and how we want to order products. Essentially it allows us to configure time periods (Daily, Weekly) for how frequently we want to order individual products. The coverage group is set against an individual product (Released products > Plan > Item coverage). There is also a default property 'General coverage group' in parameters form.
There are 4 coverage codes we can define.

Requirement - this group is used to order a product only when we have demand for the product for example we have a script for the drug this will be used for expensive drug items or drug items that we don’t want to stock. Each uncovered demand drives a planned supply. Usually for high value items, you don’t want to buy too much and keep in stock

Period - you can define a coverage period eg 7 days, 30 days. How many days you want to look out from the first piece of demand and group that many days of orders together. For eg an order created on 1st for next 7 days of demand. Good thing is we are grouping 7 days of demand in one order, bad is we have 7 days of on-hand sitting on us (inventory holding costs). It is based on 1st requirement date not calendar date. 7 days does not mean it creates an order every week. It means when it finds demand it creates an order for next 7 days.
One example of a setup would be to define 3 period type coverage groups.
Daily – this group as the name suggests is products that we can order daily, this coverage group is also usually combined with a minimum stock on hand value for the product and this will basically mean we will order the product based on daily usage and the minimum stock level.
Weekly – this group as the name suggests is for products that are ordered on a weekly basis again this is also usually combined with a minimum stock on hand that can then alert the user if usage is higher than normal and the product may need to be ordered in advance.
Monthly – this group is to cover products that are ordered on a monthly basis and also will normally be combined with minimum stock level that can then alert the user if usage is higher than normal and the product may need to be ordered in advance.

Min/Max - controls the size of supply.  AX will order so much to bring you to the max level. Once inventory value falls below min, an order big enough to bring value up to the max is generated.

Manual - Net requirements are not calculated. 

Eg, a daily coverage group

Positive and Negative days (Coverage groups)

Negative days - Imagine we have a sales order for 10 items on 1st and we don’t have stock.
If negative days is 0, AX will say you can't wait for the next purchase order so creates a new planned order.
Negative days is like a window from a sales order(demand) of days when receipts in those days will satisfy this demand.
But if negative days is 20 and an existing purchase order coming in on 17th, master planning pegs that purchase order against the sales order. And does not create any new planned order. No of orders in system are reduced. The purchase order will get an action message created telling that the PO is going to be late and sales order is going to get a futures message saying that the SO is also going to be 17 days late because it has a PO pegged against it. Time to contact your vendor to speed things up!

If negative days did not cover this demand on 1st, was less than 17, a new planned order would be created.

Positive days - Opposite direction. How far back master planning will look for inventory to satisfy this demand (sales order). For ex, Sales order on 31st, positive days 15 days, will go back 15 days to find any receipt. Does not find any so creates a planned order.

Note: for master planning, on hand inventory is a receipt. People set their positive days to a large number like 999 so that on-hand inventory is always seen.

Negative days works on lead times for an item. If the lead time for an item is not covered by a PO, a planned order is created. Now different items might have different lead times. There is a property called Dynamic negative days.

Dynamic negative days
Dyn neg days = LT + Neg days

This gives more flexibility and reduces no of coverage groups as LT is based on the item you are planning.

Action and Future messages (Master plan)
Negative/Positive days are closely tied with action and future messages. An example to see action and future messages in action. One prerequisite is that master plan should have both ticked and set to appropriate no of days. If say Action message is not ticked, you will not see any Action message arrow on the purchase order.

For example, Item '000000014' with a sales order for 10 qty on 1/8/2016 and a purchase order for 10 qty on 17/8/2016. The coverage group used 'MAN' has negative days set as 20. Item has no stock.

Before running master scheduling:
After running master scheduling, the sales order gets a future message and purchase order gets an action message:

Action tab is basically saying that the purchase order should be advanced by 16 days to 1/8/2016 instead of current 17/8/2016:

Futures tab is basically saying that the sales order should be delayed by 16 days to 17/8/2016 instead of current 1/8/2016:
Master scheduling batch job
Finally we run the Master scheduling batch job (Master planning > Periodic > Master scheduling) to calculate the net requirements of finished items.
We can check the results at Released products > Plan tab > Net requirements. There are two planned orders of type master plan created.
Note: As a result of these orders, and just like forecasting, there are no transactions (InventTrans) created against the item.

Approved planned orders
Intermediate step between unprocessed planned order and a firmed purchase order.
A button on top to Approve, changes status to "Approved", means we reviewed the planned order and will firm it soon but not right away. Need some time to check something else. What approving does is, it excludes these orders from getting deleted or regenerated as master planning runs every night. If regeneration happens, your items might get different quantities etc which can be confusing.
You could also Change status to "Completed", which means we reviewed the order, but we dont want to firm it and can be deleted by the master planning batch.

Fulfil minimum
Released product > Plan > Item coverage > General > Fulfil minimum

Fulfil minimum defines when your safety stock requirement date is.

This has been a long post and maybe left more questions unanswered than answered. No doubt master planning subject is not covered much and can use few more posts. Maybe in future posts. 

1 comment:

  1. Thank you for sharing your article. Great efforts put it to find the list of articles which is very useful to know, Definitely will share the same to other forums.
    Data Science Training in chennai at Credo Systemz | data science course fees in chennai | data science course in chennai quora | data science with python training in chennai