The techniques of nonlinear programming are incorporated into the standard variational method. The set of inequality constraints employed in the nonlinear optimizations is based on the reduced local energy, evaluated at various points of configuration space. These constraints give, indirectly, a means to incorporate the local behaviour of the wavefunction in the variational procedure. A test of the procedure is carried out using a 20-term Hylleraas type wavefunction for the ground state of the helium atom. The impact of the constrained optimization on a variety of expectation values is examined.