CPXXNETcheckcopynet and CPXNETcheckcopynet
Checks data copied to a network object.
Signature
CPXCHECKLIBAPI
int CPXPUBLIC
CPXXNETcheckcopynet (CPXCENVptr env,
CPXNETptr net,
int objsen,
CPXDIM nnodes,
const double *supply,
char **nnames,
CPXDIM narcs,
const CPXDIM *fromnode,
const CPXDIM *tonode,
const double *low,
const double *up,
const double *obj,
char **aname);
CPXCHECKLIBAPI
int CPXPUBLIC
CPXNETcheckcopynet (CPXCENVptr env,
CPXNETptr net,
int objsen,
CPXDIM nnodes,
const double *supply,
char **nnames,
CPXDIM narcs,
const CPXDIM *fromnode,
const CPXDIM *tonode,
const double *low,
const double *up,
const double *obj,
char **aname);
Description
This routine validates the arguments of the corresponding routine CPXXNETcopynet and CPXNETcopynet. That is, this routine checks data in the objective sense, number of nodes, supply values for each node, names for each node, number of arcs, indices of the from-nodes (or, equivalently, the tail nodes) for each arc, indices of the to-nodes (or, equivalently, the head nodes) for each arc, lower and upper bounds on flow through each arc, cost for flow through each arc, and names of each arc.
The source code of this data checking routine
is in the file check.c, provided
as part of the product.
To call this routine, you must compile
and link check.c with your program
as you compile and link with the CPLEX Callable Library.
Arguments
The arguments of this routine are the same as those of CPXXNETcopynet and CPXNETcopynet.
| Name | Description |
|---|---|
| env |
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
|
| lp |
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
|
Return
The routine returns nonzero if it detects an error in the data; it returns zero if it does not detect any data errors.
Example
status = CPXXNETcheckcopynet (env, net, CPX_MAX, nnodes, supply,
nnames, narcs, fromnode, tonode,
lb, ub, obj, anames);