C++ class reference
The complete set of classes of the BCL C++ interface is summarized in the following list:
XPRB |
Initialization and general settings.
|
XPRBbasis |
Methods for accessing bases.
|
XPRBctr |
Methods for modifying and accessing constraints and operators for constructing them. Note that all terms in a constraint must belong to the same problem as the constraint itself.
|
XPRBcut |
Methods for modifying and accessing cuts and operators for constructing them. Note that all terms in a cut must belong to the same problem as the cut itself.
|
XPRBexpr |
Methods and operators for constructing linear and quadratic expressions. Note that all variables in an expression must belong to the same problem.
|
XPRBindexSet |
Methods for accessing index sets and operators for adding and retrieving set elements.
|
XPRBprob |
Problem definition, including methods for creating and deleting the modeling objects, problem solving, changing settings, and retrieving solution information.
|
XPRBrelation |
Methods and operators for constructing linear or quadratic relations from expressions.
|
XPRBsol |
Methods for defining, modifying and accessing solutions. Note that all variables in a solution must belong to the same problem as the solution itself.
|
XPRBsos |
Methods for modifying and accessing Special Ordered Sets and operators for constructing them. Note that all members in a SOS must belong to the same problem as the SOS itself.
|
XPRBvar |
Methods for modifying and accessing variables.
|
The method isValid may require some explanation: it should be used in combination with methods getVarByName, getCtrByName etc. These methods always return an object of the desired type, unlike the corresponding functions in standard BCL which return a NULL pointer if the object was not found. Only with method isValid it is possible to test whether the object is a valid object, that is, whether it is contained in a problem definition.
All C++ classes that have a direct correspondence with modeling objects in BCL (namely XPRBprob, XPRBvar, XPRBctr, XPRBcut, XPRBsol, XPRBsos, XPRBindexSet, XPRBbasis) take the same names, with the exception of XPRBindexSet. The corresponding BCL modeling object in C can be obtained from each of these classes, with the method getCRef. It is also possible to obtain the Xpress Optimizer problem corresponding to a BCL C++ problem by using method XPRBprob.getXPRSprob. Please see Section Using the Optimizer with BCL C++ for further detail on using BCL C++ with the Optimizer library.
Most of the methods of the classes with direct correspondence to C modeling objects call standard BCL C functions, as indicated, and return their result.
The major difference between the C and C++ interfaces is in the way linear and quadratic expressions and constraints are created. In C++, the algebraic operators like + or == are overloaded so that constraints may be written in a form that is close to an algebraic formulation.
Some additional classes have been introduced to aid the termwise definition of constraints with overloaded arithmetic operators. Linear and quadratic expressions (class XPRBexpr) are required in the definition of constraints and Special Ordered Sets. Linear and quadratic relations (class XPRBrelation), may be used as an intermediary in the definition of constraints.
Another class that does not correspond to any standard BCL modeling object is the class XPRB that contains methods relating to the initialization of BCL and the general status of the software.
© 2001-2019 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.