Hi,
In my current optimization problem, both the objective and cosntraint functions are calculated following a time-consuming simulink run. In order to avoid having to run the simulation twice at each iteration (one to compute the objective, one to compute the constraint), I would like to apply the same method as described in https://fr.mathworks.com/help/optim/ug/objective-and-constraints-using-common-function.html.
However, my work only gives access to Matlab 2016b, and the functions used are not available yet : optimvar, fcn2optimexpr.
Is there a way to convert my function "compute_all" (which computes both the objective and the constraint) to an optimization expression, but in Matlab 2016b ?
Thank you for your help,
Thomas
Best Answer