Description
The function CPXNETgetnodename() is used to obtain the names of a range of nodes in a network stored in a CPLEX network problem object. The beginning and end of the range, along with the length of the array in which the node names are to be returned, must be specified.Return Value
If the operation is successful, CPXNETgetnodename() returns the value 0; if not, it returns a nonzero value to indicate an error. The value CPXERR_NEGATIVE_SURPLUS indicates that there was not enough space in the namestore array to hold the names.Synopsis
int CPXNETgetnodename (CPXENVptr env,
CPXNETptr net,
char **nnames,
char *namestore,
int namespc,
int *surplus_p,
int begin,
int end);
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().
char **nnamesWhere to copy pointers to node names stored in the
namestore array. The length of this array must be at least (end-begin+1). The pointer to the name of node i will be returned in nnames[i-begin].
char *namestoreArray of characters to which the specified node names are to be copied. It may be NULL if
namespc is 0.
int namespcLength of the
namestore array.
int *surplus_pPointer to an integer to which the difference between
namespc and the number of characters required to store the requested names is returned. A non-negative value indicates that namestore was sufficient. A negative value indicates that it was insufficient. In this case CPXERR_NEGATIVE_SURPLUS is returned and the negative value of surplus_p indicates the amount of insufficient space in the array namestore.
int beginIndex of the first node for which a name is to be obtained.
int endIndex of the last node for which a name is to be obtained.
status = CPXNETgetnodename (env, net, nnames, namestore, namespc,
&surplus, 0, nnodes-1);