Hi everybody,
i am currently loosing my mind over a problem. I need to maximize a value dependent on parameters / goal values i have to hit.
I attached some sample data below:
Example.xlsx (11.3 KB)
Here is what I want to achieve:
- Maximize a column sum for a new column (the new column should be calculated by taking a number between the from and to and multiply it with the revenue column) while keeping inside a certain percentage boundary (please take a look at the example at the bottom to make it a bit clearer).
Two outlines are set that need to be taken into consideration:
-
The value to multiply with the revenue must be between or the same than the range from “from” to “to”
-
Here’s the tricky part: The weighted average between the value used for multiplying with the revenue and the given value in the Percentage column must be close to a given target percentage.
So one one side we have (Percentage * Amount X) / COL_SUM(Amount X) ~= Target Percentage Value
While also calculating Revenue * Amount X = Maximum possible value while keeping close to the Target percentage Value
Example:
The given Percentage target is set to 80%. I now must find the values in between the from and to columns that 1. Maximize the column sum when multiplied with the revenue and 2. Are as close as possible to the given 80% value (for the sake of testing let’s say it has to be between 75% and 85%).
I hope its clear what I mean and some of you KNIME magicians can help me .
Best regards
Timo