CPXXNETextract and CPXNETextract
The routine
CPXXNETextract/CPXNETextract
finds an embedded network in the
LP stored in a CPLEX problem object and copies it as a network to the
network problem object, net.
int CPXXNETextract( CPXCENVptr env, CPXNETptr net, CPXCLPptr lp, CPXDIM * colmap, CPXDIM * rowmap )
int CPXNETextract( CPXCENVptr env, CPXNETptr net, CPXCLPptr lp, int * colmap, int * rowmap )
Description
The routine CPXXNETextract/CPXNETextract finds an embedded network in the
LP stored in a CPLEX problem object and copies it as a network to the
network problem object, net.
The parameter that specifies the
simplex network extraction level
(CPXPARAM_Network_NetFind)
controls the extraction algorithm.
If the CPLEX problem object has a basis, an attempt is made to copy the basis to the network object. However, this may fail if the status values corresponding to the rows and columns of the subnetworks do not form a basis. Even if the entire LP is a network, it may not be possible to load the basis to the network object if none of the slack or artificial variables are basic.
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - net
-
A pointer to a CPLEX network problem object as returned by
CPXXNETcreateprob/CPXNETcreateprob. - lp
-
A pointer to a CPLEX problem object as returned by
CPXXcreateprob/CPXcreateprob. - colmap
-
If not NULL, after completion
colmap[i]contains the index of the LP column that has been mapped to arci. Ifcolmap[i] < 0, arc i corresponds to the slack variable for row-colmap[i]-1. The size ofcolmapmust be at leastCPXgetnumcols(env, lp)+CPXgetnumrows(env, lp). - rowmap
-
If not NULL, after completion
rowmap[i]contains the index of the LP row that has been mapped to nodei. Ifrowmap[i] < 0, node i is a dummy node that has no corresponding row in the LP. The size ofrowmapmust be leastCPXgetnumrows(env, lp)+1.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXNETextract (env, net, lp, colmap, rowmap);