I read somewhere that I should not use min() and max() in the objective function of fmincon (I am not sure if it can be used in the objective function of ga either) because they may result in discontinuities in the solution vector.
However, is it possible to use them in the nonlinear inequality constraits of an optimization problem?
For example, after computing my trajectory along y, z and the trajectory of my roll angle phi, I have the following inequality constraints:
(Please note that z1, z2 and z3 are the different parts of the full trajectory along . And phid represents which is the trajectory of the angular velocity).
c = [ max(z1)-z1_max;
Do the inequality constraints seem correct to you?
Is there a way to check each element of each vector to see if the constraint is satisfied? (I am not sure if this is necessary since I am using lower and upper bounds on 4 waypoints for z along the trajectory and 2 waypoints for phi along the trajectory and at the end of the trajectory, phi=2*pi)
I am asking because I cannot find a feasible solution with both fmincon and ga.