## 4 Opposite Normalized Trust-Region Reflective (ONTRR) Algorithm
### Step 4: Determine the Trial Step \(s\) from Three Directions  
After creating the subspace \(S\), the next thing is to determine the 2-D trust-region solution \(st\). As with the standard TRR search, the proposed ONTRR algorithm employs the 2-D eigenvalue decomposition method to solve the secular Equation (27) and locate a feasible descent direction \(s\), as is programmed in lines 3-4 of Algorithm 4. To ensure \(X_{u}+s\) is strictly feasible, the unconstrained trial step \(s\), its affine scaling transformation \(ss\) and \(st\) are truncated by Equation (11) prior to calculating the quadratic approximation \(q\)s1, as is programmed in lines 6-7 of Algorithm 4. The truncate function in Algorithm 5 uses the normalized unitary surrogates \(X_{u}\), lb and ub to calculate the min-max breakpoint distance _mdis_ with Equation (16). Otherwise, it will cause great deviation from the optimal search direction. Moreover, since the step-back is controlled by \(\theta\), the truncated point alongis just close to but not at the breakpoint, as illustrated by the green and red points in Figure 3, respectively. Hence, prior to evaluating along the reflected direction \(s^{\rm{R}}\), we need to calculate the breakpoint with _mdis_ and the untruncated \(st_{0}\), \(ss_{0}\) and \(s_{0}\), as in lines 5, 9-12 of Algorithm 4, where \(\delta=0.9\) is used to restrict the reflective step from being relatively too large [33]. As is evident from Figure 3, \(s\) and \(s^{\rm{R}}\) are the same except for the component corresponding to the crossed constraint, where \(s_{i}^{\rm{R}}=-s_{i}\) if that is the \(i\)th component [36]. Therefore, a simple one-dimensional reflective path search (using the quad1d function affiliated in the trdog function of MATLAB) can be performed to locate the improved direction \(ns\) and then truncate it to compute the quadratic approximation \(qs3\), as in lines 13-19 of Algorithm 4. As for evaluating along the gradient direction, except for the extended gradient defined in line 21 of Algorithm 4 to protect against the possible degeneracy of \(\delta=0\), the rest is similar to that of previous processes. Finally, the trial step is chosen from the best of three directions \(s\), \(ns+s_{01}\) and \(sg\) according to \(qs1\), \(qs2\) and \(qs3\), respectively, as in lines 27-32 of Algorithm 4. ```
1 function[\(s\), \(s\), \(s\), \(\alpha s\)] = TrialStep(\(\mathbf{X}_{s}\), \(\mathbf{lb}\), \(\mathbf{ub}\), \(C\),\(D\),\(j\), \(g\), \(\Delta\), \(\theta\))
2 % Determine 2-D trust-region solution
3 \(g_{\alpha}=D^{*}g\); \(rhs=S^{*}g_{\alpha}\); \(M=S^{*}(D^{*}(J^{*}J)^{*}D+C)^{*}S\);
4 \(st=\mathbf{trust}(rhs,\,M,\,\Delta)\); \(ss=S^{*}s!s\); \(s=|\,\mathrm{diag}(D)|\,!\,\)*ss;
5 \(st=st\); \(\infty=ss\); \(\infty=s\); % Save for reflecting
6 [\(s\), \(st\), \(ss\), \(mdis\), \(ipt\)] = Truncate(\(s\), \(st\), \(ss\), \(\mathbf{X}_{s}\), \(\mathbf{lb}\), \(\mathbf{ub}\), \(\theta\));
7 \(q\)\(s1=rhs*\)*st + 0.5*st*\({}^{*}\)*M*s;
8 % Evaluate along reflected direction
9 \(q\)\(s3=\mathrm{inf}\); \(ss_{01}=mdis^{*}ss_{0}\);
10 ifnorm(\(ss_{01}\)) < 0.9\(\mathbf{th}\)then
11 \(s_{01}=mdis^{*}s_{02}\); \(n\mathbf{X}u=\mathbf{X}_{s}+\infty\); \(stu=mdis^{*}st\);
12 \(q\)\(s0=rhs*\)*stu + 0.5*stu *M*stu; \(n\)ss = sss;
13 \(ns(ipt)=-ns(ipt)\); \(SS(\cdot,1)=ns/\mathrm{norm}(nss)\);
14 \(ng_{\alpha}=(D^{*}(J^{*}J)^{*}D+C)^{*}ss_{01}+D^{*}g\);
15 \(nrhs=\mathrm{full}(SS^{*}ng_{\alpha})\); \(M=SS^{*}(D^{*}(J^{*}J)^{*}D+C)^{*}SS\);
16 \([nss,\,\tau]=\mathbf{quad1d}(nss,\,ss_{01},\,\Delta)\); \(nst=\tau/\mathrm{norm}(nss)\);
17 \(ns=\mathrm{full}(|\,\mathrm{diag}(D)|\,!\,\)*nss\(\vdots\));
18 \([ns,\,nst,\,nss,\,\tau]=\mathbf{Truncate}(ns,\,\,nst,\,nss,\,\mathbf{nX}_{s}, \,\mathbf{lb},\,\mathbf{ub},\,\theta)\);
19 \(q\)\(s3=q\)< \(nrhs*\)*st + 0.5*ns!