Replies: 1 comment
-
We do not offer advice on tuning optimizer options, or whether one particular optimizer performs better than another. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to know why the same code, with two different optimizers, can end up so different. Ipopt works much better than snopt. Snopt also displays a message that says "current point can not be improved." Because snopt is faster than ipopt, but I can't accept the current gap. I would like to know how to adjust the Settings to make the result of snopt close to ipopt. I have tried to change the step size Here are their Settings:
if args.opt == "snopt":
optOptions = {
"Major feasibility tolerance": 1.0e-6,
"Major optimality tolerance": 1.0e-3,
"Minor feasibility tolerance": 1.0e-6,
"Linesearch tolerance": 0.2,
"Verify level": -1,
"Function precision": 1.0e-6,
"Major iterations limit": 50,
"Nonderivative linesearch": None,
"Print file": "opt_SNOPT_print.txt",
"Summary file": "opt_SNOPT_summary.txt",
}
elif args.opt == "ipopt":
optOptions = {
"tol": 1.0e-3,
"constr_viol_tol": 1.0e-6,
"max_iter": 50,
"print_level": 5,
"output_file": "opt_IPOPT.txt",
"mu_strategy": "adaptive",
"limited_memory_max_history": 10,
"nlp_scaling_method": "none",
"alpha_for_y": "full",
"recalc_y": "yes",
}
and the results:
Optimizer CL CD
IPOPT 1.02196018 0.25999976
SNOPT 0.89553852 0.24726162
objective: max CL
subject to: CD<=0.26
Beta Was this translation helpful? Give feedback.
All reactions