CPXXNETprimopt and CPXNETprimopt

The routine CPXXNETprimopt/CPXNETprimopt can be called after a network problem has been copied to a network problem object, to find a solution to that problem using the primal network simplex method.

int  CPXXNETprimopt( CPXCENVptr env, CPXNETptr net )

int  CPXNETprimopt( CPXCENVptr env, CPXNETptr net )

Description

The routine CPXXNETprimopt/CPXNETprimopt can be called after a network problem has been copied to a network problem object, to find a solution to that problem using the primal network simplex method. When this function is called, the CPLEX primal network algorithm attempts to optimize the problem. The results of the optimization are recorded in the problem object and can be retrieved by calling the appropriate solution functions for that object.

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.

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, or proving the model infeasible or unbounded, are not considered errors. Note that a zero return value does not necessarily mean that a solution exists. Use query routines CPXXNETsolninfo/CPXNETsolninfo, CPXXNETgetstat/CPXNETgetstat, and CPXXNETsolution/CPXNETsolution to obtain further information about the status of the optimization.

Example


 status = CPXNETprimopt (env, net);

See also the examples netex1.c and netex2.c in the standard distribution of the product.