Ported the code to call cplex for the ILP of InferLatentVariables