NO FRAMES

CPXsolninfo

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

The routine CPXsolninfo is used to access solution information produced by the routines CPXlpopt, CPXprimopt, CPXdualopt, CPXbaropt, CPXhybbaropt, CPXhybnetopt, and CPXqpopt. This information is maintained until the CPLEX problem object is freed via a call to CPXfreeprob or 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);
 

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 indicating 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 indicating 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 model 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 indicating 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 indicating 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 on success and it returns nonzero if an error occurs.