-
Notifications
You must be signed in to change notification settings - Fork 604
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
Question: Returning NaNs to the optimizer #279
Comments
I dont think most solvers will like being fed nans. |
I certainly don't think so either, which is why I was asking if there is an easier way. For now I'm working around it by using the augmented Lagrangian algorithm, and essentially using the successful evaluation of the objective function as an equality constraint. A bit of a weird workaround, but it's mostly working for now. |
I have the same question. It would be very useful if the objective function could throw an exception or return a value indicating that the current x is infeasible or the objective function can't be evaluated at x for unspecified reasons. I don't want the optimization to stop. |
I am facing the same problem. Currently, I just do |
The ORIG_DIRECT algorithm actually lets you return NaN to indicate infeasible points: https://github.com/stevengj/nlopt/blob/master/src/algs/direct/README |
Currently I'm working on optimizing a very sensitive problem, and especially for global optimization algorithms, there are some inputs that the objective function isn't able to evaluate. All of the optimization variables are within the bound constraints, but for some specific combinations, it's too numerical difficult to evaluate.
Is there a way to return something to the optimizer to tell it to ignore that result? For example, I like the idea of something as simple as returning NaNs or something along those lines.
The text was updated successfully, but these errors were encountered: