Skip to content

Commit 8eaae42

Browse files
committed
removed TODO comment and set problem.obj_val to Inf
1 parent 4eee86a commit 8eaae42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/NLPModelsIpopt.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function SolverCore.reset!(solver::IpoptSolver, nlp::AbstractNLPModel)
9393
@assert nlp.meta.nvar == problem.n
9494
@assert nlp.meta.ncon == problem.m
9595

96-
problem.obj_val = 0.0
96+
problem.obj_val = Inf
9797
problem.status = 0
9898
problem.x .= nlp.meta.x0
9999
eval_f, eval_g, eval_grad_f, eval_jac_g, eval_h = set_callbacks(nlp)
@@ -116,7 +116,6 @@ function SolverCore.reset!(solver::IpoptSolver)
116116
problem.status = -1 # Use -1 to indicate not solved yet
117117
problem.intermediate = nothing
118118

119-
# TODO: reset problem.ipopt_problem
120119
return solver
121120
end
122121

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ end
119119
end
120120

121121
@testset "Test restart with a different initial guess" begin
122+
f(x) = (x[1] - 1)^2 + 4 * (x[2] - x[1]^2)^2
122123
nlp = ADNLPModel(f, [-1.2; 1.0])
123124
stats = GenericExecutionStats(nlp)
124125
solver = IpoptSolver(nlp)

0 commit comments

Comments
 (0)