Hi @iCFO and @Gabriel2020 ,
I’m a bit distant from this now at #50+ posts in, but since @ICFO was asking about any simplification, I thought I’d pop in with the java snippet. That is certainly one huge effort you put in here @iCFO
Now, I know there are other subtleties here that I haven’t got my head round, so what I have below isn’t a total solution, but in terms of simplification, the java snippet is very good for simplifying cumulative processing.
This snippet calculates the backlog according to the rules I understood at about post #3
This is only applying the rules:
(1) current backlog = Shipping Volume - Receiving Capacity + previous backlog
(2) if current backlog <0, then set current backlog to zero.
I’m wondering if that could help simplify the remainder.
What are the other rules concerning start of week etc, and did it need to take into account ORIGIN and DESTINY? Anyway here it is…
Backlog Calc with java snippet.knwf (8.9 KB)