Description
The function CPXNETgetslack() is used to access slack values or, equivalently, violation of supplies/demands for a range of nodes in the network stored in a CPLEX network problem object.Return Value
If the operation is successful, CPXNETgetslack() returns the value 0; if not, it returns a nonzero value to indicate an error.Synopsis
int CPXNETgetslack (CPXENVptr env,
CPXNETptr net,
double *slack,
int begin,
int end);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX() routines.
CPXNETptr netA pointer to a CPLEX network problem object as returned by
CPXNETcreateprob().
double *slackArray in which to write solution slack variables for requested nodes. If NULL is passed, no data will be returned. Otherwise
slack must point to an array of a size that is at least (end-begin+1).
int beginIndex of the first node for which a slack value is obtained.
int endIndex of the last node for which a slack value is obtained.
status = CPXNETgetslack (env, net, slack, 10, 20);