You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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