Skip to content

dual inception creates more variables as we dualize #9

@guilhermebodin

Description

@guilhermebodin

Hey guy, a thought I had after the dualize(dualize(model)) == model commentary by @blegat on gitter.
Consider the problem

#=
    primal
        min -4x_1 - 3x_2 -1
    s.t.
        2x_1 + x_2 - 3 <= 0  :y_3
        x_1 + 2x_2 - 3 <= 0  :y_4
        x_1 >= 1                   :y_1
        x_2 >= 0                   :y_2
    =#

Following the convention here http://www.juliaopt.org/MathOptInterface.jl/stable/apimanual/#Advanced-1 the dual will be

    dual
        max 3y_4 + 3y_3 + y_1 - 1
    s.a.
        y_1 + 2y_3 + y_4 == -4   :z_1
        y_2 + y_3 + 2y_4 == -3   :z_2   
        y_1 >= 0                        :z_3        
        y_2 >= 0                        :z_4
        y_3 <= 0                        :z_5
        y_4 <= 0                        :z_6

Now note that if we dualize the dual problem it will have 6 variables, if I did not make any mistakes it should be

    dual of the dual
        min 4z_3 + 3z_4 - 1
    s.a.
        2z_3 + z_4 + z_5 == -3.0  
       z_3 + 2z_4 + z_6 == -3.0
        z_1 + z_3 == 0       # I add this to the model, but it doesn't add much to the model
        z_2 + z_4 == 0       # I add this to the model, but it doesn't add much to the model
        z_3 >= 0                        
        z_4 >= 0                        
        z_5 <= 0                        
        z_6 <= 0
        z_1 in Reals        # I don't add this constraint
        z_2 in Reals        # I don't add this constraint

This kind of problem happens because I don't receive the model with the equality and slack variable, so I can't do this primal dual

primal (over x,s):

  min  c'x :          duals
    b - Ax == 0       (y)
    h - Gx == s in K  (z)
dual (over z,y):

  max  -b'y - h'z :      duals
    c + A'y + G'z == 0   (x)
                z in K*  (s)

So the question, it is important to make dualize(dualize(model)) == model to work?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions