Hello everyone,
Really hoping one of you bright-minded individuals can help me progress on a persistent issue.
I am essentially doing a replica of the "T1.3 Allocation with Product & Line Compatibility" from the Optimizer Toolbox:
But! My objective is not to minimize cost. Instead I have a guideline allocation of the orders between the lines. So for each of the products I have target values for each of the lines in terms of how many they should have and the objective to minimize the deviation between the actual allocation of orders and the guideline regardless of whether it is above or below (as long as their total capacity is not exceeded of course).
Been working on some testing and also asked ChatGPT for advice, but keep hitting dead ends on this as I can not ensure linearity in my setup according to Optimizer. It does work in Excel using Simplex LP engine though? Have enclosed an example of the Excel setup that works. Problem in Optimizer seems to be these two constraints:
Variable Positive Deviation >= Auxiliary Positive Deviation
Variable Negative Deviation >= Auxiliary Negative Deviation
When trying to solve through Optimizer on the same setup as in Excel I get this error:
"The Constraint is invalid. It should be of the form Ax >= B, not Ax >= Bx.
Change your formula so that only one side of the Constraint is dependent on variables."
In case I change the constraints to
Variable Positive Deviation - Auxiliary Positive Deviation >= 0
Variable Negative Deviation - Auxiliary Negative Deviation >= 0
Then the error is on the Auxiliary calculations:
"There is an invalid term for Constraint 'A1 PosDev'.
Each Term must either be a Variable or a multiplication.
There is an invalid term for Constraint 'A2 NegDev'.
Each Term must either be a Variable or a multiplication."
Example images from one of the tests in Anaplan: