Skip to content

Commit 9a0afe6

Browse files
committed
Annot more
1 parent 3880018 commit 9a0afe6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/RegisterOptimize.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function optimize_rigid(fixed, moving, A::AffineMap, maxshift,
101101

102102
stat = MathProgBase.status(m)
103103
p = MathProgBase.getsolution(m)
104-
stat == :Optimal || (@warn("Solution was not optimal"); @show p)
104+
stat == :Optimal || (@warn("Solution was not optimal 1"); @show p)
105105
fval = MathProgBase.getobjval(m)
106106

107107
p2rigid(p, SD), fval
@@ -475,8 +475,9 @@ function find_opt(P::AffineQHessian{AP,M,N,Φ}, b, maxshift, x0) where {AP,M,N,
475475
MathProgBase.setwarmstart!(m, x0)
476476
MathProgBase.optimize!(m)
477477
stat = MathProgBase.status(m)
478-
stat == :Optimal || @warn("Solution was not optimal")
479-
MathProgBase.getsolution(m)
478+
p = MathProgBase.getsolution(m)
479+
stat == :Optimal || (@warn("Solution was not optimal 2"); @show p)
480+
return p
480481
end
481482

482483
# We omit the constant term ∑_i cs[i]'*Qs[i]*cs[i], since it won't
@@ -608,8 +609,8 @@ function _optimize!(objective, ϕ, dp, mmis, tol, print_level; kwargs...)
608609
MathProgBase.optimize!(m)
609610

610611
stat = MathProgBase.status(m)
611-
stat == :Optimal || @warn("Solution was not optimal")
612612
uopt = MathProgBase.getsolution(m)
613+
stat == :Optimal || (@warn("Solution was not optimal 3"); @show uopt)
613614
fval = MathProgBase.getobjval(m)
614615
_copy!(ϕ, uopt)
615616
ϕ, fval, fval0
@@ -1164,8 +1165,8 @@ function fit_sigmoid(data, bottom, top, center, width)
11641165
MathProgBase.optimize!(m)
11651166

11661167
stat = MathProgBase.status(m)
1167-
stat == :Optimal || @warn("Solution was not optimal")
11681168
x = MathProgBase.getsolution(m)
1169+
stat == :Optimal || (@warn("Solution was not optimal 4"); @show x)
11691170

11701171
x[1], x[2], x[3], x[4], MathProgBase.getobjval(m)
11711172
end

0 commit comments

Comments
 (0)