# Properties of the Quadratic Transformation of Dual Variables
## 5 Test Problems  
We formed the following problems for testing:  
\[\min\limits_{x\in Q}\ \ f(x,c),\ c,\ \ x\in R^{n}, \tag{26}\]  
\[Ax\leq b,\ b\in R^{m},\ A\in R^{m\times n}, \tag{27}\]  
\[Q=\{x|a\leq x\leq d\},\ a,d\in R^{n} \tag{28}\]  
Here, the parameters \(c\), \(A\), \(b\), \(d\) are defined when tests are created. The constraints (27) together with (28) can be represented as follows  
\[Ax-b\leq 0,\ x-d\leq 0,-x+a\leq 0. \tag{29}\]Denote \(\hat{A}^{T}=(A^{T},\;\;I,\;\;-I)\), \(\hat{b}^{T}=(b^{T},\;\;d,\;\;-a)\). Constraints (29) can be rewritten as  
\[\hat{A}x-\hat{b}\leq 0. \tag{30}\]  
For problem (26) and (30), we write the Lagrange function  
\[L(x,\hat{y})=f(x,c)+\Big{\langle}\hat{y},\hat{A}x-\hat{b}\Big{\rangle}, \tag{31}\]  
where \(\hat{y}\) is the vector of Lagrange multipliers of the combined group of linear constraints (30)  
\[\hat{y}\in R^{m+n+n},\;\hat{y}^{T}=(y_{b}^{T},\;\;y_{d}^{T},\;y_{a}^{T}\;),\;y _{b}\in R^{m},\;\;y_{d},\;y_{a}\in R^{n}\;\hat{y}\geq 0. \tag{32}\]  
The optimality conditions for the problem (26), (30) includes the stationarity conditions  
\[\
abla L_{x}(x,\hat{y})=\
abla f(x,c)+\hat{y}^{T}\hat{A}\;\;=0 \tag{33}\]  
and conditions of complementary slackness  
\[\hat{y}_{i}(\hat{A}x-\hat{b})_{i}=0,\;i=1,2,\ldots,m+2n. \tag{34}\]  
In a linear programming problem, conditions (32)-(34) are sufficient for a feasible point \(x\) to be a minimum point [30]. In a non-linear programming problem, conditions (32)-(34) and \(\
abla^{2}L_{x}x(x,\hat{y})>0\) are sufficient for a feasible point \(x\) to be a local minimum [19]. Based on the conditions (32)-(34), we will generate our test problems. Algorithm for generating the test problem is as follows. 1. Determine the number \(m\) of constraints, dimension \(n\) of the problem, the number \(mb\) of active constraints in (27), the number \(md\) of active constraints from the set of constraints \(x-d\leq 0\), the number \(ma\) of active constraints from the set of constraints \(-x+a\leq 0\). We assume that the active constraints in each group are the first constraints. 2. Define the elements of the matrix \(A\) according to the equation \(A_{ij}=r(p_{d})\), where \(r(p_{d})\) is a uniformly distributed random number on the interval \([p_{d}]\), \(0<p<q\). for \(i\): =1 to \(m\) do for \(j\): =1 to \(n\) do \(A[i,j]\):=\(r(5,10)\). 3. Set the boundaries \(0\leq a\leq d\) of the set \(Q\), the optimal point \(x\) and the Lagrange multipliers \(y_{d}y_{a}y_{d}=0\), \(y_{a}=0\). Set the optimal point \(x\) by a generator of uniformly distributed numbers \(a<x<d\). Set the boundaries of set \(Q\) for \(i\): =1 to \(n\) do begin \(a[i]\): =5; \(ya[i]\): =0; \(d[i]\): =15; \(y[i]\): =0; end;
4. To determine the first \(mb\) active constraints from the set of constraints \(Ax-b\leq 0\), we set the \(mb\) components of the vectors \(y_{b}\) and \(b\) (\(y_{b,j}>0,b_{i}=(Ax)_{i}\)). The remaining components of the vector \(b\) are set according to the rule \(b_{i}=(Ax)_{i}(1+1/i+0.1)\), and the Lagrange multipliers for them are assumed to be zero: \(y_{b,j}=0\). Calculate \(b=Ax\). for \(i\): =1 to \(n\) do \(b[i]\): =0; for \(i\): =1 to \(m\) do for \(j\): =1 to \(n\) do \(b[i]\): =\(b[i]\) + \(A[i,j]\) \(\times\)\(x[j]\); Set Lagrange multipliers for the active constraints for \(i\): =1 to \(m\) do \(y\psi[i]:=0\); for \(i:=1\) to \(mb\) do \(y\psi[i]:=1\); Define the right side b for inactive constraints for \(i:=mb+1\) to \(m\) do \(b[i]:=b[i]\times(1+1/I+0.1)\);
5. Find the parameters \(c\) in the representation of the function \(f(x,c)\) from (26), solving the system of Equation (32) with respect to \(c\). Since the elements of the matrix \(A\) are positive, the problem generated by the presented algorithm can be interpreted as a cost minimization problem under resource constraints.