Skip to content

Commit 89b468e

Browse files
committed
remove useless statues
1 parent e774a84 commit 89b468e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/predictive_control.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,10 @@ function optim_objective!(mpc::LinMPC, b, q̃, p)
576576
ϵ = isinf(mpc.C) ? nothing : ΔŨ[end]
577577
J = objective_value(mpc.optim.model) + p # optimal objective value by adding constant p
578578
status = termination_status(mpc.optim.model)
579-
if status OPTIMAL && status LOCALLY_SOLVED
580-
@warn "MPC termination status not optimal ($status)"
581-
end
579+
status OPTIMAL && @warn "MPC termination status not optimal ($status)"
582580
# if error, we take last value :
583-
if any(status .== [INFEASIBLE, DUAL_INFEASIBLE, LOCALLY_INFEASIBLE, SLOW_PROGRESS,
584-
NUMERICAL_ERROR, INVALID_MODEL, INVALID_OPTION, INTERRUPTED,
585-
OTHER_ERROR])
581+
if any(status .== [INFEASIBLE, DUAL_INFEASIBLE, SLOW_PROGRESS, INVALID_MODEL,
582+
INVALID_OPTION, INTERRUPTED, OTHER_ERROR])
586583
ΔŨ = ΔŨ0
587584
end
588585
return ΔŨ, ϵ, J

0 commit comments

Comments
 (0)