-
Notifications
You must be signed in to change notification settings - Fork 24
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
MATLAB interface documentation inconsistency #124
Comments
Thanks for reporting this inconsistency. I guess this happened when porting from Nomad 3.9 to Nomad 4. |
If we come to some agreement about the interpretation of exit states I can implement the feature for the Python interface first and make a pull request with the changes. Sounds like fun to me. |
Ideally, for consistency, the exist status should be returned by a MainStep function (like NOMAD::MainStep::getExitStatus, to be implemented) determined from the _stopReasons attribute. Maybe Nomad tools should return an exist status with the same logic as linux command. Zero (0) as a success (feasible optimal solution, that is min mesh size reached OR target reached). 1-255 are for failures. I need to do a little bit of thinking about that. |
I would advise against this. The MATLAB convention is that 1 is successful, other positive integers are "success with caveats" and negative exit flags represent failure. You may confuse a bunch of users with the approach you outlined. |
I wanted to write a similar comment, that it is generally better to herald success with values such that The bindings for MATLAB or Python could realistically return a |
Based on the previous comments, I have made some changes in PR #125. Run flags: |
The documentation for the MATLAB interface diverges from the actual implementation.
nomadOpt
returns[ x, fval, exitflag, iter, nfval ]
, however, the actual implementation returns[ x, fval, hinf, exitflag, nfval ]
. The example reflects the actual implementation.exitflag
do not follow the documented scheme. Instead of the declared spectrum of return values, only two values are returned and their meaning differs from the documentation. The value0
represents generic success, whereas-1
indicates no feasible result was found.I believe it may be possible to modify nomadmex.cpp to approach the documented behavior. The following pseudo-code might do that.
REMARKS
The text was updated successfully, but these errors were encountered: