Skip the optimised parameters result if the objective function fails

Hi
I am using matlab "isqnonlin" and "gamultiobj" (in two different codes) in matlab to optimise six parameters.
My objective function, is a function that calls ABAQUS and run some finite element models (FEMs) and export the result into matlab and matlab should optimised some coficient.
In some cases, matlab uses some coeficient that when the ABAQUS uses them to export the result, the FEM does not converge and it exists unfinished and matlab exports the results and generates the new optimised parametrs based on those unfinished data, which result in inaccurate optimisation.
My question is:
How can I define a condition that, if the condition was true MATLAB would ignore the esimated paramerts and goes to next iteration and estimates new parametrs?
Thanks

 采纳的回答

Most optimization solvers have an OuputFcn option that will let you define your own stopping criteria:

8 个评论

Thanks for your response.
I do not want to stop the loop, I only want to skip the current estimated optimised parameter and predict the next paradameter without considering the current parametr?
In the algorithms of lsqnonlin, the next parameter estimate is always based on the current parameter estimate only. To change the trajectory, you would have to stop the optimization and come up with a strategy for re-initializing it.
Is there any other optimisation technique other than lsqnonlin, that I can use for multivaraible optimisation and solve this issue? Thank
You could just give the objective function a value of inf when the adverse event occurs. ga() will probably take that as a signal to explore other regions of the parameter space. fmincon's sqp algorithm will for sure. I don't know about lsqnonlin.
Thank you for your response.
I guess I should use gradeint-free based algorithms such is genetic algoeirhm as you mentioned, since I have multiobjectibe function, I should use gamultiobj function.
It seems that fmincon is not compatible with multiobjective function.
It seems that fmincon is not compatible with multiobjective function.
If your objectives are smooth, I believe the fgoalattain() or fminimax() could be applied.
It uses the same quadratic programming techniques as fmincon, and therefore might be able to recover from bad search points.
Thanks, I will give it a go.
However, it poses a new challenge to my problem.
I am trying the gt optimum set of coeficinet to yield the displacment error of zero (or close to that).
by selecting differnet set of ceof the error may be negative or positive hence my cost function may become negative or positive.
I cannot get the absolute value, since the physical meaning of being negative and positive is different.
is there anyway to push the optimisation to tailor the cost function value to zero?
Thanks
If it is a "new challenge", I think you should probably post it as a different question, with a more detailed description.
Meanwhile, if you consider this question answered, please do Accept-click it.

请先登录,再进行评论。

更多回答(0 个)

类别

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by