Dear Matlab Users,
Background:
I want to fit a model to my experimental data by using optimizers from Optimization Toolbox (so far I tried fminunc and fmincon). Thus, in the objective function I use a complex Matlab Model (including ODE) to get simulation results for all my experimental data points and then calculate the mean error between experimental and simulation data. The design variables are 5 input parameters to the simulation model. Due to the influence of the "real world" in my experimental data the objective function is non-smooth and not differentiable.
Problem:
The optimization algorithms sooner or later suggest a configuration of the design variables which leads to extremely long calculations within the ODE or a divergence in the simulation model. Even when setting physically reasonable upper and lower bounds for each design variable, some combinations of design variables will always lead to a physically impossible simulation (divergence or endless calculation time).
Is there a way to catch these cases and tell the optimization algorithm to try a new configuration of design variables and re-evaluate the objective function within the iteration? I can't find anything regarding this in the MATLAB help or forum, although this should be a common issue in optimization?
So far I can only use fminsearch optimization, as no big changes in the design variables are being done here.
Love to hear from some experts.
Best regards
Malte