ilomipex2.cpp

Shows how to read data from a file and solve a MIP model in the C++ API.

This example derives from ilolpex2.cpp, an LP example explained in the manual Getting Started. That LP example differs from this MIP example in these ways:

  • This example solves only MIPs, so it calls only IloCplex::solve, and its command line does not require the user to indicate an optimizer.

  • This example does not generate or print a basis.

Like other applications based on CPLEX Concert Technology, this one uses env, an instance of IloEnv, to initialize the Concert Technology environment and IloModel model(env) to create a problem object. Before the application ends, it calls env.end to free the environment.