XPRBsolve


Purpose
Call the Xpress-Optimizer solution algorithm.
Synopsis
int XPRBsolve(XPRBprob prob, char *alg);
Arguments
prob 
Reference to a problem.
alg 
Choice of the solution algorithm, which should be one of:
" " 
solve the problem using the recommended LP/QP algorithm (MIP problems remain in presolved state);
"d" 
solve the problem using the dual simplex algorithm;
"p" 
solve the problem using the primal simplex algorithm;
"b" 
solve the problem using the Newton barrier algorithm;
"n" 
use the network solver (LP only);
"l" 
relax all global entities (integer variables etc) in a MIP/MIQP problem and solve it as a LP problem (problem is postsolved);
"g" 
solve the problem using the MIP/MIQP algorithm. If a MIP/MIQP problem is solved without this flag, only the initial LP/QP problem will be solved.
Return value
0 if function executed successfully, 1 otherwise.
Example
The following code uses the primal simplex algorithm to solve expl2 as a MIP, assuming that it contains global entities.
XPRBprob expl2;
expl2 = XPRBnewprob("example2");
 ...
XPRBsolve(expl2, "pg");
Further information
This function selects and starts the Xpress-Optimizer solution algorithm. The characters indicating the algorithm choice may be combined where it makes sense, e.g. "dg. If the matrix loaded in the Optimizer does not correspond to the current state of the specified problem definition it is regenerated automatically prior to the start of the algorithm. Matrix reloading can also be forced by calling XPRBsync before the optimization. The sense of the optimization (default: minimization) can be changed with function XPRBsetsense. Before solving a problem, the objective function must be selected with XPRBsetobj. Note that if you use an incomplete global search you should finish your program with a call to the Optimizer library function XPRSinitglobal in order to remove all search tree information that has been stored. Otherwise you may not be able to re-run your program.
Related topics
XPRBgetsense, XPRBmaxim, XPRBminim, XPRBsetsense, XPRBsync.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.