Skip to content
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

COBYLA reports solution out of bounds #183

Closed
I-Fons opened this issue Mar 18, 2022 · 2 comments
Closed

COBYLA reports solution out of bounds #183

I-Fons opened this issue Mar 18, 2022 · 2 comments

Comments

@I-Fons
Copy link

I-Fons commented Mar 18, 2022

Hi!

I am specifying the optimizaton options and calling the optimizer like:

# # OPTIMIZATION SPECIFICATIONS
# Guess values of the manipulated variables to initialize optimization
Q0 = 3. # mL/min or cm^3/min
t_load0 = 1. # min
optVar0 = [Q0 , t_load0]
# Algorithm
opt = StochOptim.Opt(:LN_COBYLA, 2)
grad = [] # Because COBYLA is gradient free
# Bounds 
opt.lower_bounds = [1e-6, 2.] # Lower bounds cannot be 0 because objective function returns NaN at some point
opt.upper_bounds = [5., 100000.]
# Stopping criteria
opt.xtol_rel = 1e-3
(minf_v1,minx_v1,ret_v1) = StochOptim.optimize_stoch_prob_v1(opt, grad , pCol , pLPM , c_in_vec , penalty_factor , optVar0, max_loses , risk)
StochOptim.print_optim_results(minx_v1,ret_v1,opt,c_in_vec, pCol , pLPM)`

But I get a solution that violates the lower bound:
(minf_v1,minx_v1,ret_v1) =(-38.6511199999541, [5.0, 0.5], :XTOL_REACHED)

Am I doing something wrong?

@mzaffalon
Copy link
Contributor

StochOptim is not part of NLopt and some variables definitions (e.g. penalty_factor) are missing: could you please post a minimal workable example?

@odow
Copy link
Member

odow commented Jan 24, 2023

Closing as stale and non-reproducible. Potentially also a duplicate of #166.

Please re-open if you have a reproducible example.

@odow odow closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants