Initializing help system before first use

XPRBloadmipsol

XPRBloadmipsol


Purpose
Load an integer solution into BCL or the Optimizer.
Synopsis
int XPRBloadmipsol(XPRBprob prob, double *sol, int ncol, int ifopt);
Arguments
prob 
Reference to a problem.
sol 
Array of size ncol holding the solution values.
ncol 
Number of variables (continuous+discrete) in the problem.
ifopt 
Whether to load the solution into the Optimizer:
load into BCL only;
load solution into the Optimizer.
Return value
solution accepted,
solution rejected because it is infeasible,
solution rejected because it is cut off,
solution rejected because the LP reoptimization was interrupted,
-1 
solution rejected because an error occurred,
-2 
the given solution array does not have the expected size,
-3 
error loading solution into BCL.
Example
Load a MIP solution for problem expl2 into BCL, but not into the Optimizer. We know that the problem has 5 variables.
XPRBprob expl2;
double vals[] = {1.5, 1, 0, 4, 2.2};
expl2 = XPRBnewprob("example2");
   ...
if (XPRBloadmipsol(expl2, vals, 5, 0)!=0)
 printf("Loading the solution failed.\n");
Further information
1. This function loads a MIP solution from an external source ( e.g., the Xpress MIP Solution Pool) into BCL or the Optimizer. The solution is given in the form of an array, indexed by the column numbers of the decision variables. The size ncol of the array must correspond to the number of columns in the matrix (generated by a call to XPRBloadmat or by starting an optimization run from BCL). If the solution is loaded into BCL the values are accepted as is, if the solution is loaded into the Optimizer ( ifopt = 1), the Optimizer will check whether the solution is acceptable and recalculates the values for the continuous variables in the solution. In the latter case the solution is loaded into BCL only once it has been successfully loaded and validated by the Optimizer.
2. If the matrix loaded in the Optimizer does not correspond to the current state of the specified problem definition, it is regenerated automatically before loading the solution.
Related topics

© 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.