Sunteți pe pagina 1din 13

c

Memory Based Planning Process [ID 99166.1]c


c

cc  c  cccccc


c ccccc
c 
 c cc

Π 
  


Bulletin 99166.1 

Memory Based Planning Process 

Overview


emory Based Planning Process is an improved planning engine that utilizes


a memory based architecture to help you achieve drastically reduced
planning run times. The new planning engine efficiently manages all the
processes which constitute a complete planning run. It utilizes a high
degree of concurrency among the snapshot tasks, eliminates non -value added
operations, and combines related tasks into a single task. The new
architecture also moves long running tasks such as deleting previous plan
data and loading snapshot data into the  P sn apshot tables out of the
critical path. emory Based Planning Process uses an efficient system of
inter-process communication to manage all the planning tasks. This essay
describes the architecture and technical features of the emory Based
Planning Pro cesses.
Major Features 
c
The emory Based Planning Process provides you with the features you need
to be able to satisfy your performance requirements: 
c

p Shorter overall planning run time You will be able to complete


planning runs with drastically reduced run times. 

p aeduced processing The Exploder process that determined the list of


planned items and calculated low level codes is eliminated. The
Exploder tasks are now done by the Snapshot processes. 

p Œonsistent Supply and Demand information You will be able to get read
consistent snapshots of all the supply and demand data without
locking users out of the system. 

p Flexible configuration You can specify the number of Workers to


perform your snapshot tasks and take advantage of the hardware
resources.

p ënhanced loop checker You can detect loops introduced by Discrete and
Non Standard Job component requirements. Component changes from WIP
are read and merged into a single structure along with BO
information, where loop checking is performed. Both loop checking
and calculation of low level codes are performed in one pass. 
p umproved inter -process communication You can take advantage of
improved communication between the processes that manage the
planning processes efficiently. 

p un-memory processing The process performs the planning calculations


in memory. 

Processing steps: 
c
The emory Based Planning Process consists of the following steps: 
c

p Snapshot Pre -processing 


This is the first step performed as a part of the Snapshot process
and it consists of tasks that need to be done before data can be
snapshoted. These tasks include calculating repetitive planning
periods for all the planned organizations and auto -reducing the PS
schedules. 

p utem list determination 


This step involves determining the items that will be planned as part
of the current planning run. The plan-level option included items
determines the items to be planned. All other Snapshot activities
cannot start until this step is complete. 


p Deleting old data 


This step consists of clean ing all the snapshot and planner output
data from the previous planning run. 


p Œreating flat files of snapshot data 


This step involves selecting the data from the system tables i.e.
WIP, INV, PO, and BO and writing the snapshot data to flat files.
Since this data is written to flat files, the deletes are not a pre -
requisite for this task. 


p ^oading flat files into database 


This step loads the snapshot flat files into the  P snapshot tables. 


p Snapshot Post -processing 


This is the last step in the Snapshot process and it consists of 
clean-up activity and execution of the user -defined Snapshot tasks
like updating item categories, ABC classes etc. in  P_SYSTE_ITES. 


p *etting


This is the gross -to-net explosion and involves the netting of supply
against demand and creating new supply orders. 


Processes

A group of seven processes make up the basic structure of emory Based


Planning Processes: 

1. emory Based Snapshot 


2. Snapshot onitor 
3. Snapshot Workers 
4. Snapshot Delete Workers 
5. Loader Workers
6. emory Based Planner 
7. Planner Delete Worker 

Following is a brief functional description of each of the planning


processes: 

