Skip to main content

SOS2 piecewise approximation of u*l in DistFlow: convexity, adjacency, and recommended formulation

Answered

Comments

1 comment

  • Riley Clement
    • Gurobi Staff

    Hi Jorge,

    To avoid the bilinear product u*l, I introduce an auxiliary variable w intended to represent that product, i.e., w≈u*l. In my model, w is built via a 2D piecewise approximation on a grid of breakpoints for “u” and for “l” using weight variables

    P^2+Q^2<=u*l is a rotated SOC (RSOC) constraint, but  P^2+Q^2<=w is neither SOC or RSOC.  You could use P^2+Q^2<=w^2 and w^2<=u*l but now you have a SOC and a RSOC.  I don't quite understand the motivation to avoid the bilinear product or introduce w here.

    once I replace the product by w, should the quadratic constraint be written as P^2+Q^2<=w to preserve convexity, or is it valid to enforce P^2+Q^2=w even though w comes from this SOS2 approximation?

    It's valid, but it won't be convex (it defines a circle of radius sqrt(w)) - quadratic equalities are always non-convex and this is independent on what other constraints (PWL or otherwise) that it participates in.

    is declaring SOS2 in this way sufficient to guarantee the intended adjacency on the grid, and is there any official Gurobi documentation example showing a typical SOS2-based piecewise-linear model and the recommended implementation details?

    I haven't got into the details of your implementation, because I'm currently erring on the side of “it's not needed”, but if you were wanting to use a PWL then we would recommend using our own PWL API rather than defining it from scratch with SOS2, e.g Model.addGenConstrPWL.  You can see our section on Piecewise Linear Objectives in the reference manual for a discussion on how we implement it (the same ideas will apply to PWL constraints) and compare to your own approach.

    - Riley

    0

Please sign in to leave a comment.