NO FRAMES

CPXsolninfo

public int CPXsolninfo(CPXCENVptr env, CPXCLPptr lp, int * solnmethod_p, int * solntype_p, int * pfeasind_p, int * dfeasind_p)
Definition file: cplex.h

The routine CPXsolninfo accesses solution information produced by the routines

This information is maintained until the CPLEX problem object is freed by a call to CPXfreeprob or until the solution is rendered invalid because of a call to one of the problem modification routines.

The arguments to CPXsolninfo are pointers to locations where data are to be written. Such data can include the optimization method used to produce the current solution, the type of solution available, and what is known about the primal and dual feasibility of the current solution. If any piece of information represented by an argument to CPXsolninfo is not required, a NULL pointer can be passed for that argument.

Example

 status = CPXsolninfo (env, lp, &solnmethod, &solntype,
                      &pfeasind, &dfeasind);
 

See also the topic Interpreting Solution Quality in the ILOG CPLEX User's Manual for information about how CPLEX determines primal or dual infeasibility.

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

solnmethod_p

A pointer to an integer specifying the method used to produce the current solution. The specific values which solnmethod_p can take and their meanings are the same as the return values documented for CPXgetmethod.

solntype_p

A pointer to an integer variable specifying the type of solution currently available. Possible return values are CPX_BASIC_SOLN, CPX_NONBASIC_SOLN, CPX_PRIMAL_SOLN, and CPX_NO_SOLN, meaning the problem either has a simplex basis, has a primal and dual solution but no basis, has a primal solution but no corresponding dual solution, or has no solution, respectively.

pfeasind_p

A pointer to integer variables specifying whether the current solution is known to be primal feasible. Note that a false return value does not necessarily mean that the solution is not feasible. It simply means that the relevant algorithm was not able to conclude it was feasible when it terminated.

dfeasind_p

A pointer to integer variables specifying whether the current solution is known to be dual feasible. Note that a false return value does not necessarily mean that the solution is not feasible. It simply means that the relevant algorithm was not able to conclude it was feasible when it terminated.

Returns:

The routine returns zero if successful and it returns nonzero if an error occurs.