` Memory Based Snapshot is the main Snapshot process. It is launched by


the character mode Launch Planning Process and 10SC Launch  P/D P/PS
Planning Processes form. It¶s primary task is to prepare the list of
planned items. In addition to preparing a list of planned items the emory
Based Snapshot performs the pre-processing and the post -processing
tasks. After preparing the list of planned items and snapshoting the item
information the emory Based Snapshot behaves like a Snapshot Worker. 

 he Snapshot Monitor is the process that controls the rest of the
planning processes. It is launched by the emory Base d Snapshot and it in
turn launches the Snapshot Workers, Delete Workers, Loader Workers, and the
emory Based Planner. The number of Delete Workers launched by the
Snapshot onitor is determined by  P:Snapshot Workers profile. It
launches the Delete Wo rkers after it prepares the list of delete tasks (
See Figure 1). The Snapshot onitor also maintains a list of snapshot
tasks and delete tasks and the current status of each task. It uses this
list to provide the next snapshot task to the emory Based Snapshot and
Snapshot Workers. It uses the status of the delete tasks to determine if
the flat files created by the emory Based Snapshot and Snapshot Workers
can be loaded to the database by the Loader Worker. The Snapshot onitor
is also responsible for ensuring the ead Consistency of the data
snapshoted by the emory Based Snapshot and the Snapshot Workers, the next
section describes this in more detail. 

† Snapshot Workers are launched by Snapshot onitor based on the


 P:Snapshot Workers profile. If this profile is set to one, the Snapshot
runs as a single threaded process. If the profile is set to more than one
the Snapshot runs as a multi -threaded process. The Snapshot Workers
snapshot BO, WIP, on -hand, PO, Firm Planned Orders, outings and WI P job
resource requirements. The Snapshot Worker is controlled by the Snapshot
onitor and receives instructions on which task to perform next. The
Snapshot Worker snapshots the data to flat files and communicates the
completion of the task and the name o f the file to the Snapshot onitor.
You can configure the Snapshot process to run as single threaded or
multi-threaded process, by selecting a value for the profile option
 P:Snapshot Workers. 

 Snapshot Delete Workers are launched by the Snapshot  onitor. The


Snapshot Delete Workers delete the planning data from the last run. Each
worker reads  P_SNAPSHOT_TASKS to get the next delete task. After it
competes the delete it updates the completion date in  P_SNAPSHOT_TASKS to
indicate the completion of the task. 

´ ^oader Workers are launched by the Snapshot onitor. One loader worker
is launched for loading each table. The Snapshot onitor launches the
Loader Worker after the flat file for the snapshot data has been written
and the last planning run data has been deleted (See Figure 2). The loader
worker uses sql*loader to load the data. The profile option  P:Direct
Load controls whether direct load or conventional load is used by
sql*loader. 

@ Memory Based Planner performs the gross -to-net explosion. It is launched


by the Snapshot onitor or when the user just chooses to launch Planner.
It loads the snapshot flat files into memory, nets the supply and demand
for planned items and writes the output to flat files. These flat files are
loaded into the database by Loader Workers launched by the emory Based
Planner.

Ë Planner Delete Worker is launched by the emory Based Planner. It is


not launched as part of the emory Based Planning Processes but is
launched only when the emory Based Planning Processes run without the
Snapshot. It is responsible for deleting data from the planner output
tables such as  P_ ECOENDATIONS,  P_G OSS_ EQUI EENTS,
 P_FULL_PEGGING. 


aead Œonsistency 

One of the advantages of the memory -based architecture is the availability


of consistent image of all the data snapshoted without having to lock
users out of the system. The emory Based Snapshot and Snapshot Workers
snapshot all supply and demand data as it existed after the item list has
been snapshoted. All changes made to the data after that are not included. 

This is accomplished by using the Oracle DBS feature -set transaction read
only. The advantage in using read only option is that you do not need
exclusive table locks which lock the users out of the ta ble for the entire
duration of the Snapshot. Since the snapshoting of data is performed by
multiple processes, the set transaction read only has to be executed at
the same time by the emory Based Snapshot and the Snapshot Workers 

The plan parameter lock tables, controls the degree of ead Consistency
attained by the emory Based Snapshot and Snapshot Workers. If lock tables
is set to Yes the Snapshot onitor ensures that the set transaction read
only is executed at the same time by the emory Based Sn apshot and the
Snapshot Workers. It also ensures that no transactions are performed
while the snapshot processes are trying to set transaction to read only .
In order to ensure this the Snapshot onitor gains an exclusive lock and
instructs the emory Based Snapshot and Snapshot Workers to do a set
transaction read only (See Figure 1). As soon as Snapshot onitor receives
a confirmation from the snapshot processes of the set transaction read
only, it releases the lock. The advantage here is that we ge t a read
consistent snapshot with minimal locking of users out of the system. 

When the plan parameter lock tables is set to No, the processes still
execute a set transaction read only but Snapshot onitor does not
coordinate the execution of set transact ion read only between processes. 

Thus both emory Based Snapshot and Snapshot Worker could be executing set
transaction read only at different times, not necessarily far apart from
each other. There is a possibility of some inconsistencies creeping into
the system but it is fairly remote. The new planning engine gives you much
better results when compared to the old Snapshot which runs without lock
tables.


unter-Process communication 

The memory -based architecture uses a combination of database pipes and


databases tables for inter -process communication. The emory Based
Snapshot and Snapshot Workers communicate with the Snapshot onitor via
database pipes. These messages include requests for new tasks, task
completion, initiate set transaction read only etc. (See Figure 3). efer
to Oracle 7 Application Developer¶s Guide for more information on database
pipes.

The Snapshot onitor communicates with the Snapshot Delete Workers through
the table  P_SNAPSHOT_TASKS. The Snapshot Delete Workers read the tab le
to get the next delete task and update the completion date in the table to
indicate the completion of the task. The Snapshot onitor queries this
table to verify the completion of delete tasks. 

Snapshot tasks c
A brief functional description of some of t he snapshot tasks follows: c

Purchasing information : This task retrieves supply information regarding


purchase orders, purchase requisitions, intransit shipments, intransit
receipts and purchase orders in receiving from the database. 

WuP and BOM component in formation: This task loads BO structures,
pending ECOs, component requirements from discrete jobs, repetitive
schedules, and non-standard jobs. It also calculates low level codes and
checks loops introduced by both WIP components and BOs. 

Delete: This task deletes data from relevant  P tables which belongs to
the previous plan. 

WuP information : This task loads discrete jobs, non -standard jobs,
repetitive schedules and calculates aggregate repetitive schedules. 

Œapacity information : This task loads job resource requirements and


capacity resource information. 

Demand information : This task loads independent gross requirements and


material reservations. 

Safety stock : This task loads time phased safety stock information. 
unventory information : This task loads information regarding inventory
lots.

Substitute items information : This task loads substitute items. 

MPS orders information : This task loads PS planned orders. 

MaP orders information : This task loads  P firmed planned orders. 

utem unformation : This task loads inventory items, primary vendors, item
categories, item classifications, quantity on hand and cost information. 


Profile Options 

MaP: Snapshot Workers 


You can configure the Snapshot to determine the number of Snapshot Workers
to launch. This profile option determines the number of Snapshot Workers
that the Snapshot launches . A larger value means that more tasks are
performed in parallel. Too many workers, however can result in increased
inter-process communications, system degradation and diminishing
performance benefits. Too low a value for this profile option means that a
potential advantage of parallel processing is not utilized. emory Based
Snapshot launches the same number of Delete Workers as the number of
Snapshot Workers. 

MaP: Snapshot pause for lock 


With this profile option you can make the Snapshot process pause for the
amount of time chosen by you to obtain locks. You can choose a value for
this profile option depending on the amount of data, transaction volume,
and the number of Snapshot Workers. 

MaP:Direct ^oad 
A choice to use Direct Load, loads the data into the tables faster than
conventional loading. If the choice is not to use the Direct load, the
Loader Workers use conventional load. Please refer to Oracle 7 Se rver
Utilities User¶s guide for more information on sql*loader. 

MaP: ënvironment variable to set path for MaP files 


A variable specified by the user will set the appropriate paths for the
 P files. If this profile is not used the files are written to 
$ P_TOP/$APPLOUT. 

erms c

p Snapshot Monitor c


A process which controls and coordinates all the processes related to
emory Based Planner. 


p ^oader Worker 


A process, which loads data from operating system files to the
corresponding tables. 


p Snapshot Delete Worker 


The Snapshot Delete Worker performs database delete operations, it
removes previous planning data from the tables. 


p Snapshot Workers 


A planning process which snapshots current supply and demand
information required to calculate net materi al requirements. 


p Memory Based Snapshot 


A planning process that determines the list of items to be planned
and performs some of the snapshot activities. 


p aead Œonsistency 


A consistent view of all the data, which consists of all the data
committed by other transactions at the time of the read and all the
changes made by the user up to the time of read. 


p Set ransaction read only 


A standard feature available on Oracle database which provides
transaction -level ead Consistency. 


p Pipe


Pipes allow sessions in the same instance to communicate with each
other. Each pipe works asynchronously, allowing multiple readers and
writers of the same pipe. 


p Planner Delete Worker 


The Planner Delete Worker performs database delete operations, it
removes old planning information from the tables. 


p Memory Based Planner 




J  
 
 
    
J  
  

     Jc







c
 

 
    
!    "
# $

Õ

ca l t c

c
t c
c

p  c 
c c c
c


c cc
c


c cc
  c
c


c

?   

c
c

Oracle Master Scheduling/MRP tables details [ID 394726.1]c

cc  c  cccccc


c  ccccc
c 
 c cc

u 

 
 
 
 ! 
 "#  
 


J  


 $ 
 "% &''(''()('
*       
 
(c

J 

 +     


  

+ "

,-  "


, ! 
 "
, 

 "
,   

 "


 

J   ("
   '
    
    ."    /c

        

      



 
 ! 
 "#    
,-  "
, ! 
 "
, 

 "
,   

 "

     

 
 "       (-   
  +

 (!
   

 (01

" 

 (* 

"     
 (* " 2  
      (

3  $ 
 "4   
4  

$ 

 "


( " +  
         41 " $ 4 
 54 "" + $  5


+    (

,  $ 



  (

,    



    (6  

  "
  . 

/(

,  
$ 



   (


  
 
 """4       


 $ 
 " 
  "  
7 (

    " 
    1  

4   

 "


   

8- 0Œ!80!*9: !
  
    (   $
  
 ( "   ( 
 - 0Œ!8!0 " 
  8- 0Œ!80!*9: !(*   +     

 "(  
 "  
  (
  

  - !+ +(  
- 0Œ!80!*9:   9:*;*:8*( 

8- 0Œ!830!
  
    (0        
 
 
  4  
   
(  

 "
   4+   
 " "(

8- 0Œ!80!
  
      (0  +   $ 
     "   (  

 0 - 0 
+ +4   
 4  4 *    " ( 
  :!Œ*:8*(

8- 0Œ!8*0 !
  
       (0      
8- 0Œ!80! "   " +

 1 
 + 
8- 0Œ!8*0 !(  

 0 - 0 + +(  
*:%0: 68*0 8*4 9:*;*:8*4 - 0Œ!80!*9: ( 

 8- 0Œ!8 3 0
  

 4+     ! 
 -  "
¦( ¦  
 - Œ¦  ¦ 4- !¦ 4
! 
-  "  (Œ¦  ¦ "  +     
¦(  +    ¦(    
 
   "( ¦
¦  4+4 ¦( 
¦ - 0Œ!8 3 08*(

08 0 800 !8 
  
       " ( ¦ 
00 8*(

08 0 8 *:0!8 
  
   


   
 " ( ¦ 
*:08*(



 
     

8!Œ03 080!*9: !
  
 !  ! 
 ( 
  $
   
 
(   ! 
: + +¦¦
  
( ¦ 
!Œ03 080!*9:   9:*;*:8*( 

8!Œ03 08*0 !
  
      
(0      
8!Œ03 080! "   
 +

 1 
 + 
8!Œ03 08*0 !( 0  ! 
0 + +¦¦
  
( 
¦ *:%0: 68*0 8*4 9:*;*:8*4 !Œ03 080!*9: ( 

8!Œ03 080!
  
     ¦  
(0  +¦  
 
  "   "  $   "   ( ¦ 
!8 :!Œ*:8*4!Œ03 08 0%0 4 !3 680 :860( 

89 !!8 0<3* 0 0:!
  
 ¦5"$  "     !4  ¦
( 

¦¦
  
( ¦ 0 :8*(

8 :8!Œ03 0!
  
    ! 
 !¦¦
! 
    !4
4  ¦
(  
  
 8 :8 9:*;*:!  
 
!¦¦
Π 
 "
(  
¦¦
  
¦ + +( 
¦  9:*;*:8*4Œ * 080!*9: 4*:38 9:*;*:8*4
*:38: 04  :8 0%0 (

8!Œ03 08Œ:!3 *:!
  
   

(0   ¦  
 ¦
 ¦ 

 
 4  
  ¦  
    
4 
   54¦ 4¦    "4   ¦ 4  
¦4¦ $   ¦  
(  
¦¦
 "
 

4+  ¦ 
 " "(


   

8 :!
  
 " ¦¦
 ( 8 :!  " 
    ¦
 "¦ "  ¦
 (0  +
    ¦ 
¦
 (    
 "+ +¦¦
  
( 
¦  9:*;*:8* Œ * 080!*9: (

8 :8!Œ03 0!
  
    ! 
 !¦¦
! 
    !4
4  ¦
(  
  
 8 :8 9:*;*:!  
 
!¦¦
Π 
 "
(  
¦ + +¦¦
  
( 
¦  9:*;*:8*4Œ * 080!*9: 4*:38 9:*;*:8*4
*:38: 04  :8 0%0 (

8 :8 9:*;*:!
  
 " 2    ¦
  !4 4 ¦
(  
  

 8 :!   
!¦¦
Π 
 "
(  
¦ 
+ +¦¦
  
( ¦  9:*;*:8*4Œ * 080!*9: 4
 ::08 9:*;*:4  :8 0%0 (

8*0 8!3 Œ*:9
  
   "   ¦
+    !4 4 
¦
(0  +  
 4+    ¦¦
4  " 2  4 
 ¦
" 2  (  
¦¦
   ! ¦  ¦

 !   + + !¦¦
Π 
7     !¦¦
Π 

 " 
 ¦( ¦ Œ * 080!*9: 4 9:*;*:8*4
*:%0: 68*0 8*4!3 Œ08 9:*;*:8*4%0: 8*4%0: 8!*08*4 
0--0Œ*%080(

8!6!0 8*0 !
  
 ¦¦
 ¦
 "¦(  
  
8!6!0 8*0 !¦ 
   
*    
4
 8!6!0 8*0 !(  
¦¦
 ! ¦ 4  
(  

  
  8!6!0 8*0 !(
 ¦ *:%0: 68*0 8*4 9:*;*:8*4 Œ * 080!*9: ( 

Œ 8 ::08 0!3 Œ0!
  
 
¦
 ¦
 "¦(
Œ 8 ::08 0!3 Œ0!     " 
¦  #   
 (  
¦¦
 ! ¦ 4 
 
(     
  +  
=7  (
8*0 80>Œ0*:!
  
 +  1¦  " "   (
8*0 80>Œ0*:!¦¦
 
4  ¦  $(
 ¦ Œ * 080!*9: 40>Œ0*:8604 
*:%0: 68*0 8*4 9:*;*:8*4 ?0Œ8*4!@8*4 *:08*4 %0 !*:( 

Œ 8%* ? 08 0!3 Œ0!
  
 

   

¦  # 


   
¦
(  

   
   "  ¦
 " 2 (
Œ 8%* ? 08 0!3 Œ0!¦¦
  ¦   ¦
(   
  
  +  
=7  (

  

  0 0 A* !



   
 !
#    


(0     4
A   
  
 
     
4    
  
4 5 4


 5 4

 
4



 4

  4
   


   

 

  




  0 0 A* !(A  A  ! A*  * (

  

 0!  0 B 
A 
       
 * 5 4 *


 5 4

! 

  4
  
   

(A 


 
  

   

 (* 
  
 
  



  

 
 
 
     




  

(A  A  ! A*  * (







c




ca l t c

› du tsc

p  c 
c c c
c


c cc
c


c cc  c

c


c

m  dsc
c

 cc !"c !""ccc
c

?   c

S-ar putea să vă placă și