Previous Page: CPXNETgetobjsen First PageNext Page: CPXNETgetphase1cnt

CPXNETgetobjval


Description

The function CPXNETgetobjval is used to compute the objective value of the solution of the network stored in a CPLEX network problem object. If the solution is infeasible, i.e. the solution status is CPX_INFEASIBLE, CPX_IT_LIM_INFEAS, CPX_TIME_LIM_INFEAS, or CPX_ABORT_INFEAS, the value returned will depend on the setting of the parameter CPX_PARAM_NETDISPLAY.

If this parameter is set to CPXNET_PENALIZED_OBJECTIVE (2), objective function values that are penalized for infeasible flows are used to compute the objective value of the solution. Otherwise the true objective function values will be used.

For this function to succeed, a solution must exist for the CPLEX network problem object.

Return Value

If the operation is successful, CPXNETgetobjval() returns the value 0; if not, it returns a nonzero value to indicate an error.

Synopsis

int CPXNETgetobjval (CPXENVptr env,
                     CPXNETptr net,
                     double *objval_p);

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 *objval_p
Pointer to which the objective value is written. If NULL is passed, no objective value will be returned.

Example

status = CPXNETgetobjval (env, net, &objval);

Previous Page: CPXNETgetobjsen First PageNext Page: CPXNETgetphase1cnt