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.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.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);
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 *objval_pPointer to which the objective value is written. If NULL is passed, no objective value will be returned.
status = CPXNETgetobjval (env, net, &objval);