Attempting to Warm start causes errors

I am trying to warm start my problem using a sparse matrix. The following code produces an error:

model = Model(Mosek.Optimizer)
@variable(model, Z[1:size(cost)[1],1:size(cost)[2]], PSD)
 set_start_value(Z, warm_start_value)

ERROR: MethodError: no method matching set_start_value(::Symmetric{VariableRef, Matrix{VariableRef}}, ::SparseMatrixCSC{Float64, Int64})

Attempting to broadcast results in (so adding a . between set_start_value and the (` ).

ERROR: MethodError: no method matching set_primal_start(::Mosek.Task, ::MosekTools.MatrixIndex, ::Float64)

attempting

set_start_values(model, variable_primal_start = warm_start_value)

results in

ERROR: TypeError: in keyword argument variable_primal_start, expected Union{Nothing, Function}, got a value of type SparseMatrixCSC{Float64, Int64}

So I think the last one is what I would like to do. What function would I write?

1 Like

I have done some more digging, and I have found this piece of documentation that suggests I cannot do this at all.

Currently, the interior-point optimizer in MOSEK cannot take advantage of a previous optimal solution, however, the simplex optimizer can exploit any basic solution.

source: 9.1 Advanced hot-start — MOSEK Optimization Toolbox for MATLAB 10.2.3

I’m keeping this up to see if someone has a workaround or if this is correct (how unfortunate).

1 Like

Yes, the intended syntax for this is set_start_value.(Z, warm_start_value), but Mosek doesn’t support setting the start value of a PSD matrix variable.

For set_start_values(model, variable_primal_start = warm_start_value), variable_primal_start needs to be a function that takes the scalar variable and returns a Float64 start value. But it still won’t work, because Mosek doesn’t support setting the start value of a PSD matrix variable.

1 Like