|
|
|
|
|
|
Login
|
erp5.org has permanently moved to wiki.erp5.org ! Current status of ERP5 community websites:
Note: if you created content in this ancient portal, please migrate it to the wiki. The old website will stay online as long as all contents are not mograted to the wiki.
Time and Capacity Management in ERP5
Rough draft describing core methods to update ERP5 for closed-loop MRP to MRP2
Time & Capacity Management in ERP5ERP5 currently provides closed loop MRP but does not provide complete MRPII at this time. MRPII will be implemented according to the following technical note. The base problem of time and capacity management can be stated as follows: does the current simulation plan meet the current capacity plan ? This requires to be able to calculate capacity over a period of time as well as to be able to calculate usage of resource over a period of time. Problem 1: calculate the capacity of resource over a time periodFor example, calculate the number of working days of an employee over a period of time, the number of working hours of a machine over a period of time. We suppose that working calendars are represented as movements, with a quantity of 1 for an available day, -1 for a non available day and 0 for information movement. Available days are supposed to completely overlap unavailable days. Calculation of the net number of available days for a resource can be implemented with a method like this:
SELECT
SUM((MAX(from_date, start_date) - MIN(to_date, stop_date)) * quantity)
FROM
movement
WHERE
from_date <= start_date < to_date
OR
from_date < stop_date <= to_date
AND
( movement is in global calendar
OR movement is in personal calendar
OR movement is in career calendar
OR etc.)
or like this:
SELECT
SUM(
IF (portal_type = "Global Calendar") THEN (MAX(from_date, start_date) - MIN(to_date, stop_date))
ELSEIF (portal_type = "Personal Calendar") THEN - (MAX(from_date, start_date) - MIN(to_date, stop_date))
)
FROM
movement
WHERE
from_date <= start_date < to_date
OR
from_date < stop_date <= to_date
AND
( movement is in global calendar
OR movement is in personal calendar
OR movement is in career calendar
OR etc.)
Problem 2: calculate the resource usage over a time periodWe suppose that the quantity in a movement has been set in order to take into account non working days. For example, a batch starting on friday morning and finishing on monday evening counts for a 2 days of labour if saturday and sunday are non working days. Quantity is therefore set to the equivalent of 2 days. The problem we have to solve is to calculate the resource usage over, for example, an interval of time starting on sunday and stopping on wednesday. We can use for this an expression like this:
SELECT
SUM(
IF (start_date <> stop_date) THEN
quantity
* (MAX(from_date, start_date) - MIN(stop_date, to_date))
/ (start_date - stop_date)
ELSE
quantity
)
FROM
movement
WHERE
from_date <= start_date < to_date
OR
from_date < stop_date <= to_date
Problem 3: schedule simulation movementsWe can now calculate the capacity and the usage of a resource, or of a group of resources. We now want to apply this to the scheduling of simulation events. The main time related question to solve in simulation is: if a production starts at start_date, when will it finish if we suppose we have infinite capacity with finite execution speed. What makes this question less easy than it seems is that production batches may contain numerous produced items and, eventually, multiple production levels. Production items are grouped and sequenced. A given operation will be executed in one location before another operation is executed in another location. The method we recommend involves the following steps:
Problem 4: capacity planningBased on the plan defined in the simulation, we can display a capacity plan by calculating over intervals of time the capacity of groups of resources and their usage. This allows to detect capacity problems. The intervals of time can be quite long for distant events and short for close events. Using this system consists in the following steps:
Technical IssuesImproved date arithmetics will be required in MySQL to support the above methods. We may have to backport TIMESTAMPDIFF or implement DATETIMEDIFF in MySQL 4.1. |
|
|