How to get the status of optimization of Julia Ipopt as an output?


I am running MPC with Julia Ipopt+JuMP in ROS. I want to get the output of the MPC along with the status of optimization. Sometimes the MPC is infeasible, my value gets stuck in the previous output and hence this will help me create a Boolean loop.


this documentation is very good



Thanks for the reply. I am trying to do string compare and have numeric outputs for different status like 1 for infeasible but I am getting errors.

status = solve(mdl)
if ismatch(status,“Infeasible”)
status = 1
println(“Veh cannot move”)

I am getting the following error:
ERROR: LoadError: MethodError: ismatch has no method matching ismatch(::Symbol, ::ASCIIString)
Closest candidates are:
ismatch(!Matched::Regex, ::AbstractString)
ismatch(!Matched::Regex, ::AbstractString, !Matched::Integer)


Why does the following code fail?

ismatch(:a, "a")



if( status == :Infeasible )



Yes it worked thanks