-
Notifications
You must be signed in to change notification settings - Fork 15
More user-friendly Julia interfaces #396
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
Comments
I think this is a great idea, I'm all for more user-friendliness and it doesn't get more user friendly than automatic initialisation and termination, especially as this is increasingly what users expect from higher-level language interfaces. |
I can see the sense, but also the downsides (implementing it being a major one, as all the docs would need to be carefully rewritten). As it stands, the control and inform structures are passed as needed, while your approach is to bundle them all together. I presume a user would need to The status variable is only used as inform.status is not always present. And, there would be no need for the trb_information call, as workspace.inform would be there. I will leave this decision to you Juliates, but I will also pass responsibility for implementing and documenting it, I've done enough on the Julia docs side, rst is really painful :) |
rst??? That's so 2000. What's wrong with Markdown? I think it's a good idea overall, though a proper NLPModels interface will also define solvers so they return stats objects. Regarding verbosity, it would be trivial to define getters of the form |
2000, that's the nicest thing anyone has said to me all day :) I'll be happy for someone to embrace the 2020s and translate the lot! Setters and getters sound good. How about all those multi-nested controls we are so proud of, the control.tru_control.sbls_control.sls_countrol.out, is that a set, set, set, set ... |
Uh oh!
There was an error while loading. Please reload this page.
For each package of
GALAHAD
, we need three variablesdata
,control
,inform
.We should regroup them in a structure
workspace
only defined it in the Julia interfaceGALAHAD.jl
.It will reduce by a lot the number of parameters when we call the low-level Julia wrappers.
We could also add a field
status
toTrbWorkspace
.trb_initialize
could be automatically called when creating the structure withTrbWorkspace{T, INT}()
.Furthermore, since we combine all arguments needed by
trb_terminate
, we could set it as the finalizer for the structure so that when the GC removes the object, it gets terminated automatically.This would free the user from having to call
trb_terminate
manually.It is not an interface with
NLPModels.jl
, but it could already be more user-friendly.I just need to update my script to generate the Julia wrappers (https://github.com/ralna/GALAHAD/blob/master/GALAHAD.jl/gen/rewriter.jl), which should take less than one hour of work.
What do you think, @dpo, @nimgould, and @jfowkes?
The text was updated successfully, but these errors were encountered: