ILOG CPLEX 11.0 Getting Started > Tutorials > Concert Technology Tutorial for C++ Users > Reading a Problem from a File: Example ilolpex2.cpp |
Reading a Problem from a File: Example ilolpex2.cpp |
INDEX PREVIOUS NEXT |
This example shows how to read an optimization problem from a file, and solve it with a specified optimizer option. It prints solution information, including a Simplex basis, if available. Finally it prints the maximum infeasibility of any variable of the solution.
The file to read and the optimizer choice are passed to the program via command line arguments. For example, this command:
reads the file example.mps
and solves the problem with the dual simplex optimizer.
Example ilolpex2
demonstrates:
The general structure of this example is the same as for example ilolpex1.cpp
. It starts by creating the environment and terminates with destroying it by calling the end
method. The code in between is enclosed in try/catch
statements for error handling.
You can view the complete program online in the standard distribution of the product at yourCPLEXinstallation/examples/src/ilolpex2.cpp
.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |