Previous Page: CPXNETchgsupply First PageNext Page: CPXNETcopynet

CPXNETcopybase


Description

The function CPXNETcopybase() can be used to set the network basis for a CPLEX 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 that may be stored in the CPLEX network problem object will be lost.

Return Value

If the operation is successful, CPXNETcopybase() returns the value 0; if not, it returns a nonzero value to indicate an error.

Synopsis

int CPXNETcopybase (CPXENVptr env,
                    CPXNETptr net,
                    int *astat,
                    int *nstat);

Arguments

CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX() routines.

CPXNETptr net
A pointer to a CPLEX network problem object as returned by CPXNETcreateprob().

int *astat
Array of status values for network arcs. Each arc needs to be assigned one of the following values:

CPX_BASIC  
if the arc is to be basic  
CPX_AT_LOWER  
if the arc is to be nonbasic and its flow is on the lower bound  
CPX_AT_UPPER  
if the arc is to be nonbasic and its flow is on the upper bound  
CPX_FREE_SUPER  
if the arc is to be nonbasic but is free. In this case its flow will be set to 0  

int *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 following values:

CPX_BASIC  
if the arc is to be basic  
CPX_AT_LOWER  
if the arc is to be nonbasic and its flow is on the lower bound  

At least one of the artificial arcs must be assigned the status CPX_BASIC for a network basis.

Example

status = CPXNETcopybase (env, net, arc_stat, node_stat);
Previous Page: CPXNETchgsupply First PageNext Page: CPXNETcopynet