ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Solving Mixed Integer Programming Problems (MIP) > Example: Reading a MIP Problem from a File |
Example: Reading a MIP Problem from a File |
INDEX PREVIOUS NEXT |
These examples show you how to solve a MIP with the Component Libraries when the problem data is stored in a file.
This example derives from ilolpex2.cpp
, an LP example explained in the manual ILOG CPLEX Getting Started. That LP example differs from this MIP example in these ways:
IloCplex::solve
, and its command line does not require the user to indicate an optimizer.
Like other applications based on ILOG CPLEX Concert Technology, this one uses IloEnv env
to initialize the Concert Technology environment and IloModel model(env)
to create a problem object. Before it ends, it calls env.end
to free the environment.
The example derives from lpex2.c
, an LP example explained in the manual ILOG CPLEX Getting Started. That LP example differs from this MIP example in these ways:
CPXmipopt
, and its command line does not require the user to indicate an optimizer.
Like other applications based on the ILOG CPLEX Callable Library, this one calls CPXopenCPLEX
to initialize the ILOG CPLEX environment; it sets the screen-indicator parameter to direct output to the screen and calls CPXcreateprob
to create a problem object. Before it ends, it calls CPXfreeprob
to free the space allocated to the problem object and CPXcloseCPLEX
to free the environment.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |