I have an optimization problem that I'm attempting to tackle. As you can see in the image below, there's a graph network through which water flows. I've drawn out the problem in the image to explain it clearly.
The objective is for Final1 node to receive water with component A having values between a range. The component A at any node is measured by a volume-weighted average of component A measures from its predecessor nodes.
Node_A = (Predecessor1_Vol x Predecessor1_A + Predecessor2_Vol x Predecessor2_A .....) /(Predecessor1_Vol + Predecessor2_Vol .....)
All of the above are decision variables (D.V.) in the optimization problem. The "vol" variables have to remain as D.V. since this is part of a bigger problem. There is flexibility on "component A" variables and can or not be D.V. as they were introduced only for this subproblem.
All numbers in the image are just examples of what the optimization can come up with. In the current formulation, all are decision variables except the concentration at "Start" nodes, which are given.
However, framing the problem this way makes it nonlinear (reason described in the image). Since I am using a linear solver "cbc", the solver just says that quadratic constraints cannot be supported.
I am reaching out to this community to find out if this problem can be linearised or formulated in another way to get the same output.