XPRB
getTime
|
|||||||||||||
Synopsis
|
int getTime();
|
||||||||||||
Return value
|
System time measure in milliseconds.
|
||||||||||||
Description
|
|||||||||||||
Example
|
This example shows how to measure the elapsed time in a BCL program:
int starttime; XPRB::init(); starttime = XPRB::getTime(); ... cout << "Time: " << (XPRB::getTime()-starttime)/1000; cout << " sec" << endl; |
||||||||||||
Related topics
|
Calls
XPRBgettime
|
||||||||||||
getVersion
|
|||||||||||||
Synopsis
|
const char *getVersion();
|
||||||||||||
Return value
|
BCL version number if function executed successfully,
NULL otherwise.
|
||||||||||||
Description
|
|||||||||||||
Example
|
The following example retrieves and prints out the BCL version number:
const char *version; XPRB::init(); version = XPRB::getVersion(); cout << "Xpress BCL version " << version << endl; |
||||||||||||
Related topics
|
Calls
XPRBgetversion
|
||||||||||||
init
|
|||||||||||||
Synopsis
|
int init();
|
||||||||||||
Return value
|
0 if initialization executed successfully, 1 otherwise.
|
||||||||||||
Description
|
This
method explicitly initializes BCL, that is it tests whether a license for running this software is available. Without this explicit initialization the initialization will be performed at the creation of the first problem (see
XPRBprob). There is no need to call this explicit initialization unless you wish to separate the license check from problem creation or perform some general settings before creating any problem. This method also initializes Xpress Optimizer. In applications that create a large number of problems it is recommended to use the explicit initialization—once only per process for highest efficiency.
|
||||||||||||
Example
|
This example shows how to initialize BCL explicitly before creating a problem.
XPRBprob *prob; if (XPRB::init()) { cout << "Initialization failed" << endl; return 1; } prob = new XPRBprob("myprob"); |
||||||||||||
Related topics
|
Calls
XPRBinit
|
||||||||||||
setColOrder
|
|||||||||||||
Synopsis
|
int setColOrder(int num);
|
||||||||||||
Argument
|
|
||||||||||||
Return value
|
0 if method executed successfully, 1 otherwise.
|
||||||||||||
Description
|
1.
BCL runs reproduce always the same matrix for a problem. This method allows the user to choose a different ordering criterion than the default one. Note that this method only changes the order of columns in what is sent to Xpress Optimizer, you do not see any effect when exporting the matrix with BCL. However you can control the effect by exporting the matrix from the Optimizer.
2. The setting applies to all problems that are created subsequently. It is also possible to change the setting for a particular problem (see
XPRBprob).
|
||||||||||||
Related topics
|
Calls
XPRBsetcolorder
|
||||||||||||
setMsgLevel
|
|||||||||||||
Synopsis
|
int setMsgLevel(int lev);
|
||||||||||||
Argument
|
|
||||||||||||
Return value
|
0 if method executed successfully, 1 otherwise.
|
||||||||||||
Description
|
1.
BCL can produce different types of messages; status information, warnings and errors. This function controls which of these are output. For settings
1 or higher, the corresponding Optimizer output is also displayed. In addition to this setting, the amount of Optimizer output can be modified through several Optimizer printing control parameters (see the `Xpress Optimizer Reference Manual').
2. The setting applies to all problems that are created subsequently. It is also possible to change the setting for a particular problem (see
XPRBprob).
|
||||||||||||
Example
|
See
XPRBprob.setMsgLevel.
|
||||||||||||
Related topics
|
Calls
XPRBsetmsglevel
|
||||||||||||
setRealFmt
|
|||||||||||||
Synopsis
|
int setRealFmt(String fmt);
|
||||||||||||
Argument
|
|
||||||||||||
Return value
|
0 if method executed successfully, 1 otherwise.
|
||||||||||||
Description
|
1. In problems with very large or very small numbers it may become necessary to change the printing format to obtain a more exact output. In particular, by changing the precision it is possible to reduce the difference between matrices loaded in memory into Xpress Optimizer and the output produced by exporting them to a file.
2. The setting applies to all problems that are created subsequently. It is also possible to change the setting for a particular problem (see
XPRBprob).
|
||||||||||||
Example
|
This example sets the BCL number printing format to 8 digits after the decimal point. It then creates a problem and changes the number printing format for this problem back to the default:
XPRBprob *prob; XPRB::init(); XPRB::setRealFmt("%.10f"); prob = new XPRBprob("myprob"); prob->setRealFmt("%g"); |
||||||||||||
Related topics
|
Calls
XPRBsetrealfmt
|
||||||||||||
|
© 2001-2025 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.