ILOG CPLEX 11.0 Getting Started > Tutorials > Concert Technology Tutorial for C++ Users > Modifying an Optimization Problem: Example ilolpex3.cpp |
Modifying an Optimization Problem: Example ilolpex3.cpp |
INDEX PREVIOUS NEXT |
This example demonstrates:
Here is the problem example ilolpex3
solves:
The constraints Hx=d represent the flow conservation of a pure network flow. The example solves this problem in two steps:
Minimize |
c^Tx |
subject to |
Hx = d
l x u |
Notice that the 0
values in the data are omitted in the example program. ILOG CPLEX makes extensive use of sparse matrix methods and, although ILOG CPLEX correctly handles any explicit zero coefficients given to it, most programs solving models of more than modest size benefit (in terms of both storage space and speed) if the natural sparsity of the model is exploited from the very start.
Before the model is solved, the network optimizer is selected by setting the RootAlg
parameter to the value IloCplex::Network,
as shown in example ilolpex2.cpp
. The simplex display parameter IloCplex::SimDisplay
is set so that the simplex algorithm issues logging information as it executes.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |