メインコンテンツへスキップ

SOS2 in convex piecewise linear constraint

回答済み

コメント

1件のコメント

  • Jaromił Najman
    • Gurobi Staff

    Hi Christin,

    How can I avoid the inclusion of the SOS2 constraints when I use mod.addGenConstrPWL?

    Currently, there is no way to avoid the introduction of the SOS2 constraint as it is added by default. You are right that due to the convexity of the PWL function, it would not be needed. This case is on our radar and part of the future roadmap. For now, if you know that your PWL constraint is convex, you should implement it "by hand".

    Further, are there benefits in using Gurobis mod.addGenConstrPWL compared to modelling the piecewise linear constraints "by hand"?

    The main benefit is the convenience factor. There are also other smaller benefits like possible better presolve reductions but these rarely have a huge impact on the solution process. In general, you could implement the PWL function yourself and the solver behavior should be more or less the same.

    Best regards, 
    Jaromił

    0

サインインしてコメントを残してください。