CPXXhybnetopt and CPXhybnetopt
The routine CPXXhybnetopt/CPXhybnetopt, given a linear program that has
been created via a call to CPXXcreateprob/CPXcreateprob, extracts an
embedded network, uses the CPLEX Network Optimizer to attempt to obtain an
optimal basis to the network, and optimizes the entire linear program using
one of the CPLEX simplex methods.
int CPXXhybnetopt( CPXCENVptr env, CPXLPptr lp, int method )
int CPXhybnetopt( CPXCENVptr env, CPXLPptr lp, int method )
Description
The routine CPXXhybnetopt/CPXhybnetopt, given a linear program that has
been created via a call to CPXXcreateprob/CPXcreateprob, extracts an
embedded network, uses the CPLEX Network Optimizer to attempt to obtain an
optimal basis to the network, and optimizes the entire linear program using
one of the CPLEX simplex methods. CPLEX takes the network basis as input for
the optimization of the whole linear program.
method |
= CPX_ALG_PRIMAL |
primal Simplex |
method |
= CPX_ALG_DUAL |
dual Simplex |
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX problem object as returned by
CPXXcreateprob/CPXcreateprob. - method
- The type of simplex method to follow the network optimization.
Return
The routine returns 0 (zero) unless an error occurred during the optimization. Examples of errors include exhausting
available memory (CPXERR_NO_MEMORY) or encountering
invalid data in the CPLEX problem object (CPXERR_NO_PROBLEM).
Exceeding a user-specified CPLEX limit is not considered an error. Proving the problem infeasible or unbounded is not considered an error.
A zero return value does not necessarily mean that a solution
exists. Use query routines CPXXsolninfo/CPXsolninfo,
CPXXgetstat/CPXgetstat, and CPXXsolution/CPXsolution to obtain
further information about the status of the optimization.
Example
status = CPXhybnetopt (env, lp, CPX_ALG_DUAL);
See also the example lpex3.c in the
CPLEX User's Manual and
in the standard distribution.