Controlling stepsize of fmincon
80 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi
Im am trying to shape optimize a heating surface using MATLAB fmincon and a CFD software. My problem is that the computational costs of a function evaluation (ie a CFD analysis) is very high and thus I want to make a rater rough search of my solution space.
When I iniate fmincon it seems that some ver small steps (in the order of 10^-5 of a mm) are done in order to determine a search direction. This is a waste of function evalutaion since this does not changes the results at all.
My question: Is their any way to avoid these useless function evalution and start out by making large steps?
1 Commento
Matt J
il 27 Nov 2018
Modificato: Matt J
il 27 Nov 2018
If you know that the small steps are done in order to determine a search direction, then why would you consider them useless or wasteful? Isn't determining a search direction important? How can the algorithm make any progress without knowing in which direction to step? Rather than saying that they are "useless", I think what you really mean to say is that they are "costly".
Risposte (3)
Richard Alcock
il 6 Mag 2011
Take a look at the documentation for fmincon: http://www.mathworks.com/help/toolbox/optim/ug/fmincon.html#f854721 and the options available for the optimization functions: http://www.mathworks.com/help/toolbox/optim/ug/f19175.html
Reading those, I think you want to set the DiffMinChange option to something larger than it's default.
DiffMinChange Minimum change in variables for finite-difference gradients (a positive scalar). The default is 0
2 Commenti
Sean de Wolski
il 9 Gen 2013
@Pablo, all though it does not define a minimum step size it does encourage fmincon() to look further away where the gradient might be steeper. This will cause it to take bigger steps.
Radomir
il 9 Mag 2017
Hello,
I understand that this topic is no longer up to date, but I believe that it could still help to somebody.
Solving similar problem (also CFD software ivolved) I used FiniteDifferenceStepSize as an optimset parametr to avoid small parameters increase.
Radomir
8 Commenti
Matt J
il 27 Nov 2018
What I meant is that I do not have an analytical expression of F
That does make things more difficult. But what I really was trying to understand is if you know the algorithm used to compute F. Could you write your own version of it if you had to? If for example, F is not computed by an explicit formula, but instead your external software somehow obtains F as the solution of an implicit equation,
phi(x,F)=0
Matt J
il 27 Nov 2018
Modificato: Matt J
il 27 Nov 2018
My question: Is their any way to avoid these useless function evalution and start out by making large steps?
The additional function evaluations are caused by finite difference calculations that fmincon (and other Optimization Toolbox solvers) use to compute derivatives of the objective and constraints, which in turn are used to compute search directions. You can avoid finite differencing, and often save computation, by providing analytic gradient calculations and/or analytic Hessian calculations for algorithms that use them.
However, if you must rely on the default finite difference calculations, then it is usually a bad idea to increase the differencing stepsize in the hope of taking larger steps. The finite differencing controls the direction of search in each iteration, not the distance moved. Typically, reducing the step size will just degrade the finite difference approximation, causing fmincon to choose an inferior search direction. A non-accurate gradient calculation would also prevent fmincon from recognizing when a point of zero-gradient has been reached, and that it is time to stop iterating.
0 Commenti
Vedere anche
Categorie
Scopri di più su Computational Fluid Dynamics (CFD) in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!