Logistics _ Stock Forecast (nested-recursive equations)
Workflow created for the KNIME forum ...
https://forum.knime.com/t/how-to-create-a-loop-between-to-equations-using-ones-input-as-the-others-output/39741
The challenge is to calculate a system of two consecutive ecuations (described in the Forum's post) f(1) 'Quantities to be ordered' and f(2) 'Stock Projections', this is applied for a multi 'Item' data set. These calculations have to be ran in a row by row basis (ordered by date), being the resulting f(2) 'Stock Projection (n+1)' inputed in next row at column 'Input Stock', being an input parameter in the next iteration' f(1) calculation.
Regarding the challenge itself, the easiest would be to code it (R?). However we test here that a possible approach by using just KNIME nodes is doable. The selected approach is a nested recursive loop handling the f(1) 'Quantities to be ordered' and f(2) 'Stock Projections' calculations, within an standard loop operating over the items (Ships, Banana, Apples…)
COMMENTS:
The provided data comes in an unstructured format; A first section is required to gather and transform these tables into a structured object. The resulting data frame can be considered the starting of the task proposed in the caption.
The collected data at final loop output, results in one month shorter in the time series than the starting data; this is due because we don't have a value to input in last month 'Safety Stock (n+1)'
For any comment or bug realted to the workflow, please do not hesitate to leave your comment.
DISCLAIMER:
The sharing of knowledge in KNIME Hub by using these examples and models, have only demonstration purposes in the advantage of the KNIME community.
These are meant to clarify theoretical background of mentioned subjects in caption.
I will not be held responsibility for any damages arising from the use of these models in your investment/valuation related work, without taking formal advise.
Used extensions & nodes
Created with KNIME Analytics Platform version 4.4.2
Legal
By using or downloading the workflow, you agree to our terms and conditions.