Skip to content

Commit

Permalink
fixed #12
Browse files Browse the repository at this point in the history
  • Loading branch information
kibaekkim committed May 12, 2023
1 parent dbabdf7 commit 7664db9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/algorithms/sqp_trust_region.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mutable struct SqpTR{T,TD,TI} <: AbstractSqpTrOptimizer
sqp.μ = 1.0e+4
sqp.Δ = 10.0
sqp.Δ_min = 1.0e-4
sqp.Δ_max = 1.0e+4
sqp.Δ_max = 1.0e+8
sqp.step_acceptance = true

sqp.prim_infeas = Inf
Expand Down Expand Up @@ -145,7 +145,12 @@ function run!(sqp::AbstractSqpTrOptimizer)

if sqp.sub_status [MOI.OPTIMAL, MOI.ALMOST_OPTIMAL, MOI.ALMOST_LOCALLY_SOLVED, MOI.LOCALLY_SOLVED]
# do nothing
elseif sqp.sub_status [MOI.INFEASIBLE, MOI.LOCALLY_INFEASIBLE, MOI.DUAL_INFEASIBLE, MOI.NORM_LIMIT, MOI.OBJECTIVE_LIMIT]
if sqp.Δ == sqp.Δ_max && isapprox(norm(sqp.p, Inf), sqp.Δ)
@info "Problem is possibly unbounded."
sqp.ret = 4
break
end
elseif sqp.sub_status [MOI.INFEASIBLE, MOI.LOCALLY_INFEASIBLE]
if sqp.feasibility_restoration == true
@info "Failed to find a feasible direction"
if sqp.prim_infeas <= sqp.options.tol_infeas
Expand Down

0 comments on commit 7664db9

Please sign in to comment.