ILOG CPLEX 11.0 User's Manual > Continuous Optimization > Solving LPs: Simplex Optimizers > Examples: Using a Starting Basis in an LP Problem > Example lpex6.c |
Example lpex6.c |
INDEX PREVIOUS NEXT |
The example, lpex6.c
, resembles one you may have studied in the ILOG CPLEX Getting Started manual, lpex1.c
. This example differs from that one in these ways:
main
routine, the arrays cstat
and rstat
set the status of the initial basis.
CPXcopybase
.
The application begins with declarations of arrays to store the solution of the problem. Then, before it calls any other ILOG CPLEX routine, the application invokes the Callable Library routine CPXopenCPLEX
to initialize the ILOG CPLEX environment. After the environment has been initialized, the application calls other ILOG CPLEX Callable Library routines, such as CPXsetintparam
with the argument
CPX_PARAM_SCRIND
to direct output to the screen and most importantly, CPXcreateprob
to create the problem object. The routine populatebycolumn
builds the problem object, and as noted earlier, CPXcopybase
copies the advanced starting basis.
Before the application ends, it calls CPXfreeprob
to free space allocated to the problem object and CPXcloseCPLEX
to free the environment.
The complete program lpex6.c
appears online in the standard distribution at yourCPLEXinstallation/examples/src.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |