Previous Page: CPXNETaddarcs First PageNext Page: CPXNETbasewrite

CPXNETaddnodes


Description

This function adds new nodes to the network stored in a CPLEX network problem object.

Return Value

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

Synopsis

int CPXNETaddnodes (CPXENVptr env,
                    CPXNETptr net,
                    int nnodes,
                    double *supply,
                    char **nnames);

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 nnodes
Number of nodes to add.

double *supply
Supply values for added nodes. If NULL is passed, all supplies will default to 0. Otherwise the size of the array must be at least nnodes.

char **nnames
Pointer to an array of names for added nodes. If NULL is passed and the existing nodes have names, default names will be assigned to the added nodes. If NULL is passed but the existing nodes have no names, the new nodes will be assigned no names. Otherwise the size of the array must be at least nnodes and every name in the array must be a string terminating in 0. If the existing nodes have no names and nnames is not NULL, default names will be assigned to the existing nodes.

Example

status = CPXNETaddnodes (env, net, nnodes, supply, NULL);

Previous Page: CPXNETaddarcs First PageNext Page: CPXNETbasewrite