Nightly batch for optimization of assignments according to standard rules
(SAR) Optimize according to standard rules.
Abbreviations which are used:
SSA (Goods reception which are used to store goods in stock)
SOA (Purchase order response, which is a purchase order that has been confirmed and is a part of supplier backlog. This is to be understood as goods that are to be received into stock in the future)
SPO (Purchase order, which is a part of supplier backlog. This is to be understood as goods that are to be received into stock in the future)
PWO (Production work order, which is used for manufacturing products in-house. In this documentation PWO means each and one material in the kit structure of a PWO)
COA (Sales order, which is a sales order that has been acknowledged by the selling company)
SAR (Stock assignment register, which keeps the assignments between Stock/Supplier backlog/Production work orders and Production work order/Sales order)
KITSTARTDATE (This is a calculated date for each material in the kit structure of a PWO. It is set equal to the date the OPR (Operation) it is linked to should start)
PUR (The purchase application used for creating SPO)
ART (The archive of products)
S&D (Ship & Debit)
SQU (Purchase quote)
BREF (The base (derived from) for calculating landed cost in a COA)
REQ (Requested Date)
CONF (Confirmed Date)
DELDATE (Delivery date. ('Scheduled shipping date' for a COA or 'Planned start date' for PWO or a specific operation in PWO.)
FIFO (First In - First Out, a principle for selling out/using the oldest stock first)
SAR and assignments in general
The assignments between SSA/SOA/SPO/PWO and PWO/COA are stored in SAR. If there is not enough goods available in stock or backlog, the PWO/COA will be 'Pending' assignment. This will generate a purchase need that is visible in the PUR application or a need for manufacturing if it is a product with structure.
The purpose of the SAR Optimize batch is to assign goods to PWO and COA in an optimized order. The program will try to achieve that these get assignments from SSA, SOA, SPO and PWO which fulfill their DELDATE. The COAs and PWOs that are going to be delivered first will get the 'best' assignments etc. 'Best assignments’ is to be understood as closer to stock in time, -the better.
Step 1 Recalculate DELDATE
As a pre-step for optimizing SAR, the program will check whether DELDATE in existing assignments to PWO are correct calculated. If they are not, they will by default be recalculated as KITSTARTDATE - x days. X is a number of days set up as a margin in the Company settings (CSV) 'DeliveryAndRequestDateMarginDays'. If the company setting option CSV/'Production-PlanningBasedOnProductionLeadTime' is ON, 'Production start date' from PWO will be used instead of KITSTARTDATE.
Step 2 Stock Assignment Window
This step is optional, the setting Margin for SalesLeadTime Assignment Window, that can be found in the Company settings (CSV) application, must be given a value, and at least one of the settings Use Assignment Window for Sales Order (COA) or Use Assignment Window for Production Work Order (PWO) must be turned on. The Assignment Window is defined as Standard lead time for a product plus the margin set in the Margin for SalesLeadTime Assignment Window setting.
The purpose of step two in the SAR Optimization Batch is to ensure that only COA/PWO with DELDATE inside the Assignment Window will get assignments from stock and backlog. COA/PWO with DELDATE outside of the Assignment Window will be ‘Pending’ assignments, and these items are marked in Stock Assignment Register to prevent Step 3 of the SAR Optimize Batch to get assignments from stock/backlog.
Step 3 Optimize assignments
This step runs as default for PWO, COA is optional. If it should run for COA as well, the setting Sales Order (COA) included in the Assignment Register Optimize job in the Company settings (CSV) application must be turned on. This documentation assumes this setting is ON.
Final products that should be optimized - The requirements for a product to be optimized are:
Class must have a value before 'V' in the alphabet but not 'KM'. In practice this means ordinary parts/material/kits and not service or cost products.
For these products, the program will check whether there exists COA or PWO that are candidates for getting better assignments.
Find COAs and PWOs that are candidates for re-linking
The requirements for COA and PWO to be a candidate are:
Has got assignment from SPO, SOA, PWO or is ‘Pending’. (If it has assignments from stock, it will not be a candidate as stock is defined as the 'best assignment' one can get)
Must be active. This means that status must be >1 and >9
Production is not started for a PWO (Means status must not be 5,7 or 8)
Picking process is not started
The SAR assignments are not blocked for re-assigning (locked links)
SAR assignments are not defined as outside of the assignment window
SAR is not set up with access only for a specific customer
COA does not have a special structure
COA is not linked to a non-S&D SQU in BREF. PWO is not linked to a non-S&D SQU in KITSQUID
COA/PWO does not have existing assignments from anything else than than ordinary purchase, productions, replacement from supplier or by-product from supplier.
Based on these claims the program builds a list of all products found that are matching the criteria above. The job optimizes one and one product and loops through all candidates that possibly could get better assignments. When there are no more assignments to optimize for this product, the program starts with the next and continues with the same procedure until there are no more products left in the list.
The candidates are sorted by DELDATE in ascending order to ensure that the ones that need goods first will get the best assignments.
After sorting on DELDATE, the priority sorting for optimization is as follows:
COA which is ‘Pending’
COA which has assignment from SPO, sorted descending by REQ in SPO + PWO which is 'Pending'
COA which has assignments from SOA without CONF, sorted descending by REQ in SOA + PWO which has assignments from SPO or SOA without CONF, sorted descending by REQ in SPO/SOA
COA and PWO which has assignments from SOA with a CONF, sorted descending by CONF in SOA
The program has now built a list of documents that should be optimized within one product.
Re-assigning
The next step is to try to re-assign to the ‘best assignment' for COAs and PWOs in the list ‘Find COAs and PWOs that are candidates for optimization.’ under ‘Step 3 Optimize links’
The preferred assignments for PWO are in prioritized order:
SSA with available quantity, sorted ascending by Date of the SSA
SSA which are assigned to COA/PWO with a DELDATE which is later, sorted ascending by Date of the SSA
SOA/PWO with CONF and available quantity, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the assignment to the the PWO
SOA/PWO with CONF and which has assignment to COA/PWO with a later DELDATE, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing assignment to the PWO
SPO with available quantity, sorted ascending by REQ. REQ on SPO must be earlier than REQ in the existing assignment to the PWO or SOA/PWO without CONF, but with available quantity, sorted ascending by REQ. REQ in SOA/PWO must be earlier than REQ in the existing assignment to the PWO
SPO which is assigned to COA/PWO with a later DELDATE, sorted ascending by REQ. REQ in SPO must be earlier than REQ in the existing assignment to the PWO or SOA/PWO without CONF, which are assigned to COA/PWO with a later DELDATE sorted ascending by REQ. REQ in SOA/PWO must be earlier than REQ in the existing assignment to the PWO
The preferred assignments for COA are in prioritized order:
SSA with available quantity, sorted ascending by Date of the SSA
SSA which are assigned to COA/PWO with a DELDATE which is later, sorted ascending by Date of the SSA
SOA/PWO with CONF and available quantity, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing assignment to the COA
SOA/PWO with CONF and which is assigned to COA/PWO with a later DELDATE, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing assignment to the COA
SOA/PWO without CONF, but with available quantity, sorted ascending by REQ. REQ in SOA/PWO document must be earlier than REQ in the existing assignment to the COA
SOA/PWO without CONF which are assigned to COA/PWO with a later DELDATE, sorted ascending by REQ. REQ in SOA/PWO must be earlier than REQ in the existing assignment to the COA
SPO with available quantity, sorted ascending by REQ. REQ in SPO must be earlier than REQ in the existing assignment to the COA
SPO which is assigned to COA/PWO with a later DELDATE, sorting ascending by REQ. REQ in SPO must be earlier than REQ in the existing assignment to the COA.
If the SSA/SPO/SOA/PWO that is found has enough available quantity, the COA/PWO will get new assignment from this.
If the SSA/SPO/SOA/PWO that is found does not have enough available quantity, the optimize program will first remove its existing assignments to COA/PWO to increase available quantity. Then the existing assignments to the COA/PWO will be removed and it will get new assignments.
If the existing assignment is to a PWO with CONF and the setting IgnoreConfInWorkOrderAtOptimizationBySpecialRules is turned “OFF”, or a COA with CONF and the setting KeepConfInSalesOrderAtOptimizationBySpecialRules is turned "ON", the batch will only remove assignments if it can find enough available qty to fulfill the need of the PWO/COA in prioritized order:
SSA, sorted ascending by Date
SOA/PWO with CONF that is earlier than CONf of the PWO/COA, sorted ascending by CONF
In case the settings implies that CONF in COA/PWO don’t have to be fulfilled, the COA/PWO for which assignments from SSA/SOA/SPO/PWO were removed, will be ‘Pending’ and added to the list described in ‘Find COA's and PWOs that are candidates for optimization.’ ’ under ‘Step 3 Optimize assignments’.
This COA/PWO will now be handled during a later iteration of the re-assigning process described in step 3"-Re-assigning’.
If a product is set up with ‘Assign in multiple of’, the optimize batch will only get assignments to COA for quantity that is multiple with this. This rule does not apply for PWO.
Step 4 Optimize Stock according to FIFO principle
This step runs as default for PWO, COA is optional. If it should run for COA as well, the setting Sales Order (COA) included in the FIFO step for Optimize job in the Company settings (CSV) application must be turned ON. This documentation assumes this setting is on. The purpose of this step is to ensure that the oldest stock is consumed or shipped out first.
Find products that should be optimized
The first thing the FIFO step does is to find which products that are candidates for being re-assigned.
The requirements for a product to be re-assigned are:
Product is to be found in SSA with available quantity
Product is to be found in SSA which has assignment to PWO/COA
Picking process has not yet started
LinkLock is not set in SAR
The stock is not of type special structure
Stock is not reserved for a specific customer
Stock is not returned to supplier for repair
DELDATE is not outside of the Assignment Window
The product is not excluded from auto relinking
Find Stock that should be optimized
When all products that should be optimized in this step is found, the program works with one and one product at a time and build a list the SSAs that can be optimized. The SSAs are sorted descending by Date. Means that the oldest stock is handled first.
Re-Assigning
The PWO or COA with the earliest DELDATE should get assignments from the oldest goods first. The re-assigning starts with the first SSA in the list described in ‘Find stock that should be optimized.’ The program searches for PWO/COA that have assignments from other SSA with a newer Date.
The PWO/COAs that are found are sorted ascending by DELDATE and are handled one by one. If any of them have an earlier DELDATE than the PWO/COA that do have existing assignments from the SSA that is handled, the assignments will be removed and thePWO/COA with an earlier DELDATE will get assignment from the SSA. The COA/PWO that ‘lost’ its assignments, will then be added to the list of COA/PWO that will be handled in the next iteration according to its DELDATE.
If a product is set up with ‘Assign in multiple of’, the FIFO step will get assignments to COA for a quantity that is in multiple of this. This rule does not apply for PWO.
Summary
PWO and COA which get new assignments in the FIFO step will still have assignments from stock, but might from a different SSA.