Solution of discrete-time optimal control problems on parallel