12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

●●Then call CPXprimopt to optimize that problem.Then use CPXsolution to get a solution to the fixed problem.Example: Reading a MIP Problem from a FileThese examples show you how to solve a MIP with the Component Libraries when theproblem data is stored in a file.ilomipex2.cppThis example derives from ilolpex2.cpp, an LP example explained in the manual<strong>ILOG</strong> <strong>CPLEX</strong> Getting Started. That LP example differs from this MIP example in theseways:◆This example solves only MIPs, so it calls only IloCplex::solve, and its commandline does not require the user to indicate an optimizer.◆ This example does not generate or print a basis.Like other applications based on <strong>ILOG</strong> <strong>CPLEX</strong> Concert Technology, this one uses IloEnvenv to initialize the Concert Technology environment and IloModel model(env) tocreate a problem object. Before it ends, it calls env.end to free the environment.mipex2.cThe example derives from lpex2.c, an LP example explained in the manual <strong>ILOG</strong> <strong>CPLEX</strong>Getting Started. That LP example differs from this MIP example in these ways:◆◆This example solves only MIPs, so it calls only CPXmipopt, and its command line doesnot require the user to indicate an optimizer.This example does not generate or print a basis.Like other applications based on the <strong>ILOG</strong> <strong>CPLEX</strong> Callable Library, this one callsCPXopen<strong>CPLEX</strong> to initialize the <strong>ILOG</strong> <strong>CPLEX</strong> environment; it sets the screen-indicatorparameter to direct output to the screen and calls CPXcreateprob to create a problemobject. Before it ends, it calls CPXfreeprob to free the space allocated to the problemobject and CPXclose<strong>CPLEX</strong> to free the environment.300 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!