MATLAB Answers

Need help with mathematical optimization - fmincon

17 views (last 30 days)
Swapnil Sinha
Swapnil Sinha on 1 Jul 2020
Answered: Zaikun Zhang on 14 Jul 2020 at 16:01
I have developed a simulation code that predicts strength value for different designs. It takes in a variable (factors that define the design) and spits an output value. This code requires 4 constants that I need to find. I have few experimental datapoints, and I was hoping to use them to obtain these 4 constants.
I have experimental data for 7 different cases of inputs. I tried to obtain the constants by setting up an error function and running 'fmincon' on it to minimize the error. I did not get any output for 5 days, so I quit the program. I ran the same fmincon function for only one case. This took about 20 hours, but gave me an output. I do not get same constants when I run the code individually for these 7 different cases.
Now, I am looking for a more robust way to obtain these constants.
Each run for my code takes about 15 mins to give me a value
My code is complex and needs to be simplified/optimized, however I am currently focusing my efforrts on finding the best way to find these constants.
This is for a research work, so I would greatly appreciate suggestions/comments on standard ways to do this.

  0 Comments

Sign in to comment.

Answers (2)

Alan Weiss
Alan Weiss on 2 Jul 2020
Your problem sounds natural for the surrogateopt solver in Global Optimization Toolbox. In particular, fmincon is a gradient-based solver, and quite frequently simulations are not as smooth as this solver wants. Also, surrogateopt can use checkpointing which can help you recover from a crash or other issue with an optimization.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

  0 Comments

Sign in to comment.


Zaikun Zhang
Zaikun Zhang on 14 Jul 2020 at 16:01
Your problem is a simulation-based optimization problem.
You may try PDFO ( https://www.mathworks.com/matlabcentral/fileexchange/75195-pdfo-powell-s-derivative-free-optimization-solvers ), which contains solvers particularly designed for simulation-based optimization by late Professor M. J. D. Powell ( https://en.wikipedia.org/wiki/Michael_J._D._Powell ).
See https://www.pdfo.net for more information.

  0 Comments

Sign in to comment.


Translated by