Previous Page: CPXNETgetlb First PageNext Page: CPXNETgetnodeindex

CPXNETgetnodearcs


Description

The function CPXNETgetnodearcs() is used to access the arc indices incident to a range of nodes in the network stored in a CPLEX network problem object.

Return Value

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

int CPXNETgetnodearcs (CPXENVptr env,
                       CPXNETptr net,
                       int *arccnt_p,
                       int *arcbeg,
                       int *arc,
                       int arcspace,
                       int *surplus_p,
                       int begin,
                       int end);

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 *arccnt_p
A pointer to an integer that will contain the total number of arc indices returned in the array arc.

int *arcbeg
An array that will contain indices indicating where each of the requested arc lists start in array arc. Specifically, the list of arcs incident to node i (< end) consists of the indices in arcs in the range from arcbeg[i-begin] to arcbeg[(i+1)-begin]-1.

The list of arcs incident to node end consists of the entries in arc in the range from arcbeg[end-begin] to *arccnt_p-1. This array must have a size of at leastend-begin+1.

int *arc
An array that will contain the arc indices for the arcs incident to the nodes in the specified range. This array may be NULL if arcspace is 0.

int arcspace
An integer indicating the length of the array arc. arcspace may be 0.

int *surplus_p
A pointer to an integer that will contain the difference between arcspace and the number of arcs incident to the nodes in the specified range. A non-negative value indicates that the length of array arc was sufficient. A negative value indicates that the length of array arc was insufficient and that the routine could not complete its task. In this case, the routine CPXNETgetnodearcs() returns the value CPXERR_NEGATIVE_SURPLUS, and the negative value of *surplus_p indicates the amount of insufficient space in array arc.

int begin
Index of the first node for which arcs are to be obtained.

int end
Index of the last node for which arcs are to be obtained.

Example

status = CPXNETgetnodearcs (env, net, &arccnt, arcbeg, arc,
                            arcspace, &surplus, begin, end);

Previous Page: CPXNETgetlb First PageNext Page: CPXNETgetnodeindex