This is the first part of two papers in which we develop nonlinear programming techniques for solving elliptic control problems under general control and state inequality constraints. In the first part, we study boundary control problems with boundary conditions of either Dirichlet or Neumann type. The second part is devoted to elliptic problems with distributed control.
There are several recent papers on both the theoretical treatment and numerical solution methods for elliptic control problems. First order necessary and second order sufficient optimality conditions for Neumann boundary conditions have been given in Casas  and Casas et al. [10,11]. First order necessary conditions for linear operators and Dirichlet or Neumann boundary conditions are obtained in Bergounioux, Kunisch , Ito, Kunisch , Kunisch, Volkwein . These authors have demonstrated that an augmented Lagrangian techniques combined with a SQP approach lead to first order conditions and provide an efficient numerical algorithm.
Despite this work on elliptic problems, we feel it worthwile to consider these problems from a more systematic numerical point of view. We treat semilinear elliptic operators and concentrate on handling possibly nonlinear control and state constraints jointly. Our numerical approach will be able to capture also controls of bang-bang or singular type for which the Legendre condition is not satisfied. This type of control is well studied for ODE control problems, but we are not aware of any numerical example for elliptic problems although Hettich et al. [14,15] present some theoretical work on the subject. Moreover, we analyze adjoint variables corresponding to equality and inequality constraints in the discretized problem. This enables us to check first order necessary conditions explicitly in the presence of active control and state constraints. As a byproduct, we give an informal form of first order necessary conditions for problems with Dirichlet boundary control. Such conditions have not been given in the literature to full extent so far.
In the application of NLP-techniques to optimal control, there are two components that have been extensively worked out for ODE control problems; cf., e.g., Barclay et al. , Betts , Betts, Huffmann , Büskens , Büskens, Maurer , Grachev, Evtushenko , Teo et al. . The first aspect concerns the suitable choice of a discretization scheme while the other is the selection of the NLP-method. One has two options for the discretization scheme. The first one is to discretize both the control and state variables and to incorporate the integration method as an explicit equality constraint at each gridpoint. This approach leads to a high-dimensional NLP-problem with a sparse structure of the Jacobian; cf. Barclay et al. . The other discretization approach consists in treating the discretized control variables as the only optimization variables while the state variable is expressed and computed as a function of the control variable. This leads to a lower-dimensional NLP with a rather dense Jacobian. However, in this approach derivatives usually can not be calculated explicitly but only through a numerical differentiation scheme.
In this paper, we formulate NLP-problems using a full discretization scheme where the optimization variables comprise both the control and state variables. The resulting NLP-problems may contain up to variables. To solve such a high-dimensional and sparse NLP-problem, the interior point method developed by Vanderbei, Shanno  has turned out to be particularly efficient and reliable.
The organization of the first part is the following. In Section 2 we discuss necessary optimality conditions for elliptic problems with Neumann boundary control. Necessary optimality conditions for problems with Dirichlet boundary conditions have not yet been developed in the literature for the general problem considered here. In Section 3 we state an informal form of such necessary conditions. Section 4 formulates NLP-problems associated with discretized versions of the elliptic problems. Necessary conditions of Kuhn-Tucker type are discussed both for Dirichlet and Neumann boundary conditions. Finally, in Section 5 we present several numerical examples for both types of boundary conditions. Example 5.2 exhibits a singular control while Examples 5.4, 5.6 and 5.8 present bang-bang controls.