Building in this same problem,
What is in the interpretation of the Lagrange multipliers that Jump.jl
spits from the Conic constraints?
For instance, say I run this code
using JuMP, Ipopt, LinearAlgebra, Random, Gurobi, BenchmarkTools, MosekTools, NLopt
const Ι = 250 #This is Greek Letter Iota
const J = 50
const p = 5.0
const k = 0.75
function distmat(J,Ι)
Distances = zeros(J,Ι)
Random.seed!(7777)
coordinates_x = hcat([x for x = 1:J],fill(0.0,J))
coordinates_y = hcat([x for x = 1:Ι].*J/Ι,fill(0.0,Ι))
for j = 1:J, l=1:Ι
Distances[j,l] = sqrt((coordinates_x[j,1]-coordinates_y[l,1])^2+(coordinates_x[j,2]-coordinates_y[l,2])^2)
end
return 1 .+ .1*Distances
end
const t = distmat(J,Ι)
function solution_numerical_Mosek(p,k,t)
opt = Model(Mosek.Optimizer)
#set_silent(opt)
@variable(opt, x[1:J,1:Ι] >= 0)
@variable(opt, Q[1:J] >= 0)
@variable(opt, Y[1:Ι] >= 0)
@variable(opt, u[1:J] >= 0)
@variable(opt, v[1:Ι] >= 0)
@objective(
opt,
Min,
-sum(u) + sum(v)
)
@constraint(
opt,
[j = 1:J],
sum(x[j,:])==Q[j],
)
@constraint(
opt,
[i = 1:Ι],
sum(t[:,i].*x[:,i])==Y[i],
)
@constraint(
opt,
[j = 1:J],
[Q[j], 1.0, u[j]] in MOI.PowerCone((p-1)/p)
)
@constraint(
opt,
cons[i = 1:Ι],
[v[i], 1.0, Y[i]] in MOI.PowerCone(k)
)
JuMP.optimize!(opt)
return objective_value(opt), value.(x), value.(u), value.(v), value.(Q), value.(Y), dual.(cons)
end
sol_Mosek = @time solution_numerical_Mosek(p,k,t)
sol_Mosek[7]
Looking at the output, for the last array that the function produces, which are the duals for the last constraint. I get:
250-element Vector{Vector{Float64}}:
[0.9999999851948024, 0.26745049727837067, -0.5742708009654043]
[0.9999999855626119, 0.2737730991899862, -0.5851060990300552]
[0.9999999859286929, 0.2803699276341491, -0.5963581393283741]
[0.9999999862930139, 0.2872585002963847, -0.6080514361094072]
[0.9999999866555548, 0.294457827370603, -0.6202124647621234]
[0.9999999862930065, 0.2872585002868521, -0.6080514361094109]
⋮
[0.9999999875163498, 0.3130998007092086, -0.6514307285877697]
[0.9999999871825755, 0.3055915575179915, -0.638903238124342]
[0.9999999875105084, 0.31295508254897175, -0.6511898386528795]
[0.9999999878368773, 0.32064425895101034, -0.663958266795144]
[0.9999999881616518, 0.32868030617677824, -0.6772374320635317]
Say that we take the second element in the first row? What does this mean? Is this the change in the objective function coming from of changing the 1.0 in that conic constraint infinitesimally?
I am checking the Mosek documentation here 8 Duality in conic optimization — MOSEK Modeling Cookbook 3.3.0 , and I understand how the dual cone is defined. However, I do not understand to what corresponds the value that Julia is giving me and what is the interpretation?