Skip to main content

PWL objective function

Answered

Comments

1 comment

  • Jaromił Najman
    • Gurobi Staff

    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.