XPRSgetattribinfo
Purpose
Accesses the id number and the type information of an attribute given its name. An attribute name may be for example XPRS_ROWS. Names are case-insensitive and may or may not have the
XPRS_ prefix. The id number is the constant used to identify the attribute for calls to functions such as
XPRSgetintattrib. The type information returned will be one of the below integer constants. The function will return an id number of 0 and a type value of XPRS_TYPE_NOTDEFINED if the name is not recognized as an attribute name. Note that this will occur if the name is a control name and not an attribute name.
Topic area
Synopsis
int XPRS_CC XPRSgetattribinfo(XPRSprob prob, const char* name, int* p_id, int* p_type);
Arguments
|
prob
|
The current problem.
|
||||||||||
|
name
|
The name of the attribute to be queried. Names are case-insensitive and may or may not have the XPRS_ prefix. A full list of all attributes may be found in Chapter
Control Parameters, or from the list in the
xprs.h header file.
|
||||||||||
|
p_id
|
Pointer to an integer where the id number will be returned.
|
||||||||||
|
p_type
|
Pointer to an integer where the type id will be returned. The value will be one of the following constants from xprs.h:
|
Example
The following code example obtains the id number and the type id of the control or attribute with name given by
name. Note that the name happens to be a control name in this example:
const char *name = "presolve";
int id, type;
...
if(XPRSgetattribinfo(prob, name, &id,
&type) || id==0) {
if(XPRSgetcontrolinfo(prob, name, &id,
&type) || id==0) {
printf("Unrecognized name: %s\n", name);
}
}
Related topics
© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation ("FICO"). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
