fmincon and Parallel Computing
30 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a program that uses fmincon to optimize an objective function. The problem uses linear and nonlinear equality constraints, and nonlinear inequality constraints. I provide the gradients for both the objective function and nonlinear constrain function. I am using the 'sqp' algorithm so no Hessian is provided.
I have fmincon running inside a for-loop, so while each instance of fmincon might be fast, running it thousands of times in this for-loop can take several minutes (or longer!). This for-loop must proceed in sequential order. For example, the results of a loop are used in the following loop, and so on.
My question is, will parallel computing improve the speed of each optimization? If so, is it as simple as setting 'UseParallel' to 'always'? Or do I need to make other changes throughout the objective and constraint functions to accommodate parallel computing?
Thank you.
0 个评论
采纳的回答
Alan Weiss
2015-12-17
The automatic parallel computing in fmincon will not help, because you are providing function gradients, and that is all the parallel computing attempts to do. See Parallel Optimization Functionality.
Alan Weiss
MATLAB mathematical toolbox documentation
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!