Documentation >
MAC-PAC Technical Library >
Manufacturing >
Capacity Planning >
Programs >
CP LR-Generation - Purpose >
CP LR-Generation - Calculations
CP LR-Generation - Calculations
CP100E
A. Housekeeping
1. Workfields are defined and initialized.
2. Category 049, Date Format, is retrieved from the Reference file.
3. Category 012, Applications Installed, is retrieved from the Reference file.
a. If the record is not available, the program terminates abnormally.
4. If the Shop Floor Control module is not installed, the Shop Floor flag (TRSFFG) is set to no (N). If the Shop Floor Control module is installed, the flag is set to yes (Y).
a. If the record is not available, an error message is displayed, the program assumes that Shop Floor Control is not installed, and processing continues.
5. The company name is retrieved. Refer to Common Processing Routines for a description of this processing.
B. Mainline
1. The Capacity Planning Generation file (CP080AP) is read to determine the generation mode requested for the plant. The plant from the generation file is used to access plant information from the Plant Logical file (IC170ML2). The piece rate standard, the workday start time, and the calendar code for the plant are retrieved. Using the calendar code, the first shop date is then retrieved from the Calendar file (CT140M).
The CP Generation file will be read until all plants are processed.
2. The routings for all flow authorizations for the plant in the FA file (JT100ML3) will also be scheduled.
3. Two separate branches of the mainline can be processed, depending on whether the Shop Floor Control module is installed.
a. If the Shop Floor Control module is installed, this program schedules the routings for planned orders for the plant.
b. If Shop Floor Control is not installed, this program schedules the routings for planned and firmed orders for the plant. It also schedules the routings for open orders if the load open orders option on the Capacity Planning control record on the System Control file is set to Y. (If this flag is set to N, open orders are not processed by this program.)
4. Each routing is validated before it is scheduled.
a. The logical Manufacturing Order Header file (IC100ML8) is read.
(1) If the Shop Floor Control module is installed, only planned orders will be processed. The Capacity Planning flag (HCPFLG) for these orders equals yes (Y).
(2) If the Shop Floor Control module is not installed, planned and released orders will be processed. The Capacity Planning flag (HCPFLG) for these orders equals yes (Y).
b. The logical Planned Labor Requirements file (CP100AL1) is read using the order number (HZORNO) as a key. Existing labor requirements records for each order are deleted.
c. The logical Planned JIT Labor Requirement file (CP100AL2) is read using the operation type as a key. Existing labor requirements for JIT operations (type=8) are deleted.
5. MRP scheduling is performed.
a. The order start date (HSTDT) and order due date (HDUEDT) are initialized to zero. The last operation indicator (LOPIND) is initialized to one.
b. The logical Routing file (ME120ML5) is read using the plant and the parent part number (HZPPN) as keys. This file does not select master routings, alternate routings, or comments.
c. If no routings are found for a part, the appropriate error code and message are written to the Capacity Planning Labor Requirements Generation Exception report. Processing for the order ends and no scheduling takes place.
d. If a routing is found for a part, its effectivity is checked. If the routing is not effective, the next routing is checked. Only operations that are effective on the order start date are processed.
(1) The routing is effective if it is in operation on the order start date. Refer to the Capacity Planning User Manual for more information on effectivity checking.
(2) If no effective routings are found for a part, the appropriate error code and message are written to the Capacity Planning Labor Requirements Generation Exception Report. Processing for the order ends and no scheduling takes place.
e. The workcenter number is checked. If it is numeric and greater than 900, the workcenter belongs to an outside vendor.
6. The last MRP routing for an order is scheduled.
a. The first effective routing read for the part from the logical Routing file (ME125ML5) is the last operation, because the file is organized in descending operation number order for backward scheduling.
b. The Workcenter file (ME100M) is accessed to retrieve the workcenter's machine/labor paced flag, move time, queue time, and hours per day.
(1) If the routing currently being scheduled is performed at the same workcenter as the previous routing, the previous routing's workcenter information is used and the Workcenter file is not accessed.
c. The elapsed run time for the routing is calculated. Refer to the calculation of elapsed run time hours for the last operation.
(1) If the operation is processed at an outside vendor's workcenter, the elapsed run time hours (TRERTH) are calculated from the operation leadtime days (ROPLT).
(2) If the operation is a fixed time operation, the sensitivity flag (RZSNFL) is checked. If the operation is not batch sensitive, the elapsed run time (TRERTH) equals the scheduled piece rate. If the operation is batch sensitive, the scheduled piece rate is multiplied by the number of batches required to complete the order quantity or the remaining quantity to come up with the elapsed run time hours (TRERTH). The number of batches is determined by the following calculation.
(3) If the operation is not a fixed time operation, the elapsed run time hours for the routing are calculated as follows:
(a) If the saved piece rate standard (TRPRTF) is hours per piece, the number of hours per piece for the routing (TRPRTE) is initialized to the piece rate for the operation (RTSLH).
(b) If the piece rate is pieces per hour, the number of hours per piece for the routing equals the reciprocal of the piece rate for the operation.
(c) The Operation Run Time Hours field is calculated. It equals the hours per piece for the routing multiplied by the order quantity (TROPQT).
(d) The Elapsed Run Time hours field is calculated. If the operation is machine paced, it equals the operation run time hours divided by the number of machines used by an operator (RONMCH). If the operation is a crew operation, the Elapsed Run Time Hours Field equals the operation run time hours. If the operation is labor paced, the Elapsed Run Time Hours field equals the operation run time hours divided by the number of persons (APERS).
d. The due date and time for the last operation are calculated.
(1) The Calendar Date file (CT140M) is accessed.
(2) The calendar date in shop date format (MSHPDT) is moved to the work field for the operation due date in shop date format.
(3) The operation due time (OPDTME) is calculated. It equals the hours per day for the operation being processed (TRHPD) plus the workday start time (TRWKST).
(a) If the operation due time is greater than 23:98333 hours, it is reset to 23:98333 hours, which is 11:59 p.m. described in decimal form.
e. The run time start date (TRRTSD) and run time start time (TRRTST) for the last operation are calculated.
(1) If the type of operation (ROPTYP) is blank, the operation is processed at an outside workcenter. In this case, the run time start date (TRRTSD) equals the due date (TRSFDD) minus the operation lead time days (TRARTD). The run time start time (TRRTST) equals the operation due time.
(2) If the type of operation is not blank, the run time start date (TRRTSD) and run time start time (TRRTST) are calculated. Refer to the Capacity Planning User Manual for a summary of this processing.
f. The operation start date (OPSTDT) and operation start time (OPSTTM) are calculated by subtracting the setup hours (RTSSH) from the run time start date and time.
7. After the last MRP routing is scheduled, all other routings are scheduled.
a. The Workcenter file (ME100M) is accessed to retrieve the workcenter's machine/labor paced flag, move time, queue time, and hours per day. If the routing currently being scheduled is performed at the same workcenter as the previous routing, the previous routing's workcenter information is used and the Workcenter file is not accessed.
b. Move and queue time are calculated. Move time is used if the operation will be performed at a new workcenter. Queue time is used if the operation will be performed at the same workcenter. Move and queue times depend on the type of operation being processed. Refer to the Capacity Planning User Manual for more information.
c. The elapsed run time hours for the routing are calculated. Refer to the calculation of elapsed run time hours for the last operation.
d. The due date and time for the operation are calculated.
e. The run time start date and run time start time are calculated.
f. The operation start date and operation start time are calculated.
8. JIT scheduling is performed.
a. The Flow Authorization file (JT100M) is read sequentially. Closed or fully received orders are skipped.
b. The quantity remaining to be received is calculated for the days remaining to be processed.
c. The logical Routing file (ME120ML5) is read using the parent part number (HZPPN) as a key. Outside processed operations are skipped.
d. If no routing is found for a part, the appropriate error code and message are written on the Capacity Planning Labor Requirement Generation Exception report (CP100A). Processing for the flow ends.
e. The operation offset and flow begin and end dates are used to calculate the operation load begin and end dates.
f. The operation effectivity date is verified and the operation load begin and end dates are adjusted if necessary.
g. The load is calculated from the flow daily quantity and the operation load per unit (machine load and labor hours) as follows:
Daily Labor Load = Daily Quantity x Labor Hours/Unit
|
Daily Machine Load = Daily Quantity x Machine Load/Unit
|
9. Wrap-up processing is performed for an order.
a. Labor requirements records are saved and written to the logical Capacity Planning Labor Requirements file (CP100AL1).
b. The Labor Requirements Generation Exception report is printed. The report is also routed to the output queue specified for the plant being processed.
c. For MRP parts, the Capacity Planning schedule flag (HCPFLG) on the logical Manufacturing Order file (IC100ML8) is set to N.
10. All the flow authorizations for the plant are processed.
a. The Flow Authorization file (JT100M) is read for all the flow authorizations for the plant being processed.
b. The remaining workdays for the FA is calculated using the total quantity received and the FA daily quantity. A partially received day is taken as one day. Then, a new FA daily quantity is calculated based on the quantity left to produce and the remaining workdays for the FA.
c. The routing logical file (ME120ML5) is read to access all the routings for the FA. Each routing is checked for effectivity.
d. The first effective routing read for the FA part is the last operation.
e. The labor requirement start date and due date are determined by subtracting the operation lead time days (ROPLT) from both the FA start date and FA due date.
f. If the JIT operation is not batch sensitive (RZSNFL ='N'), the quantity left to produce is multiplied by the fixed labor hours (RTFLH) and the fixed machine load (RTFTMH) to come up with the LR labor hours (CPLBHR) and the LR machine load (CPMCLD) respectively. If the operation is batch sensitive (RZSNFL ='Y'), the number of batches required to complete the quantity left to produce is calculated. This will be multiplied by the fixed labor hours (RTFTLH) and fixed machine load (RTFTMH) to come up with the LR labor hours (CPLBHR) and the LR machine load (CPMCLD).
The number of batches required is calculated as follows.
NUMBER OF
|
=
|
FA QUANTITY LEFT - (BATCH QUANTITY * SENSITIVITY FACTOR/100)
|
BATCHES
|
|
BATCH QUANTITY
|
11. Wrap-up processing is performed for the program.
a. The system date is updated on the Capacity Planning control record (CPCTL1) on the System Control file. This date, in YYMMDD format, is used as the last Capacity Planning labor requirements generation date.
b. If the report file has been opened, the Capacity Planning Labor Requirements Exception report (CP100A) is printed.