Least-squares minimization with bounds and constraints
