Skip to content

Commit

Permalink
lpqp solvers don't always get starting points
Browse files Browse the repository at this point in the history
  • Loading branch information
mlubin committed Aug 26, 2016
1 parent cb330ce commit 90354e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/nonlinear_algorithm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ function MathProgBase.optimize!(m::PajaritoNonlinearModel)

m.nlp_load_timer = 0.0

# if we haven't gotten a starting point,
# (e.g., if acting as MIQP solver) assume zero is okay)
if any(isnan,m.solution)
m.solution = zeros(length(m.solution))
end

populatelinearmatrix(m)
# solve it
# MathProgBase.optimize!(nlp_model)
Expand Down Expand Up @@ -482,6 +488,7 @@ function MathProgBase.optimize!(m::PajaritoNonlinearModel)

# pass in starting point
#MathProgBase.setwarmstart!(nlp_model, m.solution)
@show m.solution[1:m.numVar]
MathProgBase.setwarmstart!(ini_nlp_model, m.solution[1:m.numVar])

start_nlp = time()
Expand Down

0 comments on commit 90354e1

Please sign in to comment.