\begin{algorithm}
\caption {Trace d'éxécution de l'algorithme PQS}
\begin{algorithmic}
- \REQUIRE $g(x_0,y_0,z_0)\leq 0$, $(x_0,y_0,z_0) = (10, 10 ,10)$
+ \REQUIRE $(x_0,y_0,z_0) = (100, 100 ,0), g(x_0,y_0,z_0) \leq 0$
\ENSURE $\displaystyle\min_{(x,y,z) \in \mathbb{R}^3} J(x,y,z) = x^2 + y^2 + z^2 -r^2$ and \newline $g(x,y,z) = (g_1(x,y,z), g_2(x,y,z)) = (x^2 + y^2 - r_1^2, x^2 + z^2 -r_2^2) \leq 0 $
\STATE \textbf{Data :}
\STATE $k \leftarrow 0, (x_k, y_k, z_k) \leftarrow (100, 100, 0), r \leftarrow 100$
0 & 0 & 0.5 \\
\end{pmatrix} $
\newline
- \STATE {//Calcul des deux composantes du gradient de $ g $:}
+ \STATE {//Pré-calcul des deux composantes du gradient de $ g $:}
\STATE $ \nabla g_1(x_k,y_k,z_k) = ((2x_k,2y_k,0)$ \hfill $ //résultat : (20, 20, 0)$
\STATE $ \nabla g_2(x_k,y_k,z_k) = (2x_k,0,2z_k))$ \hfill $ //résultat : (20, 0, 20)$
\STATE $ \nabla g(x_k,y_k,z_k) = (\nabla g_1(x_k,y_k,z_k), \nabla g_2(x_k,y_k,z_k))$