optimality conditions