ForgeFlow / ddmrp

DDMRP
GNU Affero General Public License v3.0
14 stars 17 forks source link

subtract_procurements #38

Closed hparfr closed 6 years ago

hparfr commented 6 years ago

Hi,

I was looking about how to take (not) into account long planned orders (expected date > decoupled lead time). add_to_net_flow_equation seams a good candidate to carry this information.

But def substract_procurements() seams dead code since this commit : https://github.com/Eficent/ddmrp/commit/8e5ae983c6590e96e5ec08d3f7714f06c29c90a3#diff-b886cdbc1da4eca803d4248195ecde52

Should it be renamed to def subtract_procurements_from_orderpoints ?

LoisRForgeFlow commented 6 years ago

Hi,

What you might be locking from a functional perspective is the "Order Spike Horizon".

To compute the Net flow position, you use the following expression: NFP = On Hand (unreserved) + Incoming - Qualified Demand. Qualified Demand is todays and past due orders plus spikes. A spike is a acumulation of demand (all the orders for a given day) greater that the Order Spike Threshold and within the Order Spike Horizon.

Have a look here: https://github.com/Eficent/ddmrp/blob/9.0/ddmrp/models/stock_warehouse_orderpoint.py#L526

So long planned orders will not be taken into account unless they have to (they are qualified spikes).

Does this bring some light to your issue?

hparfr commented 6 years ago

Hi, Order spike is for sales orders or purchases orders ?

The method you hint seams related to outgoing moves / sales orders. What I'm looking is about incoming moves / purchases orders.

My goal is to exclude long term incomings : purchases orders due in far future.

The use case is : you buy a small quantity to a local vendor weekly. Some times, you buy a full container by sea (big quantity, expected date in months) from a another vendor.

What I want is :

B) is harder and not so much important for me.

What do you think ?

LoisRForgeFlow commented 6 years ago

Hi @hparfr

I got you. That's an interesting point, we are considering to implement the exclusion of incoming orders expected further than today + supplier lead time.

Regarding subtract_procurements() you are right it's dead code. We'll fix when the decision for the above is made.

LoisRForgeFlow commented 6 years ago

For the record: we implemented the fix here: https://github.com/Eficent/ddmrp/pull/43

hparfr commented 6 years ago

Thanks :)