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.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);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX() routines.
CPXNETptr netA pointer to a CPLEX network problem object as returned by
CPXNETcreateprob().
int *astatArray of status values for network arcs. Each arc needs to be assigned one of the following values:
int *nstatArray 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);