PWL objective function
AnsweredI want to minimize (f1(x1)*f2(x2))
where f1 and f2 are both represented by piecewise linear function.
How can I model this objective function in gurobi?
0
-
You can model the following equivalent formulation
\[\begin{align*}
\min &\,\,z_1 \cdot z_2 \\
z_1 & = f_{1}^{pwl}(x_1) \,\, (1)\\
z_2 & = f_{2}^{pwl}(x_2) \,\, (2)
\end{align*}\]You can use the addGenConstrPWL() method to model the equalities \((1)\) and \((2)\). Note that you will have to introduce 2 auxiliary variables \(z_1, z_2\). Since Gurobi supports bilinear terms, you can then multiply the two in the objective function.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
1 comment