-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plot not working #119
Comments
I would guess that you do something wrong in your package, how is this method defined? is it using RecipesBase.jl or directly overloading plot(ci::ControlInterface)
@ KitePredictiveControl ~/Code/KitePredictiveControl.jl/src/KitePredictiveControl.jl:209 |
It could very well be that I am doing something wrong in my package. But changing the package ERROR: LoadError: MethodError: no method matching plot(::ModelPredictiveControl.SimResult{Float64, ModelPredictiveControl.LinMPC{…}}; plotx::Bool, ploty::Bool, plotu::Bool, plotxwithx̂::Bool)
Closest candidates are:
plot(::Nothing, ::ModelPredictiveControl.SimResult{<:Real, <:ModelPredictiveControl.PredictiveController}) got unsupported keyword arguments "plotx", "ploty", "plotu", "plotxwithx̂"
@ ModelPredictiveControl ~/.julia/packages/ModelPredictiveControl/0rhFm/src/plot_sim.jl:325
plot(::Nothing, ::ModelPredictiveControl.SimResult{<:Real, <:ModelPredictiveControl.StateEstimator}) got unsupported keyword arguments "plotx", "ploty", "plotu", "plotxwithx̂"
@ ModelPredictiveControl ~/.julia/packages/ModelPredictiveControl/0rhFm/src/plot_sim.jl:324
plot(::Nothing, ::ModelPredictiveControl.SimResult{<:Real, <:ModelPredictiveControl.SimModel}) got unsupported keyword arguments "plotx", "ploty", "plotu", "plotxwithx̂"
@ ModelPredictiveControl ~/.julia/packages/ModelPredictiveControl/0rhFm/src/plot_sim.jl:323
Stacktrace:
[1] controlplot(ci::ControlInterface)
@ KitePredictiveControl ~/Code/KitePredictiveControl.jl/src/KitePredictiveControl.jl:210
[2] top-level scope
@ ~/Code/KitePredictiveControl.jl/examples/simple.jl:16
[3] include(fname::String)
@ Base.MainInclude ./client.jl:489
[4] top-level scope
@ REPL[1]:1
in expression starting at /home/bart/Code/KitePredictiveControl.jl/examples/simple.jl:12
Some type information was truncated. Use `show(err)` to see complete types. The method is defined in function controlplot(ci::ControlInterface)
res = SimResult(ci.mpc, ci.U_data, ci.Y_data; ci.Ry_data, ci.X̂_data, ci.X_data)
# return ModelPredictiveControl.plot(res; plotx=true, ploty=ci.output_idxs, plotu=true, plotxwithx̂=ci.observed_idxs)
return ModelPredictiveControl.plot(res; plotx=true, ploty=true, plotu=true, plotxwithx̂=true)
end |
It looks like this is the culprit ModelPredictiveControl.jl/src/plot_sim.jl Line 323 in 3833301
As a fix for you, I would try calling |
Thanks, that solved the issue. Maybe this should be documented to avoid future confusions? |
see PR linekd above |
Wow, that was fast 🚀 |
I am using MPC.jl in a module. When running
ModelPredictiveControl.plot(res; plotx=true, ploty=true, plotu=true, plotxwithx̂=true)
I get the error:I don't know what could cause this. It worked before, but after some code reformatting, it stopped working.
The text was updated successfully, but these errors were encountered: