Skip to main content

Piecewise Linear when objective function depends on two variables



1 comment

  • Yuriy Zinchenko
    Gurobi Staff Gurobi Staff

    Hello Janis,

    currently (v9.0) we have no automated mechanism that enables the multi-variate PW linear objectives.  One option is to build one yourself using, say, triangulation of the 3D surface corresponding to the function graph (only for completeness, I am adding this link, ). Here you would keep track of which "supporting triangle" you are in using binary inductors.

    However, starting with the present version we also support general bilinear expressions, and p-w linear constraints ( so this could be another route.  Namely, you can introduce an auxiliary pair of variables, (t', x'), and connect those to non-linear expressions using p-w approximation, while the objective would have a bilinear term x' * t'.  

    Personally I would start with the later approach as it is less labour expensive, to see if this would suffice.


    Hope this helps.


Please sign in to leave a comment.