CPXXgetsolnpoolsolnindex and CPXgetsolnpoolsolnindex

The routine CPXXgetsolnpoolsolnindex/CPXgetsolnpoolsolnindex searches for the index number of the specified solution in the solution pool of a CPLEX problem object.

int  CPXXgetsolnpoolsolnindex( CPXCENVptr env, CPXCLPptr lp, char const * lname_str, int * index_p )

int  CPXgetsolnpoolsolnindex( CPXCENVptr env, CPXCLPptr lp, char const * lname_str, int * index_p )

Description

The routine CPXXgetsolnpoolsolnindex/CPXgetsolnpoolsolnindex searches for the index number of the specified solution in the solution pool of a CPLEX problem object.

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
lname_str
A solution name to search for.
index_p
A pointer to an integer to hold the index number of the solution with name lname_str. If the routine is successful, *index_p contains the index number; otherwise, *index_p is undefined.

Return

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

Example


 status = CPXgetsolnpoolsolnindex (env, lp, "p4", &setindex);