ILOG CPLEX 11.0 User's Manual > Languages and APIs > ILOG CPLEX Callable Library > Example: Using Query Routines lpex7.c |
Example: Using Query Routines lpex7.c |
INDEX PREVIOUS NEXT |
This example uses the ILOG CPLEX Callable Library query routine CPXgetcolname
to get the column names from a problem object. To do so, it applies the programming pattern just outlined in Using Surplus Arguments for Array Allocations. It derives from the example lpex2.c
from the ILOG CPLEX Getting Started manual. This query-routine example differs from that simpler example in several ways:
CPXgetcolname
twice after optimization: the first call discovers how much space to allocate to hold the names; the second call gets the names and stores them in the arrays cur_colname
and cur_colnamestore
.
cur_colname
. If no names exist there, the example creates generic names.
This example assumes that the current problem has been read from a file by CPXreadcopyprob
. You can adapt the example to use other ILOG CPLEX query routines to get information about any problem read from a file.
The complete program lpex7.c
appears online in the standard distribution at yourCPLEXinstallation/examples/src
.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |