Previous Page: CPXNETgetnodeindex First PageNext Page: CPXNETgetnumarcs

CPXNETgetnodename


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);

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().

char **nnames
Where 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 *namestore
Array of characters to which the specified node names are to be copied. It may be NULL if namespc is 0.

int namespc
Length of the namestore array.

int *surplus_p
Pointer 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 begin
Index of the first node for which a name is to be obtained.

int end
Index of the last node for which a name is to be obtained.

Example

status = CPXNETgetnodename (env, net, nnames, namestore, namespc,
                            &surplus, 0, nnodes-1);

Previous Page: CPXNETgetnodeindex First PageNext Page: CPXNETgetnumarcs