Some values in optimal solution are still violating the constraint limits in Matlab FMINCON

2 views (last 30 days)
I am using fmincon function of Matlab for motion optimization of 6 dof robotic arm. The constraints that I consider, are the set of nonlinear constraint/equations. The objective and set of constrains are written below.
objective = @(h) h(1)+h(2)+h(3)+h(4)+h(5)+h(6)+h(7)+h(8)+h(9);
subjected to following constraints;
1 Ve(i)=[(w(i+1)/2)*h(i)+(q(i+1)-q(i))/h(i)+((w(i)-w(i+1))h(i))/6] =<400
2 Jerk(i)= [(w(i+1)-w(i))/h(i)]=<240
3 A(i)= [(w(i)/(h(i)))(t(i+1)-tx) + (w(i+1)/(h(i))) * (tx-t(i))] =<250
I have obtained results of objective functions which are; h(i) (1.7372,11.5479,1.9821,0.8572,0.2308,3.1043,2.3440,2.2312,2.0215)
However after plotting, I have seen that some points are still violating the limits. For example no constraints are satisfied at the value of (11.5479). In addition following message also appears
Solver stopped prematurely. fmincon stopped because it exceeded the function evaluation limit, options.MaxFunctionEvaluations = 3000 (the default value).
May I know the reason to not getting the optimal value on some points such as in case of (11.54) .Thanking you in anticipation.

Answers (1)

Abdolkarim Mohammadi
Abdolkarim Mohammadi on 3 Sep 2021
Try setting the MaxIterations in options to a higher number.

Community Treasure Hunt

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

Start Hunting!