Previous Page: CPXNETdelnodes First PageNext Page: CPXNETextract

CPXNETdelset


Description

The function CPXNETdelset() is used to delete a set of nodes and arcs from the network stored in a CPLEX network problem object. Any solution information that may be stored in the CPLEX network problem object will be lost. The remaining nodes and arcs are renumbered starting at zero; their order is preserved.

Return Value

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

Synopsis

int CPXNETdelset (CPXENVptr env,
                  CPXNETptr net,
                  int *whichnodes,
                  int *whicharcs);

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 *whichnodes
Array of size at least CPXNETgetnumnodes() that indicates which nodes to delete. If whichnodes[i] == 1, the node will be deleted. For every node deleted, all arcs incident to it will be deleted as well.

After termination, whichnode[j] indicates:

If NULL is passed, no nodes will be deleted.

int *whicharcs
Array indicating which arc to delete. Every arc i in the network withwhicharcs[i] == 1 will be deleted.

After termination, whicharc[j] indicates:

This also contains the deletions due to removed nodes. If NULL is passed, the only arcs deleted are those that are incident to nodes that have been deleted.

Example

status = CPXNETdelset (env, net, whichnodes, whicharcs);
Previous Page: CPXNETdelnodes First PageNext Page: CPXNETextract