A nonlinear programming algorithm for neural-network learning based on the Kalman filter