Previous Page: CPXNETgetprobname First PageNext Page: CPXNETgetstat

CPXNETgetslack


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.

For this function to succeed, a solution must exist for the 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);

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().

double *slack
Array 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 begin
Index of the first node for which a slack value is obtained.

int end
Index of the last node for which a slack value is obtained.

Example

status = CPXNETgetslack (env, net, slack, 10, 20);

Previous Page: CPXNETgetprobname First PageNext Page: CPXNETgetstat