How to Prioritize Constraints of an optimization problem?

352 Views Asked by At

I have an optimal control problem of a vehicle the form: $$ \min_{u \in R} \ell (x(j),u(j)) = {\Vert x(j)- x_r(j)\Vert}_Q + {\Vert u(j)- u_r(j)\Vert}_R $$ subject to $$\dot{x}=f(x)$$ $$g(x)>b$$ $$-a \leq u \leq a$$ where $x$ is the states vector and $u$ is a scalar represents the control moment responsible for turning right or left. $g(x)>b$ is the constraint responsible for collision avoidance.$x_r$ and $u_r$ are the reference states and control variable respectively.

I know that the optimum solution can be achieved either by positive or negative values of the control variable $u$ due to the problem symmetry, but the solver gives me random behaviors as it sometimes get the optimum solution using positive value of $u$ and sometimes using negative values. I mean that when the vehicle found an object on it's path, it can turn right or left but i need it to give priority to turning right.

How can i force the solver to give priority to the use the positive values of $u$, and make the negative values the last available option.