Skip to content

Commit 36618eb

Browse files
committed
comment out warm start exception handling
1 parent e341934 commit 36618eb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/predictive_control.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -526,17 +526,17 @@ function optim_objective!(mpc::PredictiveController)
526526
!isinf(mpc.C) && (ΔŨ0 = [ΔŨ0; lastΔŨ[end]])
527527
set_start_value.(ΔŨvar, ΔŨ0)
528528
set_objective!(mpc, ΔŨvar)
529-
try
529+
#try
530530
optimize!(optim)
531-
catch err
532-
if isa(err, MOI.UnsupportedAttribute{MOI.VariablePrimalStart})
533-
# reset_optimizer to unset warm-start, set_start_value.(nothing) seems buggy
534-
MOIU.reset_optimizer(optim)
535-
optimize!(optim)
536-
else
537-
rethrow(err)
538-
end
539-
end
531+
#catch err
532+
# if isa(err, MOI.UnsupportedAttribute{MOI.VariablePrimalStart})
533+
# # reset_optimizer to unset warm-start, set_start_value.(nothing) seems buggy
534+
# MOIU.reset_optimizer(optim)
535+
# optimize!(optim)
536+
# else
537+
# rethrow(err)
538+
# end
539+
#end
540540
status = termination_status(optim)
541541
if !(status == OPTIMAL || status == LOCALLY_SOLVED)
542542
@warn "MPC termination status not OPTIMAL or LOCALLY_SOLVED ($status)"

0 commit comments

Comments
 (0)