-
Notifications
You must be signed in to change notification settings - Fork 13
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
Return dataframe from getSolutions #101
Comments
These API was designed based on the proposal from bernt lie see https://ep.liu.se/ecp/157/072/ecp19157072.pdf, And offcourse in OpenModelica scripting API,
Sure we can convert them, but I hope you can also convert it manually, this was done basically to make the plotting easy in the plot library from julia |
I guess we could convert it to a data frame afterwards. But of course users can do it manually as well. |
As you see in the paper returning the results in |
Also i am currently working on julia wrapper functions for OpenModelica Scripting API, where we can have most of the settings available, I am trying to write some automation script which generates the |
I don't think it matters too much if you are using a DataFrames only offer an improved handling, so you don't need to search for the index of variable time, h = tnk.getSolutions(["time","h"])
plot(time, h) and df = tnk.getSolutions(["h", "x", "y"])
plot(Matrix(df)) # Plot everything
plot(df[!,"time"], df[!,"h"]) # plot (t,h) But yeah, I don't need this right now, so I could close this issue or we leave it open. |
The
getSolutions
function behaves very different when setting inputname=nothing
. It's not returning solutions but a list of all variables in the result file.I would expect to get the solution of all variables in that case.
The output format for
getSolutions(mod, ["time","a"])
isVector{Vector{Float64}}
. Why not a data frame?And I would expect to always get time in the data frame. Otherwise the solution of only
a
is useless.The text was updated successfully, but these errors were encountered: