Description
This function writes the network stored in a CPLEX network problem object to a file. This can be done in CPLEX (.net) or DIMACS (.min) network file format (MIN) or as the LP representation of the network in any of the LP formats (.lp, .mps, or .sav)..gz, a compressed file will be written.Return Value
If the operation is successful, CPXNETwriteprob() returns the value 0; if not, it returns a nonzero value to indicate an error.Synopsis
int CPXNETwriteprob (CPXENVptr env,
CPXNETptr net,
char *filename,
char *format);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX() routines.
CPXNETptr netA pointer to a CPLEX network problem object as returned by
CPXNETcreateprob().
char *filenameName of the network file to write, unless otherwise specified with the
format argument. If the file name ends with .gz a compressed file will be written in accordance with the selected file type.
char *formatFile format to generate. Possible values are:
|
net
|
for CPLEX network format
|
|
min
|
for DIMACS network format
|
|
lp
|
for LP format of LP formulation
|
|
mps
|
for MPS format of LP formulation
|
|
sav
|
for SAV format of LP formulation
|
If NULL is passed, the format is inferred from the file name.
Example
status = CPXNETwriteprob (env, net, "network.net", NULL);