Initializing help system before first use

XPRSfixmipentitiessolution

Purpose
Fixes all the MIP entities to the values of the specified MIP solution values. This is useful for finding the reduced costs for the continuous variables after the integer variables have been fixed to their optimal values. For an infeasible MIP solution, this function prepares the problem to compute an Irreducible Infeasible Set (IIS) that explains the infeasibility of the integer assignment.
Topic areas
Synopsis
int XPRSfixmipentitiessolution(XPRSprob prob, int length, const double solval[], const int colind[], int options);
Arguments
prob 
The current problem.
length 
Number of columns for which a value is provided.
solval 
Double array of length length containing solution values.
colind 
Optional integer array of length length containing column indices from 0 to INPUTCOLS -1, for the solution values provided in solval. Duplicate entries are not allowed. May be NULL when solval provides a complete solution vector, in which case solval should have INPUTCOLS elements.
options 
Options how to fix the MIP entities.
Bit
Meaning
0 
If all MIP entities should be rounded to the nearest discrete value in the solution before being fixed.
1 
If piecewise linear and general constraints as well as partial integers should be kept in the problem with only the non-convex decisions (i.e. which part of a non-convex piecewise linear function, which variable attains a maximum or the integer part of the partial integer) fixed. Otherwise all variables appearing in piecewise linear or general constraints and all partial integers will be fixed.
Example
This example loads a full solution into myprob via XPRSfixmipentitiessolution before solving the remaining linear problem:
XPRSreadprob(prob,"myprob","");
int ncols;
double *solvals;
XPRSgetintattrib(prob, XPRS_INPUTCOLS, &ncols);
/* further logic to fill solvals */
XPRSfixmipentitiessolution(prob, ncols, solvals, NULL, 1);
XPRSlpoptimize(prob," ");
XPRSwriteprtsol(prob);
Further information
1. This function has irreversible effects on the problem, as constraints may be dropped to facilitate solution analysis. Consider using a problem copy if the original data should be kept intact.
2. Partial input solutions must assign values for all MIP entities as well as continuous columns that occur in sets (SOS1 / SOS2), piecewise linear, and general constraints.
3. Because of tolerances, it is possible for e.g. a binary variable to be slightly fractional in the MIP solution, where it might have the value 0.999999 instead of being at exactly 1.0. With ifround = 0, such a binary will be fixed at 0.999999, but with ifround = 1, it will be fixed at 1.0.
4. This function is useful for inspecting the reduced costs of the continuous variables in a matrix after the MIP entities have been fixed. Sensitivity analysis can also be performed on the continuous variables in a MIP problem using XPRSrhssa, XPRSobjsa or XPRSbndsa after calling XPRSfixmipentitiessolution.
5. This function is closely related to XPRSfixmipentities. Use XPRSfixmipentitiessolution whenever the input solution is not the result of a previous solve on the same problem.
6. For nonlinear problems, one can call XPRSfixmipentitiessolution for an initial solution returned by the MIP search and then reoptimize the problem using a local solver ( XPRSnlpoptimize). to obtain an approximation of the dual values
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.