XPRSfixglobals (FIXGLOBALS)
XPRSfixglobals |
FIXGLOBALS |
Purpose
Fixes all the
global entities to the values of the last found MIP solution. This is useful for finding the
reduced costs for the continuous variables after the global variables have been fixed to their optimal values.
Synopsis
int XPRS_CC XPRSfixglobals(XPRSprob prob, int options);
FIXGLOBALS [-flags]
Arguments
prob
|
The current problem.
|
||||||
options
|
Options how to fix the globals.
|
||||||
Values
|
|
||||||
flags
|
Flags to pass to FIXGLOBALS:
|
Example 1 (Library)
This example performs a global search on problem
myprob and then uses
XPRSfixglobals before solving the remaining linear problem:
XPRSreadprob(prob,"myprob",""); XPRSmipoptimize(prob," "); XPRSfixglobals(prob, 1); XPRSlpoptimize(prob," "); XPRSwriteprtsol(prob);
Example 2 (Console)
A similar set of commands at the console would be as follows:
READPROB MIPOPTIMIZE FIXGLOBALS -r LPOPTIMIZE PRINTSOL
Further information
1. 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.
2. This command is useful for inspecting the reduced costs of the continuous variables in a matrix after the global entities have been fixed.
Sensitivity analysis can also be performed on the continuous variables in a MIP problem using
XPRSrhssa or
XPRSobjsa after calling
XPRSfixglobals (
FIXGLOBALS).
Related topics