NO FRAMES

CPXNETwriteprob

int CPXPUBLIC CPXNETwriteprob(CPXCENVptr env, CPXCNETptr net, const char * filename_str, const char * format_str)
Definition file: cplex.h
Include files: cplex.h

The routine CPXNETwriteprob writes the network stored in a 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).

If the file name ends with .gz, a compressed file is written.

File extensions for network files
netfor CPLEX network format
minfor DIMACS network format
lpfor LP format of LP formulation
mpsfor MPS format of LP formulation
savfor SAV format of LP formulation

Example

 status = CPXNETwriteprob (env, net, "network.net", NULL);

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

net

A pointer to a CPLEX network problem object as returned by CPXNETcreateprob.

filename_str

Name of the network file to write, where the file extension specifies the file format unless overridden by the format argument. If the file name ends with .gz a compressed file is written in accordance with the selected file type.

format_str

File format to generate. Possible values appear in the table. If NULL is passed, the format is inferred from the file name.

Returns:

The routine returns zero on success and nonzero if an error occurs.