NO FRAMES

CPXNETaddarcs

public int CPXNETaddarcs(CPXCENVptr env, CPXNETptr net, int narcs, const int * fromnode, const int * tonode, const double * low, const double * up, const double * obj, char ** anames)
Definition file: cplex.h

The routine CPXNETaddarcs adds new arcs to the network stored in a network problem object.

Example

 status = CPXNETaddarcs (env, net, narcs, fromnode, tonode, NULL,
                         NULL, obj, NULL);

See Also:

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

net

A pointer to a CPLEX network problem object as returned by CPXNETcreateprob.

narcs

Number of arcs to be added.

fromnode

Array of indices of the from-node for the arcs to be added. All the indices must be greater than or equal to 0. If a node index is greater than or equal to the number of nodes currently in the network (see CPXNETgetnumnodes) new nodes are created implicitly with default supply values 0. The size of the fromnode array must be at least narcs.

tonode

Array of indices of the to-node for the arcs to be added. All the indices must be greater than or equal to 0. If a node index is greater than or equal to the number of nodes currently in the network (see CPXNETgetnumnodes) new nodes are created implicitly with default supply values 0. The size of the tonode array must be at least narcs.

low

Pointer to an array of lower bounds on the flow through added arcs. If NULL is passed, all lower bounds default to 0 (zero). Otherwise, the size of the array must be at least narcs. Values less than or equal to -CPX_INFBOUND are considered as negative infinity.

up

Pointer to an array of upper bounds on the flow of added arcs. If NULL is passed, all upper bounds default to CPX_INFBOUND. Otherwise, the size of the array must be at least narcs. Values greater than or equal to CPX_INFBOUND are considered as infinity.

obj

Pointer to an array of objective values for the added arcs. If NULL is passed, all objective values default to 0. Otherwise, the size of the array must be at least narcs.

anames

Pointer to an array of names for added arcs. If NULL is passed and the existing arcs have names, default names are assigned to the added arcs. If NULL is passed and the existing arcs have no names, the new arcs are assigned no names. Otherwise, the size of the array must be at least narcs and every name in the array must be a string terminating in 0. If the existing arcs have no names and anames is not NULL, default names are assigned to the existing arcs.

Returns:

The routine returns zero on success and nonzero if an error occurs.