1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-19 07:20:28 +01:00

build JuMP.Model first

This commit is contained in:
kalmarek 2017-12-01 17:04:53 +01:00
parent 56adccdfd1
commit bbcaec5bae

View File

@ -164,8 +164,12 @@ end
function compute_λandP(m, varλ, varP; warmstart=nothing) function compute_λandP(m, varλ, varP; warmstart=nothing)
λ = 0.0 λ = 0.0
P = nothing P = nothing
traits = JuMP.ProblemTraits(m, relaxation=false)
while λ == 0.0 while λ == 0.0
try try
JuMP.build(m, traits=traits)
if warmstart != nothing if warmstart != nothing
p_sol, d_sol, s = warmstart p_sol, d_sol, s = warmstart
MathProgBase.SolverInterface.setwarmstart!(m.internalModel, p_sol; dual_sol = d_sol, slack=s); MathProgBase.SolverInterface.setwarmstart!(m.internalModel, p_sol; dual_sol = d_sol, slack=s);