NO FRAMES

CPXNETgetobjval

int CPXPUBLIC CPXNETgetobjval(CPXCENVptr env, CPXCNETptr net, double * objval_p)
Definition file: cplex.h
Include files: cplex.h

The routine CPXNETgetobjval returns the objective value of the solution stored in a network problem object.

If the current solution is not feasible, the value returned depends on the setting of the parameter CPX_PARAM_NETDISPLAY. If this parameter is set to CPXNET_PENALIZED_OBJECTIVE (2), an objective function value is reported that includes penalty contributions for arcs on which the flow at termination violated the flow bounds on that arc.

Example

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

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

net

A pointer to a CPLEX network problem object as returned by CPXNETcreateprob.

objval_p

Pointer to where the objective value is written. If NULL is passed, no objective value is returned.

Returns:

The routine returns zero on success and nonzero if an error occurs.