Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXNETsolution
accesses solution values for a
network problem object computed by a previous call to
CPXNETprimopt
for that object. The solution values are
maintained in the object as long as no changes are applied to it with one of
the CPXNETchg...
, CPXNETcopy...
or
CPXNETadd...
functions. Whether or not a solution exists can
be determined by CPXNETsolninfo
.
The arguments to CPXNETsolution
are pointers to locations
where data is to be written. Such data includes the solution status, the
value of the objective function, primal, dual and slack values and the
reduced costs.
Although all the above data exists after a successful call to
CPXNETprimopt
, it is possible that the user only needs a
subset of the available data. Thus, if any part of the solution represented
by an argument to CPXNETsolution
is not required, a NULL
pointer can be passed for that argument.
Example
status = CPXNETsolution (env, net, &netstatus, &objval, x, pi, slack, dj);
env | A pointer to the CPLEX environment as returned by |
net | A pointer to a CPLEX network problem object as returned by |
netstat_p | Pointer to which the solution status is to be written. The specific values that |
objval_p | Pointer to which the objective value is to be written. If NULL is passed, no objective value is returned. If the solution status is one of the |
x | Array to which the solution (flow) vector is to be written. If NULL is passed, no solution vector is returned. Otherwise, |
pi | Array to which the dual values are to be written. If NULL is passed, no dual values are returned. Otherwise, |
slack | Array to which the slack values (violations of supplies/demands) are to be written. If NULL is passed, no slack values are returned. Otherwise, |
dj | Array to which the reduced cost values are to be written. If NULL is passed, no reduced cost values are returned. Otherwise, |