Skip to content

Commit 22cc35a

Browse files
committed
changed: suggesting show_limited=false in debug message
1 parent 0739151 commit 22cc35a

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

src/controller/execute.jl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,13 +519,22 @@ function optim_objective!(mpc::PredictiveController{NT}) where {NT<:Real}
519519
if !issolved(optim)
520520
status = JuMP.termination_status(optim)
521521
if iserror(optim)
522-
@error("MPC terminated without solution: returning last solution shifted",
523-
status)
522+
@error(
523+
"MPC terminated without solution: estimation in open-loop "*
524+
"(more info in debug log)",
525+
status
526+
)
524527
else
525-
@warn("MPC termination status not OPTIMAL or LOCALLY_SOLVED: keeping "*
526-
"solution anyway", status)
528+
@warn(
529+
"MPC termination status not OPTIMAL or LOCALLY_SOLVED: keeping solution "*
530+
"anyway (more info in debug log)",
531+
status
532+
)
527533
end
528-
@debug("The function getinfo returns: ", getinfo(mpc))
534+
@debug(
535+
"calling getinfo (use logger with show_limited=false if values are truncated)",
536+
getinfo(estim)
537+
)
529538
end
530539
if iserror(optim)
531540
mpc.ΔŨ .= ΔŨ0

src/estimator/mhe/execute.jl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,22 @@ function optim_objective!(estim::MovingHorizonEstimator{NT}) where NT<:Real
406406
if !issolved(optim)
407407
status = JuMP.termination_status(optim)
408408
if iserror(optim)
409-
@error("MHE terminated without solution: estimation in open-loop",
410-
status)
409+
@error(
410+
"MHE terminated without solution: estimation in open-loop "*
411+
"(more info in debug log)",
412+
status
413+
)
411414
else
412-
@warn("MHE termination status not OPTIMAL or LOCALLY_SOLVED: keeping "*
413-
"solution anyway", status)
415+
@warn(
416+
"MHE termination status not OPTIMAL or LOCALLY_SOLVED: keeping solution "*
417+
"anyway (more info in debug log)",
418+
status
419+
)
414420
end
415-
@debug("The function getinfo returns: ", getinfo(estim))
421+
@debug(
422+
"calling getinfo (use logger with show_limited=false if values are truncated)",
423+
getinfo(estim)
424+
)
416425
end
417426
if iserror(optim)
418427
estim.Z̃ .= Z̃_0

0 commit comments

Comments
 (0)