Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXNETcopynet
copies a network to a network
object, overriding any other network saved in the object. The network to be
copied is specified by providing the:
CPXNETcopynet
.The arcs are numbered according to the order given in the
fromnode
and tonode
arrays. Some of the parameters
are optional and replaced by default values if NULL is passed
for them.
Example
status = CPXNETcopynet (env, net, CPX_MAX, nnodes, supply, NULL, narcs, fromnode, tonode, NULL, NULL, obj, NULL);
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
.
objsen
Optimization sense of the network to be copied.
It may take values CPX_MAX
for a maximization problem
or CPX_MIN
for a minimization problem.
nnodes
Number of nodes to be copied to the network object.
supply
Supply values for the nodes.
If NULL is passed all supply values default to 0 (zero).
Otherwise, the size of the array must be at least nnodes
.
nnames
Pointer to an array of names for the nodes.
If NULL is passed, no names are assigned to the nodes.
Otherwise, the size of the array must be at least nnodes
and every name in the array must be a string terminating in 0.
narcs
Number of arcs to be copied to the network object.
fromnode
The array of indices in each arc's “from node.”
The indices must be in the range[0, nnodes-1]
.
The size of the array must be at least narcs
.
tonode
The array of indices in each arc's “to node.”
The indices must be in the range [0, nnodes-1]
.
The size of the array must be at least narcs
.
low
Pointer to an array of lower bounds on the flow through 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 -infinity
.
up
Pointer to an array of upper bounds on the flow through arcs.
If NULL is passed, all lower 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 infinity.
obj
Pointer to an array of objective values for flow through arcs.
If NULL is passed, all objective values default to 0 (zero).
Otherwise, the size of the array must be at least narcs
.
anames
Pointer to an array of names for the arcs.
If NULL is passed, no names are assigned to the nodes.
Otherwise, the size of the array must be at least narcs
,
and every name in the array must be a string terminating in 0 (zero).