# TRESNEI

## Introduction

TRESNEI is a MATLAB code for bound-constrained least-squares problems

\min_{l\le x \le u}\, f(x)=\frac{1}{2}||F(x)||_2^2,
\quad \quad \quad F:\mathbb{R}^n\rightarrow \mathbb{R}^m


where F is a continuously differentiable function and l, u are defined n-dimensional lower and upper bounds such that -∞ ≤ l ≤ u ≤ ∞. Free and fixed variables are handled by setting corresponding components of l and u to be -∞ and ∞, or by setting them equal to each other.

TRESNEI solves the nonlinear least-squares problem irrespective of its dimensions m and n. The algorithm implemented is a trust-region Gauss-Newton method which generates feasible iterates and relies on matrix factorization. The trust-region subproblem is solved by a dogleg strategy. The method is globally and fast locally convergent under standard assumptions. Various input/output options are provided, and we refer to the code itself for further documentation.

TRESNEI is a nontrivial extension of the solver STRSCNE for square bound-constrained nonlinear systems of equations.

TRESNEI covers the solution of small and zero residual bound-constrained nonlinear least-squares problems and handles the solution of systems of nonlinear equalities and inequalities. In practice TRESNEI solves:

• bound-constrained square and nonsquare systems of nonlinear equations

\begin{array}{l}
C_E(x) = 0 \\
l\le  x  \le u
\end{array}  \quad \quad \quad C_E: \mathbb{R}^n \rightarrow \mathbb{R}^{m_E};

• nonlinear least-squares

\min_{l\le x \le u}\, \frac{1}{2}||C_E(x)||_2^2, \quad \quad \quad C_E: \mathbb{R}^n \rightarrow \mathbb{R}^{m_E};

• systems of nonlinear equalities and inequalities

\begin{array}{l}
C_E(x) = 0 \\
C_I(x) \le 0 \\
l\le  x  \le u
\end{array}   \quad \quad \quad C_E: \mathbb{R}^n \rightarrow \mathbb{R}^{m_E},\:\:\:
C_I:\mathbb{R}^n \rightarrow \mathbb{R}^{m_I}.


The bound-constrained least-squares problem solved internally is the following

\min_{l\le x \le u}\, ||F(x)||^2_2 = \min_{l\le x \le u}\, \left \|
\begin{array}{c}
C_E(x) \\
\frac{1}{2} \max \{C_I(x),0 \}^2 \\
\end{array}
\right \|_2^2, \; \mbox{ where } F:\mathbb{R}^n\rightarrow \mathbb{R}^{m_E+m_I}


## License

TRESNEI code has non-commercial purposes. We welcome questions, comments, recommended changes and bug reports.
If you use this code, the authors would appreciate your acknowledging having done so in the reports, publications, theses, etc., resulting from their use.