NO FRAMES

CPXNETcopybase

int CPXPUBLIC CPXNETcopybase(CPXCENVptr env, CPXNETptr net, const int * astat, const int * nstat)
Definition file: cplex.h
Include files: cplex.h

The routine CPXNETcopybase can be used to set the network basis for a network problem object. It is not necessary to load a basis prior to optimizing a problem, but a very good starting basis may increase the speed of optimization significantly. A copied basis does not need to be feasible to be used by the network optimizer.

Any solution information stored in the problem object is lost.

Example

 status = CPXNETcopybase (env, net, arc_stat, node_stat);
Table 1: Status of arcs in astat
CPX_BASICif the arc is to be basic
CPX_AT_LOWERif the arc is to be nonbasic and its flow is on the lower bound
CPX_AT_UPPERif the arc is to be nonbasic and its flow is on the upper bound
CPX_FREE_SUPERif the arc is to be nonbasic but is free. In this case its flow is set to 0

Table 2: Status of artificial arcs in nstat
CPX_BASICif the arc is to be basic
CPX_AT_LOWERif the arc is to be nonbasic and its flow is set to 0

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.

astat

Array of status values for network arcs. Each arc needs to be assigned one of the values in Table 1.

nstat

Array of status values for artificial arcs from each node to the root node. Each artificial arc needs to be assigned one of the values in Table 2. At least one of the artificial arcs must be assigned the status CPX_BASIC for a network basis.

Returns:

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