CPXXNETgetnodearcs and CPXNETgetnodearcs
The routine CPXXNETgetnodearcs/CPXNETgetnodearcs is used to access the arc
indices incident to a range of nodes in the network stored in a network
problem object.
int CPXXNETgetnodearcs( CPXCENVptr env, CPXCNETptr net, CPXDIM * arccnt_p, CPXDIM * arcbeg, CPXDIM * arc, CPXDIM arcspace, CPXDIM * surplus_p, CPXDIM begin, CPXDIM end )
int CPXNETgetnodearcs( CPXCENVptr env, CPXCNETptr net, int * arccnt_p, int * arcbeg, int * arc, int arcspace, int * surplus_p, int begin, int end )
Description
The routine CPXXNETgetnodearcs/CPXNETgetnodearcs is used to access the arc
indices incident to a range of nodes in the network stored in a network
problem 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. - arccnt_p
-
A pointer to an integer to contain the total number of arc indices returned in the array
arc. - arcbeg
-
An array that contain indices indicating where each of the requested arc lists start in array
arc. Specifically, the list of arcs incident to nodei(<end) consists of the entries inarcin the range fromarcbeg[i-begin]toarcbeg[(i+1)-begin]-1. The list of arcs incident to nodeendconsists of the entries inarcin the range fromarcbeg[end-begin]to*arccnt_p-1. This array must have a length of at leastend-begin+1. - arc
-
An array that contain the arc indices for the arcs incident to the nodes in the specified range. May be NULL if
arcspaceis zero. - arcspace
-
An integer indicating the length of the array
arc. May be zero. - surplus_p
-
A pointer to an integer to contain the difference between
arcspaceand the number of arcs incident to the nodes in the specified range. A nonnegative value specifies thatarcspacewas sufficient. A negative value specifies that it was insufficient and that the routine could not complete its task. In that case,CPXERR_NEGATIVE_SURPLUSis returned and the negative value ofsurplus_pspecifies the amount of insufficient space in the arrayarc. - begin
-
Index of the first node for which arcs are to be obtained.
- end
-
Index of the last node for which arcs are to be obtained.
Return
The routine returns 0 (zero) on success and nonzero if an error occurs.Example
status = CPXNETgetnodearcs (env, net, &arccnt, arcbeg, arc,
arcspace, &surplus, begin, end);