Xpress Optimizer Refernce Manual
Xpress Optimizer Refernce Manual
Xpress-Optimizer
Reference manual
Release 20.00
WORLDWIDE
Email: XpressSalesUK@[Link]
Tel: +44 1926 315862
Fax: +44 1926 315854
FICO, Xpress team
Leam House, 64 Trinity Street
Leamington Spa
Warwickshire CV32 5YN
UK
Product Support
Email: Support@[Link]
(Please include ’Xpress’ in the subject line)
Telephone:
NORTH AMERICA
Tel (toll free): +1 (877) 4FI-SUPP
Fax: +1 (402) 496-2224
EUROPE, MIDDLE EAST, AFRICA
Tel: +44 (0) 870-420-3777
UK (toll free): 0800-0152-153
South Africa (toll free): 0800-996-153
Fax: +44 (0) 870-420-3778
ASIA-PACIFIC, LATIN AMERICA, CARIBBEAN
Tel: +1 (415) 446-6185
Brazil (toll free): 0800-891-6146
For the latest news and Xpress software and documentation updates, please visit the Xpress website at
[Link] or subscribe to our mailing list.
Contents
1 Introduction 1
1.1 The FICO Xpress Optimizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Starting the First Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Starting Console Xpress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.3 Scripting Console Xpress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.4 Interrupting Console Xpress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Manual Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Basic Usage 6
2.0.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.0.2 The Problem Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.0.3 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.0.4 Problem Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.0.5 Problem Solving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.0.6 Interrupting the Solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.0.7 Results Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1 Function Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.1 Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.2 Problem loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.3 Problem solving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1.4 Results processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 Problem Types 13
3.1 Linear Programs (LPs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Mixed Integer Programs (MIPs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Quadratic Programs (QPs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 Quadratically Constrained Quadratic Programs (QCQPs) . . . . . . . . . . . . . . . . . . 14
3.4.1 Algebraic and matrix form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4.2 Convexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4.3 Characterizing Convexity in Quadratic Constraints . . . . . . . . . . . . . . . . . 15
3.5 Nonlinear Programs (NLPs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 Solution Methods 17
4.1 Simplex Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1.1 Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 Newton Barrier Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.1 Crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.2 Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Branch and Bound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3.1 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3.2 Node and Variable Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.3 Variable Selection for Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 Advanced Usage 26
5.1 Problem Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Manipulating the Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2.1 Reading the Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.2 Modifying the Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3 Working with Presolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.1 (Mixed) Integer Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.2 Common Causes of Confusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4 Using the Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4.1 Optimizer Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4.2 LP Search Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.4.3 Global Search Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.5 Working with the Cut Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5.1 Cuts and the Cut Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5.2 Cut Management Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5.3 User Cut Manager Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.6 Solving Problems Using Multiple Threads . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7 Goal Programming 41
7.0.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.0.4 Pre-emptive Goal Programming Using Constraints . . . . . . . . . . . . . . . . . 41
7.0.5 Archimedean Goal Programming Using Constraints . . . . . . . . . . . . . . . . 42
7.0.6 Pre-emptive Goal Programming Using Objective Functions . . . . . . . . . . . . 42
7.0.7 Archimedean Goal Programming Using Objective Functions . . . . . . . . . . . 43
Contents c
2009 Fair Isaac Corporation. All rights reserved. page ii
Further Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Related Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
XPRS_bo_addbounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
XPRS_bo_addbranches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
XPRS_bo_addrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
XPRS_bo_create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
XPRS_bo_destroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
XPRS_bo_getbounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
XPRS_bo_getbranches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
XPRS_bo_getlasterror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
XPRS_bo_getrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
XPRS_bo_setcbmsghandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
XPRS_bo_setpreferredbranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
XPRS_bo_setpriority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
XPRS_bo_store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
XPRS_ge_getlasterror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
XPRS_ge_setcbmsghandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
XPRS_nml_addnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
XPRS_nml_copynames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
XPRS_nml_create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
XPRS_nml_destroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
XPRS_nml_findname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
XPRS_nml_getlasterror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
XPRS_nml_getmaxnamelen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
XPRS_nml_getnamecount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
XPRS_nml_getnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
XPRS_nml_removenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
XPRS_nml_setcbmsghandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
XPRSaddcols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
XPRSaddcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
XPRSaddnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
XPRSaddqmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
XPRSaddrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
XPRSaddsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
XPRSaddsetnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
XPRSalter (ALTER) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
XPRSbasiscondition (BASISCONDITION) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
XPRSbtran . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
CHECKCONVEXITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
XPRSchgbounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
XPRSchgcoef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
XPRSchgcoltype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
XPRSchgmcoef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
XPRSchgmqobj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
XPRSchgobj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
XPRSchgobjsense (CHGOBJSENSE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
XPRSchgqobj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
XPRSchgqrowcoeff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
XPRSchgrhs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
XPRSchgrhsrange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
XPRSchgrowtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
XPRScopycallbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
XPRScopycontrols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
XPRScopyprob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
XPRScreateprob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Contents c
2009 Fair Isaac Corporation. All rights reserved. page iii
XPRSdelcols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
XPRSdelcpcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
XPRSdelcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
XPRSdelindicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
XPRSdelnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
XPRSdelqmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
XPRSdelrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
XPRSdelsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
XPRSdestroyprob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
DUMPCONTROLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
XPRSfixglobals (FIXGLOBALS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
XPRSfree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
XPRSftran . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
XPRSgetbanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
XPRSgetbasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
XPRSgetcbbariteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
XPRSgetcbbarlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
XPRSgetcbchgbranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
XPRSgetcbchgbranchobject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
XPRSgetcbchgnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
XPRSgetcbcutlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
XPRSgetcbcutmgr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
XPRSgetcbdestroymt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
XPRSgetcbestimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
XPRSgetcbgloballog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
XPRSgetcbinfnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
XPRSgetcbintsol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
XPRSgetcblplog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
XPRSgetcbmessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
XPRSgetcbmipthread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
XPRSgetcbnewnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
XPRSgetcbnlpevaluate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
XPRSgetcbnlpgradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
XPRSgetcbnlphessian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
XPRSgetcbnodecutoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
XPRSgetcboptnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
XPRSgetcbpreintsol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
XPRSgetcbprenode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
XPRSgetcbsepnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
XPRSgetcoef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
XPRSgetcolrange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
XPRSgetcols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
XPRSgetcoltype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
XPRSgetcpcutlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
XPRSgetcpcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
XPRSgetcutlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
XPRSgetcutmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
XPRSgetcutslack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
XPRSgetdaysleft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
XPRSgetdblattrib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
XPRSgetdblcontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
XPRSgetdirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
XPRSgetglobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
XPRSgetiisdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Contents c
2009 Fair Isaac Corporation. All rights reserved. page iv
XPRSgetindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
XPRSgetindicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
XPRSgetinfeas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
XPRSgetintattrib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
XPRSgetintcontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
XPRSgetlasterror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
XPRSgetlb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
XPRSgetlicerrmsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
XPRSgetlpsol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
XPRSgetmessagestatus (GETMESSAGESTATUS) . . . . . . . . . . . . . . . . . . . . . . . . . . 171
XPRSgetmipsol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
XPRSgetmqobj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
XPRSgetnamelist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
XPRSgetnamelistobject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
XPRSgetnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
XPRSgetobj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
XPRSgetobjecttypename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
XPRSgetpivotorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
XPRSgetpivots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
XPRSgetpresolvebasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
XPRSgetpresolvemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
XPRSgetpresolvesol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
XPRSgetprobname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
XPRSgetqobj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
XPRSgetqrowcoeff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
XPRSgetqrowqmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
XPRSgetqrowqmatrixtriplets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
XPRSgetqrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
XPRSgetrhs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
XPRSgetrhsrange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
XPRSgetrowrange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
XPRSgetrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
XPRSgetrowtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
XPRSgetscaledinfeas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
XPRSgetstrattrib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
XPRSgetstrcontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
XPRSgetub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
XPRSgetunbvec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
XPRSgetversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
XPRSglobal (GLOBAL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
XPRSgoal (GOAL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
IIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
XPRSiisall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
XPRSiisclear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
XPRSiisfirst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
XPRSiisisolations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
XPRSiisnext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
XPRSiisstatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
XPRSiiswrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
XPRSinit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
XPRSinitglobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
XPRSinitializenlphessian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
XPRSinitializenlphessian_indexpairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
XPRSinterrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Contents c
2009 Fair Isaac Corporation. All rights reserved. page v
XPRSloadbasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
XPRSloadbranchdirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
XPRSloadcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
XPRSloaddelayedrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
XPRSloaddirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
XPRSloadglobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
XPRSloadlp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
XPRSloadmipsol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
XPRSloadmodelcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
XPRSloadqcqp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
XPRSloadqcqpglobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
XPRSloadpresolvebasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
XPRSloadpresolvedirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
XPRSloadqglobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
XPRSloadqp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
XPRSloadsecurevecs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
XPRSlpoptimize (LPOPTIMIZE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
XPRSmaxim, XPRSminim (MAXIM, MINIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
XPRSmipoptimize (MIPOPTIMIZE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
XPRSobjsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
XPRSpivot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
XPRSpostsolve (POSTSOLVE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
XPRSpresolverow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
PRINTRANGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
PRINTSOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
XPRSrange (RANGE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
XPRSreadbasis (READBASIS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
XPRSreadbinsol (READBINSOL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
XPRSreaddirs (READDIRS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
XPRSreadprob (READPROB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
XPRSreadslxsol (READSLXSOL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
XPRSrepairinfeas (REPAIRINFEAS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
XPRSrepairweightedinfeas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
XPRSresetnlp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
XPRSrestore (RESTORE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
XPRSrhssa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
XPRSsave (SAVE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
XPRSscale (SCALE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
XPRSsetbranchbounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
XPRSsetbranchcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
XPRSsetcbbariteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
XPRSsetcbbarlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
XPRSsetcbchgbranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
XPRSsetcbchgbranchobject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
XPRSsetcbchgnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
XPRSsetcbcutlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
XPRSsetcbcutmgr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
XPRSsetcbdestroymt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
XPRSsetcbestimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
XPRSsetcbgloballog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
XPRSsetcbinfnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
XPRSsetcbintsol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
XPRSsetcblplog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
XPRSsetcbmessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Contents c
2009 Fair Isaac Corporation. All rights reserved. page vi
XPRSsetcbmipthread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
XPRSsetcbnewnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
XPRSsetcbnlpevaluate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
XPRSsetcbnlpgradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
XPRSsetcbnlphessian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
XPRSsetcbnodecutoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
XPRSsetcboptnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
XPRSsetcbpreintsol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
XPRSsetcbprenode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
XPRSsetcbsepnode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
XPRSsetdblcontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
XPRSsetdefaultcontrol (SETDEFAULTCONTROL) . . . . . . . . . . . . . . . . . . . . . . . . . . 308
XPRSsetdefaults (SETDEFAULTS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
XPRSsetindicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
XPRSsetintcontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
XPRSsetlogfile (SETLOGFILE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
XPRSsetmessagestatus (SETMESSAGESTATUS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
XPRSsetprobname (SETPROBNAME) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
XPRSsetstrcontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
XPRSstorebounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
XPRSstorecuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
XPRSwritebasis (WRITEBASIS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
XPRSwritebinsol (WRITEBINSOL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
XPRSwritedirs (WRITEDIRS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
XPRSwriteprob (WRITEPROB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
XPRSwriteprtrange (WRITEPRTRANGE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
XPRSwriteprtsol (WRITEPRTSOL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
XPRSwriterange (WRITERANGE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
XPRSwriteslxsol (WRITESLXSOL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
XPRSwritesol (WRITESOL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Contents c
2009 Fair Isaac Corporation. All rights reserved. page vii
CACHESIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
CHOLESKYALG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
CHOLESKYTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
COVERCUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
CPUTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
CRASH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
CROSSOVER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
CSTYLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
CUTDEPTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
CUTFACTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
CUTFREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
CUTSTRATEGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
CUTSELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
DEFAULTALG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
DEGRADEFACTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
DENSECOLLIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
DETERMINISTIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
DUALGRADIENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
DUALIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
DUALSTRATEGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
EIGENVALUETOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
ELIMTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
ETATOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
EXTRACOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
EXTRAELEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
EXTRAMIPENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
EXTRAPRESOLVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
EXTRAQCELEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
EXTRAQCROWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
EXTRAROWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
EXTRASETELEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
EXTRASETS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
FEASIBILITYPUMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
FEASTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
FORCEOUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
GLOBALFILEBIAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
GOMCUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
HEURDEPTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
HEURDIVERANDOMIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
HEURDIVESPEEDUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
HEURDIVESTRATEGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
HEURFREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
HEURMAXSOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
HEURNODES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
HEURSEARCHEFFORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
HEURSEARCHFREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
HEURSEARCHROOTSELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
HEURSEARCHTREESELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
HEURSTRATEGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
HEURTHREADS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
HISTORYCOSTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
IFCHECKCONVEXITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
INDLINBIGM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
INVERTFREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
INVERTMIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Contents c
2009 Fair Isaac Corporation. All rights reserved. page viii
KEEPBASIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
KEEPMIPSOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
KEEPNROWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
L1CACHE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
LINELENGTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
LNPBEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
LNPITERLIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
LPITERLIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
LOCALCHOICE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
LPLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
LPTHREADS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
MARKOWITZTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
MATRIXTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
MAXCUTTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
MAXGLOBALFILESIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
MAXIIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
MAXMIPSOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
MAXNODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
MAXPAGELINES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
MAXSCALEFACTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
MAXTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
MIPABSCUTOFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
MIPABSSTOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
MIPADDCUTOFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
MIPLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
MIPPRESOLVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
MIPRELCUTOFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
MIPRELSTOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
MIPTARGET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
MIPTHREADS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
MIPTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
MPS18COMPATIBLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
MPSBOUNDNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
MPSECHO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
MPSFORMAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
MPSNAMELENGTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
MPSOBJNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
MPSRANGENAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
MPSRHSNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
MUTEXCALLBACKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
NODESELECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
OPTIMALITYTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
OUTPUTLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
OUTPUTMASK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
OUTPUTTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
PENALTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
PERTURB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
PIVOTTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
PPFACTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
PRECOEFELIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
PREDOMCOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
PREDOMROW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
PREPROBING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
PRESOLVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
PRESOLVEOPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Contents c
2009 Fair Isaac Corporation. All rights reserved. page ix
PRICINGALG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
PRIMALOPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
PRIMALUNSHIFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
PROBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
PSEUDOCOST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
QUADRATICUNSHIFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
REFACTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
RELPIVOTTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
REPAIRINDEFINITEQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
ROOTPRESOLVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
SBBEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
SBEFFORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
SBESTIMATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
SBITERLIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
SBSELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
SCALING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
SOLUTIONFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
SOSREFTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
TEMPBOUNDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
THREADS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
TRACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
TREECOMPRESSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
TREECOVERCUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
TREECUTSELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
TREEDIAGNOSTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
TREEGOMCUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
TREEMEMORYLIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
TREEMEMORYSAVINGTARGET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
VARSELECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
VERSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Contents c
2009 Fair Isaac Corporation. All rights reserved. page x
ERRORCODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
GLOBALFILESIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
GLOBALFILEUSAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
INDICATORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
LPOBJVAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
LPSTATUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
MATRIXNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
MIPENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
MIPINFEAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
MIPOBJVAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
MIPSOLNODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
MIPSOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
MIPSTATUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
MIPTHREADID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
NAMELENGTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
NLPHESSIANELEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
NODEDEPTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
NODES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
NUMIIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
OBJNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
OBJRHS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
OBJSENSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
ORIGINALCOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
ORIGINALROWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
PARENTNODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
PENALTYVALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
PRESOLVESTATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
PRIMALINFEAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
QCELEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
QCONSTRAINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
QELEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
RANGENAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
RHSNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
ROWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
SIMPLEXITER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
SETMEMBERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
SETS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
SPARECOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
SPAREELEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
SPAREMIPENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
SPAREROWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
SPARESETELEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
SPARESETS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
STOPSTATUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
SUMPRIMALINF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
TREEMEMORYUSAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Appendix 431
A Log and File Formats 432
Contents c
2009 Fair Isaac Corporation. All rights reserved. page xi
A.1 File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
A.2 XMPS Matrix Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
A.2.1 NAME section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
A.2.2 ROWS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
A.2.3 COLUMNS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
A.2.4 QUADOBJ / QMATRIX section (Quadratic Programming only) . . . . . . . . . . 434
A.2.5 QCMATRIX section (Quadratic Constraint Programming only) . . . . . . . . . . 435
A.2.6 DELAYEDROWS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
A.2.7 MODELCUTS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
A.2.8 INDICATORS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
A.2.9 SETS section (Integer Programming only) . . . . . . . . . . . . . . . . . . . . . . 437
A.2.10 RHS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
A.2.11 RANGES section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
A.2.12 BOUNDS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
A.2.13 ENDATA section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
A.3 LP File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
A.3.1 Rules for the LP file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
A.3.2 Comments and blank lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
A.3.3 File lines, white space and identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 440
A.3.4 Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
A.3.5 Variable names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
A.3.6 Linear expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
A.3.7 Objective function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
A.3.8 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
A.3.9 Delayed rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
A.3.10 Model cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
A.3.11 Indicator contraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
A.3.12 Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
A.3.13 Generals, Integers and binaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
A.3.14 Semi-continuous and semi-integer . . . . . . . . . . . . . . . . . . . . . . . . . . 445
A.3.15 Partial integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
A.3.16 Special ordered sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
A.3.17 Quadratic programming problems . . . . . . . . . . . . . . . . . . . . . . . . . . 447
A.3.18 Quadratic Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
A.3.19 Extended naming convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
A.4 ASCII Solution Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
A.4.1 Solution Header .hdr Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
A.4.2 CSV Format Solution .asc Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
A.4.3 Fixed Format Solution (.prt) Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
A.4.4 ASCII Solution (.slx) Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
A.5 ASCII Range Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
A.5.1 Solution Header (.hdr) Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
A.5.2 CSV Format Range (.rsc) Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
A.5.3 Fixed Format Range (.rrt) Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
A.6 The Directives (.dir) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
A.7 IIS description file in CSV format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
A.8 The Matrix Alteration (.alt) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
A.8.1 Changing Upper or Lower Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . 456
A.8.2 Changing Right Hand Side Coefficients . . . . . . . . . . . . . . . . . . . . . . . 456
A.8.3 Changing Constraint Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
A.9 The Simplex Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
A.10 The Barrier Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
A.11 The Global Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Contents c
2009 Fair Isaac Corporation. All rights reserved. page xii
Index 460
Contents c
2009 Fair Isaac Corporation. All rights reserved. page xiii
Chapter 1
Introduction
1.2.1 Licensing
To run the Optimizer from any interface it is necessary to have a valid licence file, [Link].
The FICO Xpress licensing system is highly flexible and is easily configurable to cater for the user’s
requirements. The system can allow the Optimizer to be run on a specific machine, on a machine
with a specific ethernet address or on a machine connected to an authorized hardware dongle.
If the Optimizer fails to verify a valid license then a message can be obtained that describes the
reasons for the failure and the Optimizer will be unusable. When using the Console Xpress the
licensing failure message will be displayed on the console. Library users can call the function
XPRSgetlicerrmsg to get the licensing failure message.
On Windows operating systems the Optimizer searches for the license file in the directory
containing the installation’s binary executables, which are installed by default into the
c:\XpressMP\bin folder. On Unix systems the directory pointed to by the XPRESS environment
variable is searched. Note that to avoid unnecessary licensing problems the user should ensure
that the license file is always kept in the same directory as the FICO Xpress Licensing Library (e.g.,
[Link] on Windows).
From the command line an initial problem name can be optionally specified together with an
optional second argument specifying a text "script" file from which the console input will be read
as if it had been typed interactively.
Note that the syntax example above shows the command as if it were input from the Windows
Command Prompt (i.e., it is prefixed with the command prompt string C:\>). For Windows users
Console Xpress can also be started by typing optimizer into the "Run ..." dialog box in the Start
menu.
The Console Xpress provides a quick and convenient interface for operating on a single problem
loaded into the Optimizer. Compare this with the more powerful library interface that allows one
or more problems to co–exist in a process. The Console Xpress problem contains the problem data
as well as (i) control variables for handling and solving the problem and (ii) attributes of the
problem and its solution information.
Introduction c
2009 Fair Isaac Corporation. All rights reserved. page 2
Useful features of Console Xpress include support for command help, auto–completion of
command names and integration of system commands.
Typing "help" will list the various options for getting help. Typing "help commands" will list
available commands. Typing "help attributes" and "help controls" will list the available
attributes and controls, respectively. Typing "help" followed by a command name or
control/attribute name will list the help for the item. For example, typing "help minim" will get
help for the MINIM command.
The Console Xpress auto–completion feature is a useful way of reducing key strokes when issuing
commands. To use the auto–completion feature, type the first part of an optimizer command
name followed by the Tab key. For example, by typing "min" followed by the Tab key or "max"
followed by the Tab key Console Xpress will complete to the MINIM and MAXIM commands,
respectively. Note that once you have finished inputting the command name portion of your
command line, Console Xpress can also auto–complete on file names. For example, if you have a
matrix file named [Link] in the current working directory then by typing "readprob hpw"
followed by the Tab key the command should auto–complete to the string "readprob
[Link]". Entering this command will have Console Xpress call the XPRSreadprob
(READPROB) function to load the matrix file into the optimizer. Note that the auto–completion of
file names is case–sensitive.
Console Xpress also features integration with the operating system’s shell commands. For
example, by typing "dir" (or "ls" under Unix) you will directly run the operating system’s
directory listing command. Using the "cd" command will change the working directory, which
will be indicated in the prompt string:
[xpress bin] cd \
[xpress C:\]
Finally, note that when the Console Xpress is first started it will attempt to read in an
initialization file named [Link] from the current working directory. This is an ASCII
"script" file that may contain commands to be run at start up, which are intended to setup a
customized default Console Xpress environment for the user (e.g., defining custom controls
settings on the Console Xpress problem).
The following shows how this would usually be achieved using TCL syntax:
Introduction c
2009 Fair Isaac Corporation. All rights reserved. page 3
[xpress C:\] $miplog
3
The following set of examples demonstrate how with the use of some simple TCL commands and
some basic flow control constructs the user can quickly and easily create powerful programs.
The first example demonstrates a loop through a list of matrix files where a simple regular
expression on the matrix file name and a simple condition on the number of rows in the problem
decide whether or not the problem is solved using minim. Note the use of:
• the creation of a list of file names using the TCL glob command
• the use of the TCL square bracket notation ([]) for evaluating commands to their string
result value
• the TCL foreach loop construct iterating over the list of file names
• dereferencing the string value of a variable using ’$’
• the use of the TCL regexp regular expression command
• the two TCL if statements and their condition statements
• the use of the two Optimizer commands READPROB and MINIM
• the TCL continue command used to skip to the next loop iteration
The second example demonstrates a loop though some control settings and the tracking of the
control setting that gave the best performance. Note the use of:
• the TCL for loop construct iterating over the values of variable i from -1 to 3
• console output formatting with the TCL puts command
• setting the values of Optimizer controls CUTSTRATEGY and MAXNODE
• multiple commands per line separated using a semicolon
• use of the MIPSTATUS problem attribute in the TCL if statement
• comment lines using the hash character ’#’
Introduction c
2009 Fair Isaac Corporation. All rights reserved. page 4
1.2.4 Interrupting Console Xpress
Console Xpress users may interrupt the running of the commands (e.g., minim) by typing Ctrl–C.
Once interrupted Console Xpress will return to its command prompt. If an optimization algorithm
has been interrupted in this way, any solution process will stop at the first ’safe’ place before
returning to the prompt. Optimization iterations may be resumed by re–entering the interrupted
command. Note that by using this interrupt–resume functionality the user has a convenient way
of dynamically changing controls during an optimization run.
When Console Xpress is being run with script input then Ctrl–C will not return to the command
prompt and the Console Xpress process will simply stop.
Lastly, note that "typing ahead" while the console is writing output to screen can cause Ctrl–C
input to fail on some operating systems.
Introduction c
2009 Fair Isaac Corporation. All rights reserved. page 5
Chapter 2
Basic Usage
The FICO Xpress Optimization Suite is a powerful and flexible framework catering for the
development of a wide range of optimization applications. From the script–based Console Xpress
providing rapid development access to a subset of Optimizer functionality (Console Mode) to the
more advanced, high performance access to the superset of Optimizer functionality through the
library interface.
In the previous section we looked at the Console Xpress interface and introduced some basic
functions that all FICO Xpress Optimizer users should be familiar with. In this section we expand
on the discussion and include some basic functions of the library interface.
2.0.1 Initialization
Before the FICO Xpress Optimization Suite can be used from any of the interfaces the Optimizer
library must be initialized and the licensing status successfully verified. Details about licensing
your installation can be found in Installation and Licensing User Guide.
When Console Xpress is started from the command line the initialization and licensing security
checks happen immediately and the results displayed with the banner in the console window. For
the library interface users, the initialization and licensing are triggered by a call to the library
function XPRSinit, which must be made before any of the other Optimizer library routines can
be successfully called. If the licensing security checks fail to check out a license then library users
can obtain a string message explaining the issue using the function XPRSgetlicerrmsg.
Note that it is recommended that the users having licensing problems use the Console Xpress as a
means of checking the licensing status while resolving the issues. This is because it is the quickest
and easiest way to check and display the licensing status.
Once the Optimizer functionality is no longer required the license and any system resources held
by the Optimizer should be released. The Console Xpress releases these automatically when the
user exits the Console Xpress with the QUIT or STOP command. For library users the Optimizer
can be triggered to release its resources with a call to the routine XPRSfree, which will free the
license checked out in the earlier call to XPRSinit.
{
if(XPRSinit(NULL)) printf("Problem with XPRSinit\n");
XPRSfree();
}
In general, library users will call XPRSinit once when their application starts and then call
XPRSfree before it exits. This approach is recommended since calls to XPRSinit can have
non–negligible (approx. 0.5sec) overhead when using floating network licensing
{
XPRSprob prob;
XPRScreateprob(&prob);
XPRSdestroyprob(prob);
}
2.0.3 Logging
The Optimizer provides useful text logging messages for indicating progress during the
optimization algorithms and for indicating the status of certain important commands such as
XPRSreadprob. The messages from the optimization algorithms each report information on an
iteration of the algorithm. The most important use of the logging, however, is to convey error
messages reported by the Optimizer. Note that once a system is in production the error messages
are typically the only messages of interest to the user.
Conveniently, the Console Xpress automatically writes the logging messages for its problem
pointer to the console screen. Although message management for the library users is more
complicated than for Console Xpress users, library users have more flexibility with the handling
and routing of messages. The library user can route messages directly to file or they can intercept
the messages via callback and marshal the message strings to appropriate destinations depending
on the type of message and/or the problem pointer from which the message originates.
To write the messages sent from a problem pointer directly to file the user can call
XPRSsetlogfile with specification of an output file name. To get messages sent from a
problem pointer to the library user’s application the user will define and then register a
messaging callback function with a call to the XPRSsetcbmessage routine.
{
XPRSprob prob;
XPRScreateprob(&prob);
XPRSsetlogfile(prob, "[Link]");
XPRSdestroyprob(prob);
}
Note that a high level messaging framework is also available — which handles messages from all
Basic Usage c
2009 Fair Isaac Corporation. All rights reserved. page 7
problem pointers created by the Optimizer library and messages relating to initialization of the
library itself — by calling the XPRS_ge_setcbmsghandler function. A convenient use of this
callback, particularly when developing and debugging an application, is to trap all messages to
file. The following line of code shows how to use the library function XPRSlogfilehandler
together with XPRS_ge_setcbmsghandler to write all library message output to the file
[Link].
XPRS_ge_setcbmsghandler(XPRSlogfilehandler, "[Link]");
{
XPRSprob prob;
XPRScreateprob(&prob);
XPRSsetlogfile(prob, "[Link]");
XPRSreadprob(prob, "hpw15", "");
XPRSdestroyprob(prob);
}
Library users can construct the problem in their own arrays and then load this problem
specification using one of the functions XPRSloadlp, XPRSloadqp, XPRSloadglobal,
XPRSloadqglobal or XPRSloadqcqpglobal. During the problem load routine the Optimizer
will use the user’s data to construct the internal problem representation in new memory that is
associated with the problem pointer. Note, therefore, that the user’s arrays can be freed
immediately after the call. Once the problem has been loaded, any subsequent call to one of
these load routines will overwrite the problem currently represented in the problem pointer.
The names of the problem loading routines indicate the type of problem that can be represented
using the routine. The following table outlines the components of an optimization problem as
denoted by the codes used in the function names.
Many of the array arguments of the load routines can optionally take NULL pointers if the
associated component of the problem is not required to be defined. Note, therefore, that the
user need only use the XPRSloadqcqpglobal routine to load any problem that can be loaded by
the other routines.
Finally, note that the names of the rows and columns of the problem are not loaded together
with the problem specification. These may be loaded afterwards using a call to the function
XPRSaddnames.
Basic Usage c
2009 Fair Isaac Corporation. All rights reserved. page 8
2.0.5 Problem Solving
With a problem loaded into a problem pointer the user can run the optimization algorithms on
the problem to generate solution information. The two main commands to run the optimization
on a problem are XPRSmaxim(MAXIM) and XPRSminim(MINIM); each reflecting the sense of the
optimization to be applied. Without any special options passed to these routines they will solve
LPs, QPs or the initial LP relaxation of a MIP problem, depending on the type of problem loaded
in the problem pointer.
Once the initial LP relaxation of a MIP has been solved the command XPRSglobal(GLOBAL) can
be used to run the MIP search for the problem. Note that by including a ’g’ flag in the argument
list for calls to XPRSminim/XPRSmaxim the MIP search will be automatically run following the
solution of the initial LP relaxation.
{
XPRSprob prob;
XPRScreateprob(&prob);
XPRSsetlogfile(prob, "[Link]");
XPRSreadprob(prob, "hpw15", "");
XPRSminim(prob, "g");
XPRSdestroyprob(prob);
}
{
XPRSprob prob;
XPRScreateprob(&prob);
XPRSsetlogfile(prob, "[Link]");
XPRSreadprob(prob, "hpw15", "");
XPRSsetintcontrol(prob, XPRS_MAXNODE, 20000);
Basic Usage c
2009 Fair Isaac Corporation. All rights reserved. page 9
XPRSminim(prob, "g");
XPRSdestroyprob(prob);
}
Finally note that library users can trigger an interrupt on an optimization run (in a similar way to
the Ctrl–C interrupt in Console Xpress) using a call to the function XPRSinterrupt. It is
recommended that the user call this function from a callback during the optimization run. See
section 5.4 for details about using callbacks.
{
XPRSprob prob;
int nCols;
double *x;
XPRScreateprob(&prob);
XPRSsetlogfile(prob, "[Link]");
XPRSreadprob(prob, "hpw15", "");
XPRSgetintattrib(prob, XPRS_COLS, &nCols);
XPRSsetintcontrol(prob, XPRS_MAXNODE, 20000);
XPRSminim(prob, "g");
XPRSgetintattrib(prob, XPRS_MIPSTATUS, &iStatus);
if(iStatus == XPRS_MIP_SOLUTION || iStatus == XPRS_MIP_OPTIMAL) {
x = (double *) malloc(sizeof(double) * nCols);
XPRSgetmipsol(prob, x, NULL);
}
XPRSdestroyprob(prob);
}
Basic Usage c
2009 Fair Isaac Corporation. All rights reserved. page 10
Note that, unlike for LP solutions, dual solution information is not provided with the call to
XPRSgetmipsol and is not automatically generated with the MIP solutions. Only the decision
and slack variable values for a MIP solution are obtained when calling XPRSgetmipsol. The
reason for this is that MIP problems do not satisfy the theoretical conditions by which dual
information is derived (i.e., Karush—Kuhn—Tucker conditions). In particular, this is because the
MIP constraint functions are, in general, not continuously differentiable (indeed, the domains of
integer variables are not continuous).
Despite this, some useful dual information can be generated if a MIP has continuous variables
and we solve the resulting LP problem generated by fixing the non–continuous component of the
problem to their solution values. Because this process can be expensive it is left to the user to
perform this in a post solving phase where the user will simply call the function XPRSfixglobals
followed with a call to the appropriate optimization routine XPRSminim/XPRSmaxim.
2.1.1 Administration
Basic Usage c
2009 Fair Isaac Corporation. All rights reserved. page 11
2.1.3 Problem solving
2.2 Summary
In the previous sections a brief introduction is provided to the most common features of the FICO
Xpress Optimizer and its most general usage. The user should be familiar the main routines in the
Optimizer library. These routines allow the user to create problem pointers and load problems
into these problem pointers. The user should be familiar with the requirements for setting up
message handling with the Optimizer library. Also the user should understand how to run the
optimization algorithms on the loaded problems and be familiar with the various ways that
results can be accessed.
Examples of using the Optimizer are available from a number of sources, most notably from FICO
Xpress Getting Started manual. This provides a straight forward, "hands on" approach to the
FICO Xpress Optimization Suite and it is highly recommended that users read the relevant
chapters before considering the reference manuals. Additional, more advanced, examples may be
downloaded from the website.
Basic Usage c
2009 Fair Isaac Corporation. All rights reserved. page 12
Chapter 3
Problem Types
The FICO Xpress Optimization Suite is a powerful optimization tool for solving Mathematical
Programming problems. Users of FICO Xpress formulate real–world problems as Mathematical
Programming problems by defining a set of decision variables, a set of constraints on these
variables and an objective function of the variables that we wish to maximize or minimize. Our
FICO Xpress users have applications that define and solve important Mathematical Programming
problems in academia and industry including areas such as production scheduling, transportation,
supply chain management, telecommunications, finance and personnel planning.
Mathematical Programming problems are usually classified according to the types of decision
variables, constraints and objective function in the problem. Perhaps the most popular
application of the FICO Xpress Optimizer is for the class of Mixed Integer Programs (MIPs). In this
section we will briefly introduce some important types of problems.
Binary variables (BV) – decision variables that have value either 0 or 1, sometimes called 0/1
variables;
Semi–continuous integer variables (SI) – decision variables that either have value 0, or an
integer value above a specified non–negative limit;
Partial integer variables (PI) – decision variables that have integer values below a specified
limit and continuous values above the limit. SCs are useful for modeling cases where a
supply of some quantity needs to be modeled as discrete for small values but we are
indifferent whether it is discrete when the values are large (e.g., because, say, we do not
need to distinguish between 10000 items and 10000.25 items);
Special ordered sets of type one (SOS1) — a set of non–negative decision variables ordered
by a set of specified continuous values (or reference values) of which at most one can take
a nonzero value. SOS1s are useful for modeling quantities that are taken from a specified
discrete set of continuous values (e.g., choosing one of a set of transportation capacities);
Special ordered sets of type two (SOS2) – a set of non–negative variables ordered by a set
of specified continuous values (or reference values) of which at most two can be nonzero,
and if two are nonzero then they must be consecutive in their ordering. SOS2s are useful
for modeling a piecewise linear quantity (e.g., unit cost as a function of volume supplied);
Problem Types c
2009 Fair Isaac Corporation. All rights reserved. page 14
minimize: c1 x1 +...+cn xn +xT Q0 x
subject to: a11 x1 +...+a1n xn +xT Q1 x ≤ b1
...
am1 x1 +...+amn xn +xT Qm x ≤ bm
l1 ≤ x1 ≤ u1 ,...,ln ≤ xn ≤ un
like in MPS files. As symmetricity is always assumed, aij = aji for all index pairs (i, j).
3.4.2 Convexity
A fundamental property for nonlinear optimization problems, thus in QCQP as well, is convexity.
A region is called convex, if for any two points from the region the connecting line segment is
also part of the region.
The lack of convexity may give rise to several unfavorable model properties. Lack of convexity in
the objective may introduce the phenomenon of locally optimal solutions that are not global
ones (a local optimal solution is one for which a neighborhood in the feasible region exists in
which that solution is the best). While the lack of convexity in constraints can also give rise to
local optimums, they may even introduce non–connected feasible regions as shown in Figure 3.1.
In this example, the feasible region is divided into two parts. Over feasible region B, the objective
function has two alterative local optimal solutions, while over feasible region A the objective is
not even bounded.
For convex problems, each locally optimal solution is a global one, making the characterization of
the optimal solution efficient.
Problem Types c
2009 Fair Isaac Corporation. All rights reserved. page 15
Figure 3.1: Non-connected feasible regions
A rectangular matrix Q is PSD by definition, if for any vector (not restricted to the feasible set of a
problem) x it holds that x T Qx ≥ 0.
It follows that for greater or equal constraints
a1 x1 +. . . +an xn − x T Qx ≥ b
1. the product of two variables say xy without having both x 2 and y 2 defined;
Problem Types c
2009 Fair Isaac Corporation. All rights reserved. page 16
Chapter 4
Solution Methods
The FICO Xpress Optimization Suite provides three fundamental optimization algorithms: the
primal simplex, the dual simplex and the Newton barrier algorithm. Using these algorithms the
Optimizer implements solving functionality for the various types of problems the user may want
to solve.
Typically the user will allow the Optimizer to choose what combination of methods to use for
solving their problem. For example, by default, the FICO Xpress Optimizer uses the dual simplex
method for solving LP problems and the barrier method for solving QP problems.
For most users the default behavior of the Optimizer will provide satisfactory solution
performance and they need not consider any customization. However, if a problem seems to be
taking an unusually long time to solve or if the solving performance is critical for the application
the user may consider, as a first attempt, experimenting by forcing the Optimizer to use an
algorithm other than the default.
The main points where the user has a choice of what algorithm to use are (i) when the user calls
the optimization routines XPRSmaxim (MAXIM) and XPRSminim (MINIM) and (ii) when the
Optimizer solves the node relaxation problems during the branch and bound search. The user
may force the use of a particular algorithm by specifying flags to the optimization routines
XPRSmaxim and XPRSminim. A special control parameter, DEFAULTALG is used to specify what
algorithm to use when solving the node relaxation problems during branch and bound.
As a guide for choosing optimization algorithms other than the default consider the following.
As a general rule, the dual simplex is usually much faster than the primal simplex if the problem is
neither infeasible nor near–infeasibility. If the problem is likely to be infeasible or if the user
wishes to get diagnostic information about an infeasible problem then the primal simplex is the
best choice. This is because the primal simplex algorithm finds a basic solution that minimizes the
sum of infeasibilities and these solutions are typically helpful identifying causes of infeasibility.
The Newton barrier algorithm can perform much better than the simplex algorithms on certain
classes of problems. The barrier algorithm will, however, likely be slower than the simplex
algorithms if, for problem matrix A, AT A is large and dense.
In the following few sections, performance issues relating to these methods will be discussed in
more detail. Performance issues relating to the search for MIP solutions will also be discussed.
4.1.1 Output
While the simplex methods iterate, the Optimizer produces iteration logs. Console Xpress writes
these logging messages to screen. Library users can setup logging management using the various
relevant functions in the Optimizer library e.g., XPRSsetlogfile, XPRSsetcbmessage or
XPRSsetcblplog. The simplex iteration log is produced everyLPLOG iterations. When LPLOG is
set to 0, a log is displayed only when the solution terminates. If it is set to a positive value, a
summary type log is output; otherwise, a detailed log is output.
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 18
4.2.1 Crossover
Typically the barrier algorithm terminates when it is within a given tolerance of the optimal
solution. Since this solution will not lie on the boundary of the feasible region, the Optimizer can
be optionally made to perform a, so called, purification or ’crossover’ phase to obtain a ’true’
optimal solution. In the crossover phase the simplex method is used to continue the optimization
from the solution found by the barrier algorithm. The CROSSOVER control determines whether
the Optimizer performs crossover. When set to 1 (the default for LP problems), crossover is
performed. If CROSSOVER is set to 0, no crossover will be attempted and the solution provided
will be that determined purely by the barrier method. Note that if a basic optimal solution is
required, then the CROSSOVER option must be activated before optimization starts.
4.2.2 Output
While the barrier method iterates, the Optimizer produces iteration log messages. Console Xpress
writes these log messages to screen. Library users can setup logging management using the
various relevant functions in the Optimizer library e.g., XPRSsetlogfile, XPRSsetcbmessage or
XPRSsetcbbarlog. Note that how the barrier iteration logging is output is dependent on the
value of the BAROUTPUT control.
4.3.1 Theory
In this section we present a brief overview of branch and bound theory as a guide for the user on
where to look to begin customizing the Optimizer’s MIP search and also to define the
terminology used when describing branch and bound methods.
To simplify the text in the following, we limit the discussion to MIP problems with linear
constraints and objective function. Note that it is not difficult to generalize the discussion to
problems with quadratic constraints and quadratic objective.
The branch and bound method has three main concepts: relaxation, separation and fathoming.
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 19
The relaxation concept relates to the way discreteness or integrality constraints are dropped or
’relaxed’ in the problem. The initial relaxation problem is a Linear Programming (LP) problem
which we solve resulting in one of the following cases:
Case (d) is a special case. It can only occur when solving the initial relaxation problem and in this
situation the MIP problem itself is not well posed (see Chapter 6 for details about what to do in
this case). For the remaining discussion we assume that the LP is not unbounded.
Outcomes (a) and (c) are said to "fathom" the particular MIP, since no further work on it is
necessary. For case (b) more work is required, since one of the unsatisfied integrality constraints
must be selected and the concept of separation applied.
To illustrate the separation concept suppose, for example, that the optimal LP value of an integer
variable x is 1.34, a value which violates the integrality constraint. It follows that in any solution
to the original problem either x ( 1.0 or x ( 2.0. If the two resulting MIP problems are solved
(with the integrality constraints), all integer values of x are considered in the combined solution
spaces of the two MIP problems and no solution to one of the MIP problems is a solution to the
other. In this way we have separated into two sub–problems.
If both of these sub–problems can be solved and the better of the two is chosen, then the MIP is
solved. By recursively applying this same relaxation strategy to solve each of the sub–problems
and given that in the limiting case the integer variables will have their domains divided into fixed
integer values then we can guarantee that we solve the MIP problem.
Branch and bound can be loosely viewed as a tree–search algorithm. Each node of the tree is a
MIP problem. A MIP node is relaxed and the LP relaxation is solved. If the LP relaxation is not
fathomed, then the node MIP problem is separated into two more sub–problems, or child nodes.
Each child MIP will have the same constraints as the parent node MIP, plus one additional
inequality constraint. Each node is therefore either fathomed or has two children or descendants.
We now introduce the concept of a cutoff, which is an extension of the fathoming concept. To
understand the cutoff concept we first make two observations about the behavior of the node
MIP problems. Firstly, the optimal MIP objective of a node problem can be no better than the
optimal objective of the LP relaxation. Secondly, the optimal objective of a child LP relaxation can
be no better than the optimal objective of its parent LP relaxation. Now assume that we are
exploring the tree and we are keeping the value of the best MIP objective found so far. Assume
also that we keep a ’cutoff value’ equal to the best MIP objective found so far. To use the cutoff
value we reason that if the optimal LP relaxation objective is no better than the cutoff then any
MIP solution of a descendant can be no better than the cutoff and the node can be fathomed (or
cutoff) and need not be considered further in the search.
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 20
The concept of a cutoff can be extended to apply even when no integer solution has been found
in situations where it is known, or may be assumed, from the outset that the optimal solution
must be better than some value. If the relaxation is worse than this cutoff, then the node may be
fathomed. In this way the user can reduce the number of nodes processed and improve the
solution performance. Note that there is a danger, however, that all MIP solutions, including the
optimal one, may be missed if an overly optimistic cutoff value is chosen.
The cutoff concept may also be extended in a different way if the user intends only to find a
solution within a certain tolerance of the overall optimal MIP solution. Assume that we have
found a MIP solution to our problem and assume that the cutoff is maintained at a value 100
objective units better than the current best MIP solution. Proceeding in this way we are
guaranteed to find a MIP solution within 100 units of the overall MIP optimal since we only cutoff
nodes with LP relaxation solutions worse than 100 units better than the best MIP solution that we
find.
If the MIP problem contains SOS sets then the nodes of the Branch and Bound tree are separated
by branching on the sets. Note that each member of the set has a double precision reference row
entry and the sets are ordered by these reference row entries. Branching on the sets is done by
choosing a position in the ordering of the set variables and setting all members of the set to 0
either above or below the chosen point. The optimizer used the reference row entries to decide
on the branching position and so it is important to choose the reference row entries which reflect
the cost of setting the set member to 0. In some cases it maybe better to model the problem with
binary variables instead of sets. This is especially the case if the sets are small.
(a) At any given stage there will generally be several outstanding nodes which have not been
fathomed. The choice of which to solve first is known as the node selection problem;
(b) Having chosen a node to tackle, deciding which variable to separate upon is known as the
variable selection problem.
The Optimizer incorporates a default strategy for both choices which has been found to work
adequately on most problems. Several controls are provided to tailor the search strategy to a
particular problem. Since the Optimizer makes its variable selection when the LP relaxation has
been solved, rather than when it has selected the node, the variable selection problem will be
discussed first.
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 21
If no priorities are provided then the branching variable is selected according to VARSELECTION.
Internally calculated upj and downj degradation values are combined into a single comparison
value for each variable, according to the rules presented in the table below, and the variable with
the largest value is selected for separation.
using the default value for MIPADDCUTOFF, where LP_value is the optimal value found by the LP
Optimizer. If a value is specified for MIPRELCUTOFF it must be specified before the LP Optimizer
is run.
It is also possible to set limits on the solve process, such as number of nodes (MAXNODE), time limit
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 22
(MAXTIME) or on the number of solutions found (MAXMIPSOL). If the solve process is interrupted
due to any of these limits, the problem will be left in the unfinished state. It is possible to resume
the solve from an unfinished state by calling XPRSglobal (GLOBAL) again.
To return an unfinished problem to its starting state, where it can be modified again, the user
should use the function XPRSpostsolve (POSTSOLVE). This function can be used to restore a
problem from an interrupted global search even if the problem is not in a presolved state.
So a value of 1+2=3 for MIPPRESOLVE causes reduced cost fixing and tightening of implied
bounds on integer variables.
4.4.2 Turning the automatic convexity check off and numerical issues
The optimizer will check the convexity of each individual constraint. In certain cases it is possible
that the problem itself is convex, but the representation of it is not. A simple example would be
minimize: x
subject to: x2 –y2 +2xy ≤ 1
y=0
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 23
The optimizer will deny solving this problem if the automatic convexity check is on, although the
problem is clearly convex. The reason is that convexity of QCQPs is checked before any presolve
takes place. To understand why, consider the following example:
minimize: y
subject to: y–x2 ≤ 1
y=2
This problem is clearly feasible, and an optimal solution is (x, y) = (1, 2). However, when presolving
the problem, it will be found infeasible, since assuming that the quadratic part of the first
constraint is convex the constraint cannot be satisfied (remember that if a constraint is convex,
then removing the quadratic part is always a relaxation). Thus since presolve makes use of the
assumption that the problem is convex, convexity must be checked before presolve.
Note that for quadratic programming (QP) and mixed integer quadratic programs (MIQP) where
the quadratic expressions appear only in the objective, the convexity check takes place after
presolve, making it possible to accept matrices that are not PSD, but define a convex function
over the feasible region (note that this is only a chance).
It is possible to turn the automatic convexity check off. By doing so, one may save time when
solving problems that are known to be convex, or one might even want to experiment trying to
solve nonconvex problems. For a non–convex problem, any of the following might happen:
1. the algorithm converges to a local optimum which it declares optimal (and which might or
might not be the actual optimum);
2. the algorithm doesn’t converge and stops after reaching the iteration limit;
3. the algorithm cannot make sufficient improvement and stops;
4. the algorithm stops because it cannot solve a subproblem (in this case it will declare the
matrix non semidefinite);
5. presolve declares a feasible problem infeasible;
6. presolve eliminates variables that otherwise play an important role, thus significantly
change the model;
7. different solutions (even feasibility/infeasibility) are generated to the same problem, only by
slightly changing its formulation.
There is no guarantee on which of the cases above will occur, and as mentioned before, the
behavior/outcome might even be formulation dependent. One should take extreme care when
interpreting to the solution information returned for a non–convex problem.
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 24
solution to the problem, these callbacks are used to evaluate the value, the gradient and the
Hessian of the nonlinear objective respectively.
The maximal structure of the Hessian must be defined by calling XPRSinitializenlphessian
or XPRSinitializenlphessian_indexpairs first. These functions must provide all positions
where a nonzero value may occur in any of the Hessian matrices of the problem. This structure
cannot be changed during the optimization. Once this initialization is done, the functions
XPRSsetcbnlpevaluate, XPRSsetcbnlpgradient, XPRSsetcbnlphessian are used to define
the necessary callbacks. All of the callbacks must be defined. The problem is expected to be
convex, which means that all Hessians must be positive semi–definite for minimization, or
negative semi–definite problems for maximization problems.
Solution Methods c
2009 Fair Isaac Corporation. All rights reserved. page 25
Chapter 5
Advanced Usage
Advanced Usage c
2009 Fair Isaac Corporation. All rights reserved. page 27
section of this manual in Chapter 8.
Finally, it is important to note that it is not straight forward to modify a matrix when it has been
"presolved" (and has not been subsequently "postsolved"). The following section 5.3 discusses
some important points concerning reading and modifying a problem that is "presolved".
Advanced Usage c
2009 Fair Isaac Corporation. All rights reserved. page 28
In the example above, x would not be fixed at 0, but allowed to range between 0 and 0.2. If you
are not interested in the LP relaxation, then it is slightly more efficient to solve the LP relaxation
and do the global search in one go, which can be done by specifying the g flag for the
XPRSmaxim (MAXIM) or XPRSminim (MINIM) command.
When XPRSglobal (GLOBAL) finds an integer solution, it is postsolved and saved in memory. The
solution can be read with the XPRSgetmipsol function. A permanent copy can be saved to a
solution file by calling XPRSwritebinsol (WRITEBINSOL), or XPRSwriteslxsol (WRITESLXSOL)
for a simpler text file. This can be retrieved later by calling XPRSreadbinsol (READBINSOL) or
XPRSreadslxsol (READSLXSOL), respectively.
After calling XPRSglobal (GLOBAL), the matrix will be postsolved whenever the MIP search has
completed. If the MIP search hasn’t completed the matrix can be postsolved by calling the
XPRSpostsolve (POSTSOLVE) function.
Advanced Usage c
2009 Fair Isaac Corporation. All rights reserved. page 29
respond after each iteration of either the simplex or barrier algorithms respectively. The controls
LPLOG and BAROUTPUT may additionally be set to reduce the frequency at which this routine
should be called.
Advanced Usage c
2009 Fair Isaac Corporation. All rights reserved. page 30
5.5 Working with the Cut Manager
Advanced Usage c
2009 Fair Isaac Corporation. All rights reserved. page 31
added cut, it will be removed unless it has already been applied to active nodes of the tree. If,
instead, this argument is set to 2, the same test is carried out on all cuts, ignoring the cut type.
The routineXPRSdelcpcuts allows the user to remove cuts from the cut pool, unless they have
already been applied to active nodes in the Branch and Bound tree.
A list of cuts in the cut pool may be obtained using the command XPRSgetcpcuts, whilst
XPRSgetcpcutlist returns a list of their indices. A list of those cuts which are active at the
current node may be returned using XPRSgetcutlist.
Advanced Usage c
2009 Fair Isaac Corporation. All rights reserved. page 32
The operation of the optimizer for MIPs is fairly similar in serial and parallel mode. The MIP
callbacks can still be used in parallel and callbacks are called when each MIP thread is created and
destroyed. The mipthread callback (declared with XPRSsetcbmipthread) is called whenever a
thread is created and the destroymt callback (declared with XPRSsetcbdestroymt) is called
whenever the thread is destroyed. Each thread has a unique ID which can be obtained from the
MIPTHREADID integer attribute. When the MIP callbacks are called they are MUTEX protected to
allow non threadsafe user callbacks. If a significant amount of time is spent in the callbacks then
it is worth turning off the automatic MUTEX protection by setting the MUTEXCALLBACKS control
to 0. It this is done then the user must ensure that their callbacks are threadsafe.
On some problems it is also possible to obtain a speedup by using multiple threads for the MIP
solve process between the initial LP relaxation solve and the Branch and Bound search. The
default behavior here is for the Optimizer to use a single thread to create its rounds of cuts and
to run its heuristic methods to obtain MIP solutions. Extra threads can be started, dedicated to
running the heuristics only, by setting the HEURTHREADS control. By setting HEURTHREADS to a
non–zero value, the heuristics will be run in separate threads, in parallel with cutting.
Advanced Usage c
2009 Fair Isaac Corporation. All rights reserved. page 33
Chapter 6
Infeasibility, Unboundedness and Instabil-
ity
All users will, generally, encounter an occasion where an instance of the model they are
developing is solved and found to be infeasible or unbounded. An infeasible problem is a
problem that has no solution while an unbounded problem is one where the constraints do not
restrict the objective function and the optimal objective goes to infinity. Both situations arise due
to errors or shortcomings in the formulation or in the data defining the problem. When such a
result is found it is typically not clear what it is about the formulation or the data that has caused
the problem.
Problem instability arises when the coefficient values of the problem are such that the
optimization algorithms find it difficult to converge to a solution. This is typically because of
large ratios between the largest and smallest coefficients in the constraints or columns and the
handling of the range of numerical values in the algorithm is causing floating point accuracy
issues. Problem instability generally manifests in either long run times or spurious infeasibilities.
It is often difficult to deal with these issues since it is often difficult to diagnose the cause of the
problems. In the Chapter we discuss the various approaches and tools provided by the Optimizer
for handling these issues.
6.1 Infeasibility
A problem is said to be infeasible if no solution exists which satisfies all the constraints. The FICO
Xpress Optimizer provides functionality for diagnosing the cause of infeasibility in the user’s
problem.
Before we discuss the infeasibility diagnostics of the Optimizer we will, firstly, define some types
of infeasibility in terms of the type of problem it relates to and how the infeasibility is detected
by the Optimizer.
We will consider two basic types of infeasibility. The first we will call continuous infeasibility and
the second discrete or integer infeasibility. Continuous infeasibility is where a non–MIP problem
is infeasible. In this case the feasible region defined by the intersecting constraints is empty.
Discrete or integer infeasibility is where a MIP problem has a feasible relaxation (note that a
relaxation of a MIP is the problem we get when we drop the discreteness requirement on the
variables) but the feasible region of the relaxation contains no solution that satisfies the
discreteness requirement.
Either type of infeasibility can be detected at the presolve phase of an optimization run. Presolve
is the analysis and processing of the problem before the problem is run through the optimization
algorithm. If continuous infeasibility is not detected in presolve then the optimization algorithm
6.2 Unboundedness
A problem is said to be unbounded if the objective function may be improved indefinitely
without violating the constraints and bounds. This can happen if a problem is being solved with
the wrong optimization sense e.g., a maximization problem is being minimized. However, when a
problem is unbounded and the problem is being solved with the correct optimization sense then
this indicates a problem in the formulation of the model or the data. Typically, the problem is
caused by missing constraints or the wrong signs on the coefficients. Note that unboundedness is
often diagnosed by presolve.
6.3 Instability
6.3.1 Scaling
When developing a model and the definition of its input data users often produce problems that
contain constraints and/or columns with large ratios in the absolute values of the largest and
smallest coefficients. For example:
Here the objective coefficients, constraint coefficients, and RHS values range between 0.1 and
1012 . We say that the model is badly scaled.
During the optimization process, the Optimizer must perform many calculations involving
subtraction and division of quantities derived from the constraints and objective function. When
these calculations are carried out with values differing greatly in magnitude, the finite precision
of computer arithmetic and the fixed tolerances employed by FICO Xpress result in a build up of
rounding errors to a point where the Optimizer can no longer reliably find the optimal solution.
To minimize undesirable effects, when formulating your problem try to choose units (or
equivalently scale your problem) so that objective coefficients and matrix elements do not range
by more than 106 , and RHS and non–infinite bound values do not exceed 108 . One common
problem is the use of large finite bound values to represent infinite bounds (i.e., no bounds) — if
you have to enter explicit infinite bounds, make sure you use values greater than 1020 which will
be interpreted as infinity by the Optimizer. Avoid having large objective values that have a small
relative difference — this makes it hard for the dual simplex algorithm to solve the problem.
Similarly, avoid having large RHS/bound values that are close together.
In the above example, both the x–coefficient and the last constraint might be better scaled. Issues
arising from the first may be overcome by column scaling, effectively a change of coordinates,
with the replacement of 106 x by some new variable. Those from the second may be overcome by
row scaling.
FICO Xpress also incorporates a number of automatic scaling options to improve the scaling of
the matrix. However, the general techniques described below cannot replace attention to the
choice of units specific to your problem. The best option is to scale your problem following the
advice above, and use the automatic scaling provided by the Optimizer.
The default value of SCALING is 35, so row and column scaling are done by the maximum
element method. If scaling is not required, SCALING should be set to 0.
If the user wants to get quick results when attempting to solve a badly scaled problem it may be
useful to try running customized scaling on a problem before calling the optimization algorithm.
To run the scaling process on a problem the user can call the routine XPRSscale(SCALE). The
SCALING control determines how the scaling will be applied.
Note that if user is applying customized scaling to their problem and they are subsequently
modifying the problem then it is important to note that the addition of new elements in the
matrix can cause the problem to become badly scaled again. The user can avoid this by
reapplying their scaling strategy after completing their modifications to the matrix.
Finally, note that the scaling operations are determined by the matrix elements only. The
objective coefficients, right hand side values and bound values do not influence the scaling. Only
continuous variables (i.e., their bounds and coefficients) and constraints (i.e., their
right–hand–sides and coefficients) are scaled. Discrete entities such as integer variables are not
scaled so the user should choose carefully the scaling of these variables.
6.3.2 Accuracy
The accuracy of the computed variable values and objective function value is affected in general
by the various tolerances used in the Optimizer. Of particular relevance to MIP problems are the
accuracy and cut off controls. The MIPRELCUTOFF control has a non–zero default value, which
will prevent solutions very close but better than a known solution being found. This control can
of course be set to zero if required.
FEASTOL and scaling Feastol applies to the scaled problem. When the LP solver completes the
variables will satisft feastol for the scaled matrix however once the variables become unscaled
they may violate feastol. Redcing feastol can help hwoever this can casuer the LP solve to be
unstable and reduce solution performance.,
However, for all problems it is probably ambitious to expect a level of accuracy in the objective of
more than 1 in 1,000,000. Bear in mind that the default feasibility and optimality tolerances are
10−−6 . And you are lucky if you can compute the solution values and reduced costs to an accuracy
better than 10−−8 anyway (particularly for large models). It depends on the condition number of
the basis matrix and the size of the RHS and cost coefficients. Under reasonable assumptions, an
7.0.3 Overview
Note that the Goal Programming functionality of the Optimizer will be dropped in a future
release. This functionality will be replaced by an example program, available with this release
(see goal_example.cin the examples/optimizer/cfolder of the installation), that provides
the same functionality as the original library function XPRSgoal(GOAL) but is implemented using
the Optimizer library interface.
Goal programming is an extension of linear programming in which targets are specified for a set
of constraints. In goal programming there are two basic models: the pre–emptive (lexicographic)
model and the Archimedean model. In the pre–emptive model, goals are ordered according to
priorities. The goals at a certain priority level are considered to be infinitely more important than
the goals at the next level. With the Archimedean model, weights or penalties for not achieving
targets must be specified and one attempts to minimize the weighted sum of goal
under–achievement.
In the Optimizer, goals can be constructed either from constraints or from objective functions (N
rows). If constraints are used to construct the goals, then the goals are to minimize the violation
of the constraints. The goals are met when the constraints are satisfied. In the pre–emptive case
we try to meet as many goals as possible, taking them in priority order. In the Archimedean case,
we minimize a weighted sum of penalties for not meeting each of the goals. If the goals are
constructed from N rows, then, in the pre–emptive case, a target for each N row is calculated
from the optimal value for the N row. this may be done by specifying either a percentage or
absolute deviation that may be allowed from the optimal value for the N rows. In the
Archimedean case, the problem becomes a multi–objective linear programming problem in which
a weighted sum of the objective functions is to be minimized.
In this section four examples will be provided of the four different types of goal programming
available. Goal programming itself is performed using theXPRSgoal(GOAL) command, whose
syntax is described in full in the reference section of this manual.
Initially we try to meet the first goal (G1), which can be done with x=5.0 and y=1.6, but this
solution does not satisfy goal 2 (G2) or goal 3 (G3). If we try to meet goal 2 while still meeting
goal 1, the solution x=6.0 and y=0.0 will satisfy. However, this does not satisfy goal 3, so we
repeat the process. On this occasion no solution exists which satisfies all three.
Penalties
goal 1 (G1): 7x + 3y ≥ 40 8
goal 2 (G2): 10x + 5y = 60 3
goal 3 (G3): 5x + 4y ≤ 35 1
LIMIT: 100x + 60y ≤ 600
In this case a penalty of 8 units is incurred for each unit that 7x + 3y is less than 40 and so on.
the final solution will minimize the weighted sum of the penalties. Penalties are also referred to
as weights. This solution will be x=6, y=0, d1 =d2 =d3 =0 and d4 =5, which means that the first and
second most important constraints can be met, while for the third constraint the right hand side
must be reduced by 5 units in order to be met.
Note that if the problem is infeasible after all the goal constraints have been relaxed, then no
solution will be found.
Goal Programming c
2009 Fair Isaac Corporation. All rights reserved. page 42
Sense D/P Deviation
goal 1 (OBJ1): 5x + 2y – 20 max P 10
goal 2 (OBJ2): –3x + 15y – 48 min D 4
goal 3 (OBJ3): 1.5x + 21y – 3.8 max P 20
LIMIT: 42x + 13y ≤ 100
For each N row the sense of the optimization (max or min) and the percentage (P) or absolute (D)
deviation must be specified. For OBJ1 and OBJ3 a percentage deviation of 10% and 20%
respectively have been specified, whilst for OBJ2 an absolute deviation of 4 units has been
specified.
We start by maximizing the first objective function, finding that the optimal value is -4.615385.
As a 10% deviation has been specified, we change this objective function into the following
constraint:
5x + 2y – 20 ≥ –4.615385 – 0.14.615385
Now that we know that for any solution the value for the former objective function must be
within 10% of the best possible value, we minimize the next most important objective function
(OBJ2) and find the optimal value to be 51.133603. Goal 2 (OBJ2) may then be changed into a
constraint such that:
and in this way we ensure that for any solution, the value of this objective function will not be
greater than the best possible minimum value plus 4 units.
Finally we have to maximize OBJ3. An optimal value of 141.943995 will be obtained. Since a
20% allowable deviation has been specified, this objective function may be changed into the
following constraint:
Weights Sense
goal 1 (OBJ1): 5x + 2y – 20 100 max
goal 2 (OBJ2): –3x + 15y – 48 1 min
goal 3 (OBJ3): 1.5x + 21y – 3.8 0.01 max
LIMIT: 42x + 13y ≤ 100
In this case we have three different objective functions that will be combined into a single
objective function by weighting them by the values given in the weights column. The solution of
this model is one that minimizes:
Goal Programming c
2009 Fair Isaac Corporation. All rights reserved. page 43
The resulting values that each of the objective functions will have are as follows:
OBJ1: 5x + 2y – 20 = –4.615389
OBJ2: –3x + 15y – 48 = 67.384613
OBJ3: 1.5x + 21y – 3.8 = 157.738464
Goal Programming c
2009 Fair Isaac Corporation. All rights reserved. page 44
Chapter 8
Console and Library Functions
A large number of routines are available for both Console and Library users of the FICO Xpress
Optimizer, ranging from simple routines for the input and solution of problems from matrix files
to sophisticated callback functions and greater control over the solution process. Of these, the
core functionality is available to both sets of users and comprises the ’Console Mode’. Library
users additionally have access to a set of more ’advanced’ functions, which extend the
functionality provided by the Console Mode, providing more control over their program’s
interaction with the Optimizer and catering for more complicated problem development.
Purpose
A short description of the routine and its purpose begins the information section.
Synopsis
A synopsis of the syntax for usage of the routine is provided. "Optional" arguments and flags
may be specified as NULL if not required. Where this possibility exists, it will be described
alongside the argument, or in the Further Information at the end of the routine’s description.
Where the function forms part of the Console Mode, the library syntax is described first, followed
by the Console Xpress syntax.
Arguments
A list of arguments to the routine with a description of possible values for them follows.
Error Values
Optimizer return codes are described in 11. For library users, however, a return code of 32
indicates that additional error information may be obtained, specific to the function which
caused the error. Such is available by calling
XPRSgetintattrib(prob,XPRS_ERRORCODE,&errorcode);
Likely error values returned by this for each function are listed in the Error Values section. A
description of the error may be obtained using the XPRSgetlasterror function. If no attention
need be drawn to particular error values, this section will be omitted.
Associated Controls
Controls which affect a given routine are listed next, separated into lists by type. The control
name given here should have XPRS_ prefixed by library users, in a similar way to the
XPRSgetintattrib example in the Error Values section above. Console Xpress users should use
the controls without this prefix, as described in FICO Xpress Getting Started manual. These
controls must be set before the routine is called if they are to have any effect.
Examples
One or two examples are provided which explain certain aspects of the routine’s use.
Further Information
Additional information not contained elsewhere in the routine’s description is provided at the
end.
Related Topics
Finally a list of related routines and topics is provided for comparison and reference.
Related topics
XPRS_bo_create.
5. Inside the callback function set by XPRSsetcboptnode, a user can define any number of branching
objects and pass them to the optimizer. These objects are added to the set of infeasible global
entities for the current node and the optimizer will select a best candidate from this extended set
using all of its normal evaluation methods.
6. The callback function set by XPRSsetcbchgbranchobject can be used to override the optimizers
selected branching candidate with the users own object. This can for example be used to modify
how to branch on the global entity selected by the optimizer.
7. The following functions are available to set up a new user branching object:
Example
The following function will create a branching object equivalent to a standard binary branch on a
XPRSbranchobject bo = NULL;
return bo;
}
Related topics
XPRSsetcboptnode, XPRSsetcbchgbranchobject.
Related topics
XPRS_bo_create, XPRS_bo_addbounds.
Related topics
XPRS_ge_setcbmsghandler,
Related topics
XPRS_bo_create, XPRS_bo_addrows.
Synopsis
int XPRS_CC XPRS_bo_setpreferredbranch(XPRSbranchobject obranch, int
ibranch);
Arguments
obranch The user branching object.
ibranch The number of the branch to mark as preferred.
Related topics
XPRS_bo_create.
2. Priority values must be an integer from 0 to 1000. User branching objects and global entities are
by default assigned a priority value of 500. Special branching objects, such as those arising from
structural branches or split disjunctions are assigned a priority value of 400.
Related topics
XPRS_bo_create, A.6.
Synopsis
int XPRS_CC XPRS_bo_store(XPRSbranchobject obranch, int* p_status);
Arguments
obranch The new user branching object to store. After successfully storing the object, the
obranch object is no longer valid and should not be referred to again.
p_status When storing a branching object expressed in terms of the original column space,
the status of presolving the object will be returned here:
0 Object presolved successfully.
1 Failed to presolve the object due to dual reductions in presolve.
2 Failed to presolve the object due to duplicate column reductions in presolve.
The object was not added to the candidate list if a non zero status was returned.
Further information
1. To ensure that a user branching object expressed in terms of the original matrix columns can be
applied to the presolved problem, it might be necessary to turn off certain presolve operations.
2. If any of the original matrix columns referred to in the object are unbounded, dual reductions
might prevent the corresponding bound or constraint from being presolved. To avoid this, dual
reductions should be turned off in presolve, by clearing bit 1 of the integer control PRESOLVEOPS.
3. If one or more of the original matrix columns of the object are duplicates in the original matrix,
but not in the branching object, it might not be possible to presolve the object due to duplicate
column eliminations in presolve. To avoid this, duplicate column eliminations should be turned off
in presolve, by clearing bit 5 of PRESOLVEOPS.
Related topics
XPRS_bo_create.
Synopsis
int XPRS_CC XPRS_ge_setcbmsghandler(int (XPRS_CC *f_msghandler)
(XPRSobject vXPRSObject, void * vUserContext, void * vSystemThreadId,
const char * sMsg, int iMsgType, int iMsgNumber), void * p);
Arguments
f_msghandler The callback function which takes six arguments, vXPRSObject,
vUserContext, vSystemThreadId, sMsg, iMsgType and iMsgNumber. Use a NULL
value to cancel a callback function.
vXPRSObject The object sending the message. Use XPRSgetobjecttypename to get the name
of the object type.
vUserContext The user-defined object passed to the callback function.
vSystemThreadId The system id of the thread sending the message caste to a void *.
sMsg A null terminated character array (string) containing the message, which may simply
be a new line. When the callback is called for the first time sMsg will be a NULL
pointer.
iMsgType Indicates the type of output message:
1 information messages;
2 (not used);
3 warning messages;
4 error messages.
A negative value means the callback is being called for the first time.
iMsgNumber The number associated with the message. If the message is an error or a warning
then you can look up the number in the section Optimizer Error and Warning
Messages for advice on what it means and how to resolve the associated issue.
p A user-defined object to be passed to the callback function.
Further information
To send all messages to a log file the built in message handler XPRSlogfilehandler can be
used. This can be done with:
XPRS_ge_setcbmsghandler(XPRSlogfilehandler, "[Link]");
Related topics
XPRSgetobjecttypename.
Example
char mynames[0] = "fred\0jim\0sheila"
...
XPRS_nml_addnames(nml,mynames,0,2);
Related topics
XPRS_nml_create, XPRS_nml_removenames, XPRS_nml_copynames, XPRSaddnames.
Arguments
dst The namelist object to copy names to. Any names already in this name list will be
removed. Must be an object previously returned by XPRS_nml_create.
src The namelist object from which all the names should be copied.
Example
XPRSprob prob;
XPRSnamelist rnames, rnames_on_prob;
...
/* Create a namelist */
XPRS_nml_create(&rnames);
/* Get a namelist through which we can access the row names */
XPRSgetnamelistobject(prob,1,&rnames_on_prob);
/* Now copy these names from the immutable ’XPRSprob’ namelist
to another one */
XPRS_nml_copynames(rnames,rnames_on_prob);
/* The names in the list can now be modified then put to some
other use */
Related topics
XPRS_nml_create, XPRS_nml_addnames, XPRSgetnamelistobject.
Related topics
XPRSgetnamelistobject, XPRS_nml_destroy.
Example
XPRSnamelist mylist;
XPRS_nml_create(&mylist);
...
XPRS_nml_destroy(&mylist);
Related topics
XPRS_nml_create, XPRSgetnamelistobject, XPRSdestroyprob.
Related topics
XPRS_nml_addnames, XPRS_nml_getnames.
Related topics
None.
Related topics
None.
Example
XPRSnamelist mylist;
int count;
...
XPRS_nml_getnamecount(mylist,&count);
printf("There are %d names", count);
Related topics
None.
Related topics
None.
Related topics
XPRS_nml_addnames.
Synopsis
int XPRS_CC XPRS_nml_setcbmsghandler(XPRSnamelist nml,
int (XPRS_CC *f_msghandler)(XPRSobject vXPRSObject, void*
vUserContext, void* vSystemThreadId, const char* sMsg, int iMsgType,
int iMsgCode), void* p);
Arguments
nml The namelist object.
f_msghandler The callback function which takes six arguments, vXPRSObject,
vUserContext, vSystemThreadId, sMsg, iMsgType and iMsgNumber. Use a NULL
value to cancel a callback function.
vXPRSObject A generic pointer to the mse object sending the message.
vUserContext The user-defined object passed to the callback function.
vSystemThreadId The system id of the thread sending the message, casted to a void *.
sMsg A null terminated character array (string) containing the message, which may simply
be a new line or a NULL pointer.
iMsgType Indicates the type of output message:
1 information messages;
2 (not used);
3 warning messages;
4 error messages.
Indicates the type of output message:
iMsgNumber The number associated with the message. If the message is an error or a warning
then you can look up the number in the section Optimizer Error and Warning
Messages for advice on what it means and how to resolve the associated issue.
p A user-defined object to be passed to the callback function as the vUserContext
argument.
Further information
To send all messages to a log file the built in message handler XPRSlogfilehandler can be
used. This can be done with:
Related topics
None.
Using XPRSaddcols, the following transforms (a) into (b) and then names the new variable using
XPRSaddnames:
obj[0] = 3;
mstart[] = {0};
mrwind[] = {0, 1, 3};
matval[] = {2.0, 1.0, 3.0};
bdl[0] = 0.0; bdu[0] = 12.0;
...
XPRSaddcols(prob,1,3,obj,mstart,mrwind,matval,bdl,bdu);
XPRSaddnames(prob,2,"z",2,2);
3. If the columns are added to a MIP problem then they will be continuous variables.
Related topics
XPRSaddnames, XPRSaddrows, XPRSalter, XPRSdelcols.
Related topics
XPRSaddcols, XPRSaddrows, XPRSgetnames.
maximize: 2x + y + 3z
subject to: x + 4y + 2z ≤ 24
y+z ≤ 5
3x + y ≤ 20
x + y + 3z ≤ 9
Then the following adds the row 8x + 9y + 10z ≤ 25 to the problem and names it NewRow:
qrtype[0] = "L";
rhs[0] = 25.0;
mstart[] = {0};
mclind[] = {0, 1, 2};
dmatval[] = {8.0, 9.0, 10.0};
Further information
1. Range rows are automatically converted to type L, with an upper bound in the slack. This must be
taken into consideration, when retrieving row type, rhs or range information for rows.
2. For maximum efficiency, space for the extra rows and elements should be reserved by setting the
EXTRAROWS and EXTRAELEMS controls before loading the problem.
Related topics
XPRSaddcols, XPRSaddcuts, XPRSaddnames, XPRSdelrows.
Example
Add set names (set1 and set2) to a problem:
Related topics
XPRSaddnames, XPRSloadglobal, XPRSloadqglobal.
XPRSalter(prob,"");
Example 2 (Console)
The following example reads in the file [Link], from which instructions are taken to alter the
current matrix:
ALTER fred
Further information
1. The file [Link] is read. It is an ASCII file containing matrix revision statements in the
format described in A.7. The MODIFY format of the MPS REVISE data is also supported.
2. The command XPRSalter (ALTER) and the control EXTRAELEMS work together to enable the user
to change values and constraint senses in the problem held in memory. For maximum efficiency, it
should be set to reserve space for additional matrix elements. Defining the maximum number of
extra elements that can be added, it must be set before XPRSreadprob (READPROB).
3. It is not possible to alter an integer model which has been presolved. If it is required to alter
such a model after optimization, either turn the presolve off by setting PRESOLVE to 0 prior to
optimization, or reread the model with XPRSreadprob (READPROB).
Related topics
A.7.
Example 2 (Console)
Print the condition number after optimizing a problem.
READPROB
MINIM
BASISCONDITION
Further information
1. The condition number of an invertible matrix is the norm of the matrix multiplied with the norm
of its inverse. This number is an indication of how accurate the solution can be calculated and how
sensitive it is to small changes in the data. The larger the condition number is, the less accurate
the solution is likely to become.
2. The condition number is shown both for the scaled problem and in parenthesis for the original
problem.
rc = XPRSbtran(prob,y); /* y = e*B^{-1} */
/* Form z = y * A */
for(j = 0; J < ncol, j++) {
rc = XPRSgetcols(prob, mstart, mrowind, dmatval,
nrow, &nelt, j, j);
for(d = 0.0, ielt = 0, ielt < nelt; ielt++)
d += y[mrowind[ielt]] * dmatval[ielt];
y[nrow + j] = d;
}
Further information
If the matrix is in a presolved state, XPRSbtran will work with the basis for the presolved
problem.
Related topics
XPRSftran.
Related topics
XPRSmaxim (MAXIM)/XPRSminim (MINIM), IFCHECKCONVEXITY, EIGENVALUETOL.
Related controls
Double
MATRIXTOL Zero tolerance on matrix elements.
Example
In the following, the element in row 2, column 1 of the matrix is changed to 0.33:
XPRSchgcoef(prob,2,1,0.33);
Further information
XPRSchgmcoef is more efficient than multiple calls to XPRSchgcoef and should be used in its
place in such circumstances.
Related topics
XPRSaddcols, XPRSaddrows, XPRSchgmcoef, XPRSchgmqobj, XPRSchgobj, XPRSchgqobj,
XPRSchgrhs, XPRSgetcols, XPRSgetrows.
2. Calling XPRSchgcoltype to change any variable into a binary variable causes the bounds previ-
ously defined for the variable to be deleted and replaced by bounds of 0 and 1.
Related topics
XPRSaddcols, XPRSchgrowtype, XPRSdelcols, XPRSgetcoltype.
Related controls
Double
MATRIXTOL Zero tolerance on matrix elements.
Example
mrow[0] = 0; mrow[1] = 3;
mcol[0] = 1; mcol[1] = 5;
dval[0] = 2.0; dval[1] = 0.0;
XPRSchgmcoef(prob,2,mrow,mcol,dval);
Related topics
XPRSchgcoef, XPRSchgmqobj, XPRSchgobj, XPRSchgqobj, XPRSchgrhs, XPRSgetcols,
XPRSgetrhs.
Synopsis
int XPRS_CC XPRSchgmqobj(XPRSprob prob, int nels, const int mqcol1[], const
int mqcol2[], const double dval[]);
Arguments
prob The current problem.
nels The number of coefficients to change.
mqcol1 Integer array of size ncol containing the column index of the first variable in each
quadratic term.
mqcol2 Integer array of size ncol containing the column index of the second variable in each
quadratic term.
dval New values for the coefficients. If an entry in dval is 0, the corresponding entry will
be deleted. These are the coefficients of the quadratic Hessian matrix.
Example
The following code results in an objective function with terms: [6x12 + 3x1 x2 + 3x2 x1 ] / 2
Further information
1. The columns in the arrays mqcol1 and mqcol2 must already exist in the matrix. If the columns do
not exist, they must be added with XPRSaddcols.
2. XPRSchgmqobj is more efficient than repeated calls to XPRSchgqobj and should be used in its
place when several coefficients are to be changed.
Related topics
XPRSchgcoef, XPRSchgmcoef, XPRSchgobj, XPRSchgqobj, XPRSgetqobj.
Further information
The value of the fixed part of the objective function can be obtained using the OBJRHS problem
attribute.
Related topics
XPRSchgcoef, XPRSchgmcoef, XPRSchgmqobj, XPRSchgqobj, XPRSgetobj.
Related topics
XPRSlpoptimize, XPRSmipoptimize.
Synopsis
int XPRS_CC XPRSchgqobj(XPRSprob prob, int icol, int jcol, double dval);
Arguments
prob The current problem.
icol Column index for the first variable in the quadratic term.
jcol Column index for the second variable in the quadratic term.
dval New value for the coefficient in the quadratic Hessian matrix. If an entry in dval is 0,
the corresponding entry will be deleted.
Example
The following code adds the terms [6x12 + 3x1 x2 + 3x2 x1 ] / 2 to the objective function:
icol = jcol = 0; dval = 6.0;
XPRSchgqobj(prob,icol,jcol,dval);
icol = 0; jcol = 1; dval = 3.0;
XPRSchgqobj(prob,icol,jcol,dval);
Further information
1. The columns icol and jcol must already exist in the matrix. If the columns do not exist, they
must be added with the routine XPRSaddcols.
2. If icol is not equal to jcol, then both the matrix elements (icol, jcol) and (jcol, icol)
are changed to leave the Hessian symmetric.
Related topics
XPRSchgcoef, XPRSchgmcoef, XPRSchgmqobj, XPRSchgobj, XPRSgetqobj.
Further information
1. This function may be used to add new nonzero coefficients, or even to define the whole quadratic
expression with it. Doing that however is significantly less efficient than adding the whole expres-
sion with XPRSaddqmatrix.
2. The row must not be an equality or a ranged row.
Related topics
XPRSloadqcqp, XPRSgetqrowcoeff, XPRSaddqmatrix, XPRSchgqrowcoeff,
XPRSgetqrowqmatrix, XPRSgetqrowqmatrixtriplets, XPRSgetqrows, XPRSchgqobj,
XPRSchgmqobj, XPRSgetqobj,.
Related topics
XPRSchgcoef, XPRSchgmcoef, XPRSchgrhs, XPRSgetrhsrange.
Further information
A row can be changed to a range type row by first changing the row to an R or L type row and
then changing the range on the row using XPRSchgrhsrange.
Related topics
XPRSaddrows, XPRSchgcoltype, XPRSchgrhs, XPRSchgrhsrange, XPRSdelrows,
XPRSgetrowrange, XPRSgetrowtype.
Related topics
XPRScopycontrols, XPRScopyprob.
Related topics
XPRScopycallbacks, XPRScopyprob.
XPRSprob prob;
XPRSinit(NULL);
XPRScreateprob(&prob);
XPRSreadprob(prob,"myprob","");
Further information
1. XPRScreateprob must be called after XPRSinit and before using the other Optimizer routines.
2. Any number of problems may be created in this way, depending on your license details. All prob-
lems should be removed using XPRSdestroyprob once you have finished working with them.
3. If XPRScreateprob cannot complete successfully, a nonzero value is returned and *prob is set
to NULL (as a consequence, it’s not possible to retrieve further error information using e.g.
XPRSgetlasterror).
Related topics
XPRSdestroyprob, XPRScopyprob, XPRSinit.
mindex[0] = 3;
XPRSdelcols(prob,1,mindex);
Further information
1. After columns have been deleted from a problem, the numbers of the remaining columns are
moved down so that the columns are always numbered from 0 to COLS-1 where COLS is the
problem attribute containing the number of non-deleted columns in the matrix.
2. If the problem has already been optimized, or an advanced basis has been loaded, and you delete
a basis column the current basis will no longer be valid - the basis is "lost".
If you go on to re-optimize the problem, a warning message is displayed (140 ) and the Optimizer
automatically generates a corrected basis.
You can avoid losing the basis by only deleting non-basic columns (see XPRSgetbasis), taking a
basic column out of the basis first if necessary (see XPRSgetpivots and XPRSpivot).
Related topics
XPRSaddcols, XPRSdelrows.
3. A list of indices of the cuts to be deleted can also be provided. The list of active cuts at a node can
be obtained with the XPRSgetcutlist command.
Related topics
XPRSaddcuts, XPRSdelcpcuts, XPRSgetcutlist, XPRSloadcuts, 5.5.
Synopsis
int XPRS_CC XPRSdelindicators(XPRSprob prob, int first, int last);
Arguments
prob The current problem.
first First row in the range.
last Last row in the range (inclusive).
Example
In this example, if any of the first two rows of the matrix is an indicator constraint, they are
turned into normal rows:
XPRSdelindicators(prob,0,1);
Further information
This function has no effect on rows that are not indicator constraints.
Related topics
XPRSgetindicators, XPRSsetindicators.
Synopsis
int XPRS_CC XPRSdelnode(XPRSprob prob, int inode, int ifboth);
Arguments
prob The current problem.
inode Number of the node to delete.
ifboth Flag which must be one of:
0 meaning that the next descendant is to be deleted;
1 meaning that both descendants are to be deleted.
Example
XPRSdelnode(prob,10,0);
This deletes node number 10 in the tree search and its next descendent.
Further information
This routine might most effectively be called from a callback within the Branch and Bound search.
mindex[0] = 0; mindex[1] = 2;
XPRSdelsets(prob,2,mindex);
Further information
After sets have been deleted from a problem, the numbers of the remaining sets are moved
down so that the sets are always numbered from 0 to SETS-1 where SETS is the problem
attribute containing the number of non-deleted sets in the problem.
Related topics
XPRSaddsets.
Synopsis
int XPRS_CC XPRSdestroyprob(XPRSprob prob);
Argument
prob The problem to be destroyed.
Example
The following creates, loads and solves a problem called myprob, before subsequently freeing
any resources allocated to it:
XPRScreateprob(&prob);
XPRSreadprob(prob,"myprob","");
XPRSmaxim(prob,"");
XPRSdestroyprob(prob);
Further information
After work is finished, all problems must be destroyed. If a NULL problem pointer is passed to
XPRSdestroyprob, no error will result.
Related topics
XPRScreateprob, XPRSfree, XPRSinit.
Synopsis
DUMPCONTROLS
Related topics
SETDEFAULTS, SETDEFAULTCONTROL
Synopsis
EXIT
Example
The command is called simply as:
EXIT
Further information
1. Fatal error conditions return nonzero exit values which may be of use to the host operating system.
These are described in 11.
2. If you wish to return an exit code reflecting the final solution status, then use the STOP command
instead.
Related topics
STOP, XPRSsave (SAVE).
rc = XPRSftran(prob,y);
Get the (unscaled) tableau column of the slack variable for row number irow, assuming that all
arrays have been dimensioned.
rc = XPRSftran(prob,y);
Further information
If the matrix is in a presolved state, the function will work with the basis for the presolved
problem.
Related topics
XPRSbtran.
char banner[256];
...
if(XPRSinit(NULL))
{
XPRSgetbanner(banner);
printf("%s\n", banner);
return 1;
}
XPRSgetbanner(banner);
printf("%s\n", banner);
Further information
This function can most usefully be employed to return extra information if a problem occurs with
XPRSinit.
Related topics
XPRSinit.
int cols;
double *upact, *loact, *uup, *udn, *ucost, *lcost;
...
XPRSgetintattrib(prob,XPRS_COLS,&cols);
upact = malloc(cols*(sizeof(double)));
loact = malloc(cols*(sizeof(double)));
uup = malloc(cols*(sizeof(double)));
udn = malloc(cols*(sizeof(double)));
ucost = malloc(cols*(sizeof(double)));
lcost = malloc(cols*(sizeof(double)));
XPRSrange(prob);
XPRSgetcolrange(prob,upact,loact,uup,udn,ucost,lcost);
Further information
The activities and unit costs are obtained from the range file (problem_name.rng). The meaning
of the upper and lower column activities and upper and lower unit costs in the ASCII range files is
described in Appendix A.
Related topics
XPRSgetrowrange, XPRSrange.
This returns in nels the number of nonzero matrix elements in all columns of the matrix.
Further information
It is possible to obtain just the number of elements in the range of columns by replacing mstart,
mrwind and dmatval by NULL, as in the example. In this case, size must be set to 0 to indicate
that the length of arrays passed is zero. This is demonstrated in the example above.
Related topics
XPRSgetrows.
for(i=0;i<cols;i++) printf("%c\n",types[i]);
Related topics
XPRSchgcoltype, XPRSgetrowtype.
Further information
1. The violated cuts can be obtained by setting the delta parameter to the size of the (signed) viola-
tion required. If unviolated cuts are required as well, delta may be set to XPRS_MINUSINFINITY
which is defined in the library header file.
2. If the number of active cuts is greater than size, only size cuts will be returned and ncuts will
be set to the number of active cuts. If ncuts is less than size, then only ncuts positions will be
filled in mcutind.
3. In case of a cut of type ’L’, the violation equals the negative of the slack associated with the row
of the cut. In case of a cut of type ’G’, the violation equals the slack associated with the row of the
cut. For cuts of type ’E’, the violation equals the absolute value of the slack.
4. Please note, that the violations returned are absolute violations, while feasibility is checked by the
optimizer in the scaled problem.
Related topics
XPRSdelcpcuts, XPRSgetcpcuts, XPRSgetcutlist, XPRSloadcuts, XPRSgetcutmap,
XPRSgetcutslack, 5.5.
Synopsis
int XPRS_CC XPRSgetcutmap(XPRSprob prob, int ncuts, const XPRScut cuts[],
int cutmap[]);
Arguments
prob The current problem.
ncuts Number of cuts in the cuts array.
cuts Pointer array to the cuts, for which the row index is requested.
cutmap Integer array of length ncuts, where the row indices are returned.
Further information
For cuts currently not loaded into the problem, a row index of -1 is returned.
Related topics
XPRSgetcpcutlist, XPRSdelcpcuts, XPRSgetcutlist, XPRSloadcuts, XPRSgetcutslack,
XPRSgetcpcuts, 5.5.
Synopsis
int XPRS_CC XPRSgetcutslack(XPRSprob prob, XPRScut cut, double* dslack);
Arguments
prob The current problem.
cuts Pointer of the cut for which the slack is to be calculated.
dslack Double pointer where the value of the slack is returned.
Further information
For cuts currently not loaded into the problem, a row index of -1 is returned.
Related topics
XPRSgetcpcutlist, XPRSdelcpcuts, XPRSgetcutlist, XPRSloadcuts, XPRSgetcutmap,
XPRSgetcpcuts, 5.5.
int days;
...
XPRSinit(NULL);
if(XPRSgetdaysleft(&days) == 0) {
printf("Evaluation license expires in %d days\n", days);
} else {
printf("Not an evaluation license\n");
}
Further information
This function can only be used with evaluation licenses, and if called when a normal license is in
use returns an error code of 32. The expiry information for evaluation licenses is also included in
the Optimizer banner message.
Related topics
XPRSgetbanner.
Synopsis
int XPRS_CC XPRSgetdblattrib(XPRSprob prob, int ipar, double *dval);
Arguments
prob The current problem.
ipar Problem attribute whose value is to be returned. A full list of all available problem
attributes may be found in 10, or from the list in the xprs.h header file.
dval Pointer to a double where the value of the problem attribute will be returned.
Example
The following obtains the optimal value of the objective function and displays it to the console:
double lpobjval;
...
XPRSmaxim(prob,"");
XPRSgetdblattrib(prob,XPRS_LPOBJVAL,&lpobjval);
printf("The maximum profit is %f\n",lpobjval);
Related topics
XPRSgetintattrib, XPRSgetstrattrib.
Further information
1. The value ndir denotes the number of directives, at most MIPENTS, obtainable with
XPRSgetintattrib(prob,XPRS_MIPENTS,& mipents);.
2. Any of the arguments except prob and ndir may be NULL if not required.
Related topics
XPRSloaddirs, XPRSloadpresolvedirs.
Synopsis
int XPRS_CC XPRSgetiisdata(XPRSprob prob, int num, int *rownumber, int
*colnumber, int miisrow[], int miiscol[], char constrainttype[], char
colbndtype[], double duals[], double rdcs[], char isolationrows[],
char isolationcols[]);
Arguments
prob The current problem.
num The ordinal number of the IIS to get data for.
rownumber The number of rows in the IIS.
colnumber The number of bounds in the IIS.
miisrow Indices of rows in the IIS.
miiscol Indices of bounds (columns) in the IIS.
constrainttype Sense of rows in the IIS:
L for less or equal row;
G for greater or equal row.
colbndtype Sense of bound in the IIS:
U for upper bound;
L for lower bound.
duals The dual multipliers associated with the rows
rdcs The dual multipliers (reduced costs)associated with the bounds.
isolationrows The isolation status of the rows:
-1 if isolation information is not available for row (run iis isolations);
0 if row is not in isolation;
1 if row is in isolation
isolationcols The isolation status of the bounds:
isolationcols The isolation status of the bounds:
-1 if isolation information is not available for column (run iisisolations);
0 if column is not in isolation;
1 if column is in isolation.
Example
This example first retrieves the size of IIS 1, then gets the detailed information for the IIS.
rows = malloc(nrow*sizeof(int));
cols = malloc(ncol*sizeof(int));
constrainttype = malloc(nrow);
colbndtype = malloc(ncol);
duals = malloc(nrow*sizeof(double));
rdcs = malloc(ncol*sizeof(double));
isolationrows = malloc(nrow);
isolationcols = malloc(ncol);
XPRSgetiisdata(myprob, 1, &nrow, &ncol, rows, cols, constrainttype,
colbndtype, duals, rdcs, isolationrows, isolationcols);
4. The arrays may be NULL if not required. However, arrays constrainttype, duals and
isolationrows are only returned if miisrow is not NULL. Similarly, arrays colbndtype, rdcs
and isolationcols are only returned if miiscol is not NULL.
5. All the non NULL arrays should be of length rownumber or colnumber respectively.
6. For the initial IIS approximation (num = 0) the number of rows and columns with a nonzero La-
grange multiplier (dual/reduced cost respectively) are returned. Please note, that in such cases, it
might be necessary to call XPRSiisstatus to retrieve the necessary size of the return arrays.
Related topics
XPRSiisall, XPRSiisclear, XPRSiisfirst, XPRSiisisolations, XPRSiisnext,
XPRSiisstatus, XPRSiiswrite, IIS, A.7.
Related controls
Integer
MPSNAMELENGTH Maximum name length in characters.
Example
The following example loads problem and checks to see if "n 0203" is the name of a row or
column:
int seqr, seqc;
...
XPRSreadprob(prob,"problem","");
Synopsis
int XPRS_CC XPRSgetindicators(XPRSprob prob, int inds[], int comps[], int
first, int last);
Arguments
prob The current problem.
inds Integer array of length last-first+1 where the column indices of the indicator
variables are to be placed.
comps Integer array of length last-first+1 where the indicator complement flags will be
returned:
0 not an indicator constraint (in this case the corresponding entry in the inds
array is ignored);
1 for indicator constraints with condition "bin = 1";
-1 for indicator constraints with condition "bin = 0";
first First row in the range.
last Last row in the range (inclusive).
Example
The following example retrieves information about all indicator constraints in the matrix and
prints a list of their indices.
int i, rows;
double *inds, *comps;
...
XPRSgetintattrib(prob,XPRS_ROWS,&rows);
inds = malloc(rows*(sizeof(int)));
comps = malloc(rows*(sizeof(int)));
XPRSgetindicators(prob,inds,comps,0,rows-1);
puts("Indicator rows:");
for(i=0; i<rows; i++) if(comps[i]!=0) printf(" %d", i);
puts("\n");
Related topics
XPRSsetindicators, XPRSdelindicators.
Error values
91 A current problem is not available.
422 A solution is not available.
Related controls
Double
FEASTOL Zero tolerance on RHS.
OPTIMALITYTOL Reduced cost tolerance.
Example
In this example, XPRSgetinfeas is first called with nulled integer arrays to get the number of
infeasible entries. Then space is allocated for the arrays and the function is again called to fill
them in:
int npv, nps, nds, ndv, *mx, *mslack, *mdual, *mdj;
...
XPRSgetinfeas(prob, &npv, &nps, &nds, &ndv,
NULL, NULL, NULL, NULL);
mx = malloc(npv * sizeof(*mx));
mslack = malloc(nps * sizeof(*mslack));
mdual = malloc(nds * sizeof(*mdual));
mdj = malloc(ndv * sizeof(*mdj));
XPRSgetinfeas(prob, &npv, &nps, &nds, &ndv,
mx, mslack, mdual, mdj);
Further information
1. To find the infeasibilities in a previously saved solution, the solution must first be loaded into
memory with the XPRSreadbinsol (READBINSOL) function.
2. If any of the last four arguments are set to NULL, the corresponding number of infeasibilities is still
returned.
Synopsis
int XPRS_CC XPRSgetintattrib(XPRSprob prob, int ipar, int *ival);
Arguments
prob The current problem.
ipar Problem attribute whose value is to be returned. A full list of all problem attributes
may be found in 10, or from the list in the xprs.h header file.
ival Pointer to an integer where the value of the problem attribute will be returned.
Example
The following obtains the number of columns in the matrix and allocates space to obtain lower
bounds for each column:
int cols;
double *lb;
...
XPRSgetintattrib(prob,XPRS_COLS,&cols);
lb = (double *) malloc(sizeof(double)*cols);
XPRSgetlb(prob,lb,0,cols-1);
Related topics
XPRSgetdblattrib, XPRSgetstrattrib.
Related topics
11, ERRORCODE, XPRSsetcbmessage, XPRSsetlogfile.
int cols;
double *lb;
...
XPRSgetintattrib(prob,XPRS_COLS,&cols);
lb = (double *) malloc(sizeof(double)*cols);
XPRSgetlb(prob,lb,0,cols-1);
Further information
Values greater than or equal to XPRS_PLUSINFINITY should be interpreted as infinite; values
less than or equal to XPRS_MINUSINFINITY should be interpreted as infinite and negative.
Related topics
XPRSchgbounds, XPRSgetub.
char message[512];
...
if(XPRSinit(NULL))
{
XPRSgetlicerrmsg(message,512);
printf("%s\n", message);
}
Further information
The error message includes an error code, which in case the user wishes to use it is also returned
by the function. If there was no licensing error the function returns 0.
Related topics
XPRSinit.
Example
The following sequence of commands will get the LP solution (x) at the top node of a MIP and
the optimal MIP solution (y):
int cols;
double *x, *y;
...
XPRSmaxim(prob,"");
XPRSgetintattrib(prob,XPRS_ORIGINALCOLS,&cols);
x = malloc(cols*sizeof(double));
XPRSgetlpsol(prob,x,NULL,NULL,NULL);
XPRSglobal(prob);
y = malloc(cols*sizeof(double));
XPRSgetmipsol(prob,y,NULL);
Further information
1. If called during an XPRSglobal callback the solution of the current node will be returned.
2. If the matrix is modified after calling XPRSmaxim or XPRSminim, then the solution will no longer
be available.
3. If the problem has been presolved, then XPRSgetlpsol returns the solution to the origi-
nal problem. The only way to obtain the presolved solution is to call the related function,
XPRSgetpresolvesol.
Related topics
XPRSgetpresolvesol, XPRSgetmipsol, XPRSwriteprtsol, XPRSwritesol.
Example
The following sequence of commands will get the solution (x) of the last MIP solution for a
problem:
int cols;
double *x;
...
XPRSmaxim(prob,"g");
XPRSgetintattrib(prob,XPRS_ORIGINALCOLS,&cols);
x = malloc(cols*sizeof(double));
XPRSgetmipsol(prob,x,NULL);
Further information
Warning: If allocating space for the MIP solution the row and column sizes must be obtained for
the original problem and not for the presolve problem. They can be obtained before optimizing
or after calling XPRSpostsolve for the case where the global search has not completed.
Related topics
XPRSgetpresolvesol, XPRSwriteprtsol, XPRSwritesol.
Further information
1. The objective function is of the form cT x+0.5xT Qx where Q is positive semi-definite for minimiza-
tion problems and negative semi-definite for maximization problems. If this is not the case the
optimization algorithms may converge to a local optimum or may not converge at all. Note that
only the upper or lower triangular part of the Q matrix is returned.
2. The row and column indices follow the usual C convention of going from 0 to nrow-1 and 0 to
ncol-1 respectively.
3. The double constants XPRS_PLUSINFINITY and XPRS_MINUSINFINITY are defined in the Opti-
mizer library header file.
Related topics
XPRSchgmqobj, XPRSchgqobj, XPRSgetqobj.
Synopsis
int XPRS_CC XPRSgetnames(XPRSprob prob, int type, char names[], int first,
int last);
Arguments
prob The current problem.
type 1 if row names are required;
2 if column names are required.
3 if set names are required.
names Buffer long enough to hold the names. Since each name is 8*NAMELENGTH characters
long (plus a null terminator), the array, names, would be required to be at least as
long as (first-last+1)*(8*NAMELENGTH+1) characters. The names of the
row/column/set first+i will be written into the names buffer starting at position
i*8*NAMELENGTH+i.
first First row, column or set in the range.
last Last row, column or set in the range.
Related controls
Integer
MPSNAMELENGTH Maximum name length in characters.
Example
The following example retrieves the row and column names of the current problem:
int namelength;
...
XPRSgetintattrib(prob,XPRS_NAMELENGTH,&namelength);
printf("%s",names + i*(8*namelength+1));
Related topics
XPRSaddnames, XPRSgetnamelist.
Synopsis
int XPRS_CC XPRSgetobjecttypename(XPRSobject object, const char
**sObjectName);
Arguments
object The object for which the type name will be retrieved.
sObjectName Pointer to a char pointer returning a reference to the null terminated string
containing the object’s type name. For example, if the object is of type XPRSprob
then the returned pointer points to the string "XPRSprob".
Further information
This function is intended to be used typically from within the message callback function
registered with the XPRS_ge_setcbmsghandler function. In such cases the user will need to
identify the type of object sending the message since the message callback is passed only a
generic pointer to the FICO Xpress Optimizer object (XPRSobject) sending the message.
Related topics
XPRS_ge_setcbmsghandler.
XPRSgetintattrib(prob,XPRS_ROWS,&rows);
pPivot = malloc(rows*(sizeof(int)));
XPRSgetpivotorder(prob,pPivot);
Further information
Row indices are in the range 0 to ROWS-1; whilst columns are in the range ROWS+SPAREROWS to
ROWS+SPAREROWS+COLS-1.
Related topics
XPRSgetpivots, XPRSpivot.
Error value
425 Indicates in is invalid (out of range or already basic).
Example
The following retrieves a list of up to 5 potential leaving variables if variable 6 enters the basis:
Synopsis
int XPRS_CC XPRSgetpresolvebasis(XPRSprob prob, int rstatus[], int
cstatus[]);
Arguments
prob The current problem.
rstatus Integer array of length ROWS to the basis status of the stack, surplus or artificial
variable associated with each row. The status will be one of:
0 slack, surplus or artificial is non-basic at lower bound;
1 slack, surplus or artificial is basic;
2 slack or surplus is non-basic at upper bound.
May be NULL if not required.
cstatus Integer array of length COLS to hold the basis status of the columns in the constraint
matrix. The status will be one of:
0 variable is non-basic at lower bound, or superbasic at zero if the variable has no
lower bound;
1 variable is basic;
2 variable is at upper bound;
3 variable is super-basic.
May be NULL if not required.
Example
The following obtains and outputs basis information on a presolved problem prior to the global
search:
XPRSprob prob;
int i, cols, *cstatus;
...
XPRSreadprob(prob,"myglobalprob","");
XPRSminim(prob,"");
XPRSgetintattrib(prob,XPRS_COLS,&cols);
cstatus = malloc(cols*sizeof(int));
XPRSgetpresolvebasis(prob,NULL,cstatus);
for(i=0;i<cols;i++)
printf("Column %d: %d\n", i, cstatus[i]);
XPRSglobal(prob);
Related topics
XPRSgetbasis, XPRSloadbasis, XPRSloadpresolvebasis.
Synopsis
int XPRS_CC XPRSgetpresolvemap(XPRSprob prob, int rowmap[], int colmap[]);
Arguments
prob The current problem.
rowmap Integer array of length ROWS where the row maps will be returned.
colmap Integer array of length COLS where the column maps will be returned.
Example
The following reads in a (Mixed) Integer Programming problem and gets the mapping for the
rows and columns back to the original problem following optimization of the linear relaxation.
The elimination operations of the presolve are turned off so that a one-to-one mapping between
the presolve problem and the original problem.
XPRSreadprob(prob,"MyProb","");
XPRSsetintcontrol(prob,XPRS_PRESOLVEOPS,255);
XPRSmaxim(prob,"");
XPRSgetintattrib(prob,XPRS_COLS,&cols);
colmap = malloc(cols*sizeof(int));
XPRSgetintattrib(prob,XPRS_ROWS,&rows);
rowmap = malloc(rows*sizeof(int));
XPRSgetpresolvemap(prob,rowmap,colmap);
Further information
In order to get a one-to-one mappng between the presolve problem and the original problem
the elimination operations of the presolve must be turned off using;
XPRSsetintcontrol(prob,XPRS_PRESOLVEOPS,255);
Related topics
5.3.
Example
The following reads in a (Mixed) Integer Programming problem and displays the solution to the
presolved problem following optimization of the linear relaxation:
XPRSreadprob(prob,"MyProb","");
XPRSmaxim(prob,"");
XPRSgetintattrib(prob,XPRS_COLS,&cols);
x = malloc(cols*sizeof(double));
XPRSgetpresolvesol(prob,x,NULL,NULL,NULL);
for(i=0;i<cols;i++)
printf("Presolved x(%d) = %g\n",i,x[i]);
XPRSglobal(prob);
Further information
1. If the problem has not been presolved, the solution in memory will be returned.
2. The solution to the original problem should be returned using the related function
XPRSgetlpsol.
Related topics
XPRSgetlpsol, 5.3.
char probname[200];
...
XPRSgetprobname(prob,probname);
Related topics
XPRSsetprobname.
Synopsis
int XPRS_CC XPRSgetqobj(XPRSprob prob, int icol, int jcol, double *dval);
Arguments
prob The current problem.
icol Column index for the first variable in the quadratic term.
jcol Column index for the second variable in the quadratic term.
dval Pointer to a double value where the objective function coefficient is to be placed.
Example
The following returns the coefficient of the x0 2 term in the objective function, placing it in the
variable value :
double value;
...
XPRSgetqobj(prob,0,0,&value);
Further information
dval is the coefficient in the quadratic Hessian matrix. For example, if the objective function has
the term [3x1 x2 + 3x2 x1 ]/2 the value retrieved by XPRSgetqobj is 3.0 and if the objective
function has the term [6x1 2 ]/2 the value retrieved by XPRSgetqobj is 6.0.
Related topics
XPRSchgqobj, XPRSchgmqobj.
Synopsis
int XPRS_CC XPRSgetqrowcoeff (XPRSprob prob, int row, int icol, int jcol,
double *dval);
Arguments
prob The current problem.
row The quadratic row where the coefficient is to be looked up.
icol Column index for the first variable in the quadratic term.
jcol Column index for the second variable in the quadratic term.
dval Pointer to a double value where the objective function coefficient is to be placed.
Example
The following returns the coefficient of the x0 2 term in the second row, placing it in the variable
value :
double value;
...
XPRSgetqrowcoeff(prob,1,0,0,&value);
Further information
The coefficient returned corresponds to the Hessian of the constraint. That means the for
constraint x + [xˆ2 + 6 xy] <= 10 XPRSgetqrowcoeff would return 1 as the coefficient of
xˆ2 and 3 as the coefficient of xy.
Related topics
XPRSloadqcqp, XPRSaddqmatrix, XPRSchgqrowcoeff, XPRSgetqrowqmatrix,
XPRSgetqrowqmatrixtriplets, XPRSgetqrows, XPRSchgqobj, XPRSchgmqobj,
XPRSgetqobj.
Related topics
XPRSloadqcqp, XPRSgetqrowcoeff, XPRSaddqmatrix, XPRSchgqrowcoeff,
XPRSgetqrowqmatrixtriplets, XPRSgetqrows, XPRSchgqobj, XPRSchgmqobj,
XPRSgetqobj.
Related topics
XPRSchgrhs, XPRSchgrhsrange, XPRSgetrhs, XPRSrange.
int rows;
double *upact, *loact, *uup, *udn;
...
XPRSrange(prob);
XPRSgetintattrib(prob,XPRS_ROWS,&rows);
upact = malloc(rows*sizeof(double));
loact = malloc(rows*sizeof(double));
uup = malloc(rows*sizeof(double));
udn = malloc(rows*sizeof(double));
...
XPRSgetrowrange(prob,upact,loact,uup,udn);
Further information
The activities and unit costs are obtained from the range file (problem_name.rng). The meaning
of the upper and lower column activities and upper and lower unit costs in the ASCII range files is
described in Appendix A.
Related topics
XPRSchgrhsrange, XPRSgetcolrange.
Related topics
XPRSgetcols, XPRSgetrowrange, XPRSgetrowtype.
Related topics
XPRSchgrowtype, XPRSgetrowrange, XPRSgetrows.
mx = malloc(npv * sizeof(int));
mslack = malloc(nps * sizeof(int));
mdual = malloc(nds * sizeof(int));
mdj = malloc(ndv * sizeof(int));
XPRSgetscaledinfeas(prob, &npv, &nps, &nds, &ndv,
mx, mslack, mdual, mdj);
Further information
If any of the last four arguments are set to NULL, the corresponding number of infeasibilities is
still returned.
Related topics
XPRSgetinfeas, XPRSgetiisdata, XPRSiisall, XPRSiisclear, XPRSiisfirst,
XPRSiisisolations, XPRSiisnext, XPRSiisstatus, XPRSiiswrite, IIS.
Synopsis
int XPRS_CC XPRSgetstrattrib(XPRSprob prob, int ipar, char *cval);
Arguments
prob The current problem.
ipar Problem attribute whose value is to be returned. A full list of all problem attributes
may be found in 10, or from the list in the xprs.h header file.
cval Pointer to a string where the value of the attribute (plus null terminator) will be
returned.
Example
The following retrieves the name of the matrix just loaded:
char matrixname[256];
...
XPRSreadprob(prob,"myprob","");
XPRSgetstrattrib(prob, XPRS_MATRIXNAME, matrixname);
Related topics
XPRSgetdblattrib, XPRSgetintattrib.
Example
In the following, the value of MPSBOUNDNAME is retrieved and displayed:
char mpsboundname[256];
...
XPRSgetstrcontrol(prob, XPRS_MPSBOUNDNAME, mpsboundname);
printf("Name = %s\n", mpsboundname);
Related topics
XPRSgetdblcontrol, XPRSgetintcontrol, XPRSsetstrcontrol.
int cols;
double *ub;
...
XPRSgetintattrib(prob, XPRS_COLS, &cols);
ub = (double *) malloc(sizeof(double)*ncol);
XPRSgetub(prob, ub, 0, ncol-1);
Further information
Values greater than or equal to XPRS_PLUSINFINITY should be interpreted as infinite; values
less than or equal to XPRS_MINUSINFINITY should be interpreted as infinite and negative.
Related topics
XPRSchgbounds, XPRSgetlb.
Synopsis
int XPRS_CC XPRSgetunbvec(XPRSprob prob, int *junb);
Arguments
prob The current problem.
junb Pointer to an integer where the vector causing the problem to be detected as being
primal or dual unbounded will be returned. In the dual simplex case, the vector is the
leaving row for which the dual simplex detected dual unboundedness. In the primal
simplex case, the vector is the entering row junb (if junb is in the range 0 to ROWS-1)
or column (variable) junb-ROWS-SPAREROWS (if junb is between ROWS+SPAREROWS
and ROWS+SPAREROWS+COLS-1) for which the primal simplex detected primal
unboundedness.
Error value
91 A current problem is not available.
Further information
When solving using the dual simplex method, if the problem is primal infeasible then
XPRSgetunbvec returns the pivot row where dual unboundedness was detected. Also note that
when solving using the dual simplex method, if the problem is primal unbounded then
XPRSgetunbvec returns -1 since the problem is dual infeasible and not dual unbounded.
Related topics
XPRSgetinfeas, XPRSmaxim and XPRSminim.
Synopsis
int XPRS_CC XPRSgetversion(char *version);
Argument
version Buffer long enough to hold the version string (plus a null terminator). This should be
at least 16 characters.
Related controls
Integer
VERSION The Optimizer version number
Example
The following calls XPRSgetversion to return version information at the start of the program:
char version[16];
XPRSgetversion(version);
printf("Xpress-Optimizer version %s\n",version);
XPRSinit(NULL);
Further information
This function supersedes the VERSION control, which only returns the first two parts of the
version number. Release 2004 versions of the Optimizer have a three-part version number.
Related topics
XPRSinit.
Synopsis
int XPRS_CC XPRSglobal(XPRSprob prob);
GLOBAL
Argument
prob The current problem.
Related controls
Integer
BACKTRACK Node selection criterion.
BRANCHCHOICE Once a global entity has been selected for branching, this control determines
whether the branch with the minimum or maximum estimate is followed first.
BREADTHFIRST Limit for node selection criterion.
COVERCUTS Number of rounds of lifted cover inequalities at top node.
CPUTIME 1 for CPU time; 0 for elapsed time.
CUTDEPTH Maximum depth in the tree at which cuts are generated.
CUTFREQ Frequency at which cuts are generated in the tree search.
CUTSTRATEGY Specifies the cut strategy.
DEFAULTALG Algorithm to use with the tree search.
GOMCUTS Number of rounds of Gomory cuts at the top node.
KEEPMIPSOL Number of integer solutions to store.
MAXMIPSOL Maximum number of MIP solutions to find.
MAXNODE Maximum number of nodes in Branch and Bound search.
MAXTIME Maximum time allowed.
MIPLOG Global print flag.
MIPPRESOLVE Type of integer preprocessing to be performed.
MIPTHREADS Number of threads used for parallel MIP search.
NODESELECTION Node selection control.
REFACTOR Indicates whether to re-factorize the optimal basis.
SBBEST Number of infeasible global entities on which to perform strong branching.
SBITERLIMIT Number of dual iterations to perform strong branching.
SBSELECT The size of the candidate list of global entities for strong branching.
TREECOVERCUTS Number of rounds of lifted cover inequalities in the tree.
TREEGOMCUTS Number of rounds of Gomory cuts in the tree.
VARSELECTION Node selection degradator estimate control.
Double
DEGRADEFACTOR Factor to multiply estimated degradations by.
MIPABSCUTOFF Cutoff set after an LP optimizer command.
MIPABSSTOP Absolute optimality stopping criterion.
MIPADDCUTOFF Amount added to objective function to give new cutoff.
MIPRELCUTOFF Percentage cutoff.
MIPRELSTOP Relative optimality stopping criterion.
MIPTARGET Target object function for global.
XPRSreadprob(prob,"fred","");
XPRSmaxim(prob,"");
XPRSglobal(prob);
XPRSwriteprtsol(prob);
Example 2 (Console)
The equivalent set of commands for the Console Optimizer are:
READPROB fred
MAXIM
GLOBAL
WRITEPRTSOL
Further information
1. When an optimal LP solution has been found with XPRSmaxim (MAXIM) or XPRSminim (MINIM),
the search for an integer solution is started using XPRSglobal (GLOBAL). In many cases
XPRSglobal (GLOBAL) is to be called directly after XPRSmaxim (MAXIM)/XPRSminim (MINIM). In
such circumstances this can be achieved slightly more efficiently using the g flag to XPRSmaxim
(MAXIM)/XPRSminim (MINIM).
2. If a global search is interrupted and XPRSglobal (GLOBAL) is subsequently called again, the search
will continue where it left off. To restart the search at the top node you need to call either
XPRSinitglobal or XPRSpostolve (POSTSOLVE).
3. The controls described for XPRSmaxim (MAXIM) and XPRSminim (MINIM) can also be used to control
the XPRSglobal (GLOBAL) algorithm.
4. (Console) The global search may be interrupted by typing CTRL-C as long as the user has not already
typed ahead.
5. A summary log of six columns of information is output every n nodes, where -n is the value of
MIPLOG (see A.9).
6. Optimizer library users can check the final status of the global search using the MIPSTATUS prob-
lem attribute.
7. The Optimizer supports global (i.e. active node list) files in excess of 2 GigaBytes by spreading the
data over multiple files. The initial global file is given the name [Link] and subsequent
files are named [Link].1, [Link].2,.... No individual file will be bigger than
2GB.
Related topics
XPRSfixglobal (FIXGLOBAL), XPRSinitglobal, XPRSmaxim (MAXIM)/XPRSminim (MINIM), A.9.
Example 2 (Console)
Suppose we have a problem where the weight for objective function OBJ1 is unknown and we
wish to perform goal programming, maximizing this row and relaxing the resulting constraint by
5% of the optimal value, then the following sequence will solve this problem:
READPROB
GOAL
P
O
OBJ1
MAX
P
5
<empty line>
HELP MAXTIME
Related topics
None.
READPROB [Link]
IIS
IIS -i -p 1
IIS -w 1 "[Link]" lp
IIS -e 1 "[Link]"
11. Please note, that there are problems on the boundary of being infeasible or not. For such prob-
lems, feasibility or infeasibility often depends on tolerances or even on scaling. This phenomenon
makes it possible that after writing an IIS out as an LP file and reading it back, it may report
feasibility. As a first check it is advised to consider the following options:
(a) Turn presolve off (e.g. in console presolve = 0) since the nature of an IIS makes it necessary
that during their identification the presolve is turned off.
(b) Use the primal simplex method to solve the problem (e.g. in console maxim -p).
12. Note that the original sense of the original objective function plays no role in an IIS.
13. The supplementary information provided in the CSV file created by IIS e is identical to that
returned by the XPRSgetiisdata function.
14. The IIS approximation and the IISs generated so far are always available.
Related topics
XPRSgetiisdata, XPRSiisall, XPRSiisclear, XPRSiisfirst, XPRSiisisolations,
XPRSiisnext, XPRSiisstatus, XPRSiiswrite.
Synopsis
int XPRS_CC XPRSiisall(XPRSprob prob);
Argument
prob The current problem.
Related controls
Integer
MAXIIS Number of Irreducible Infeasible Sets to be found.
Example
This example searches for IISs and then questions the problem attribute NUMIIS to determine
how many were found:
int iis;
...
XPRSiisall(prob);
XPRSgetintattrib(prob, XPRS_NUMIIS, &iis);
printf("number of IISs = %d\n", iis);
Further information
1. Calling IIS -a from the console has the same effect as this function.
2. A model may have several infeasibilities. Repairing a single IIS may not make the model feasible.
For this reason the Optimizer can find an IIS for each of the infeasibilities in a model. If the control
MAXIIS is set to a positive integer value then the XPRSiisall command will stop if MAXIIS IISs
have been found. By default the control MAXIIS is set to -1, in which case an IIS is found for each
of the infeasibilities in the model.
3. The problem attribute NUMIIS allows the user to recover the number of IISs found in a particular
search. Alternatively, the XPRSiisstatus function may be used to retrieve the number of IISs
found by XPRSiisfirst (IIS), XPRSiisnext (IIS -n) or XPRSiisall (IIS -a) functions.
Related topics
XPRSgetiisdata, XPRSiisclear, XPRSiisfirst, XPRSiisisolations, XPRSiisnext,
XPRSiisstatus, XPRSiiswrite, IIS.
Further information
1. Calling IIS -c from the console has the same effect as this function.
2. The information stored internally about the IISs identified by XPRSiisfirst, XPRSiisnext or
XPRSiisall are cleared. Functions XPRSgetiisdata, XPRSiisstatus, XPRSiiswrite and
XPRSiisisolations cannot be called until the IIS identification procedure is started again.
3. This function is automatically called by XPRSiisfirst and XPRSiisall
Related topics
XPRSgetiisdata, XPRSiisall, XPRSiisfirst, XPRSiisisolations, XPRSiisnext,
XPRSiisstatus, XPRSiiswrite, IIS.
XPRSiisfirst(myprob,1,&status);
Further information
1. Calling IIS from the console has the same effect as this function.
2. A model may have several infeasibilities. Repairing a single IIS may not make the model feasible.
For this reason the Optimizer can find an IIS for each of the infeasibilities in a model. For the
generation of several independent IISs use functions XPRSiisnext (IIS -n) or XPRSiisall (IIS
-a).
3. IIS sensitivity filter: after an optimal but infeasible first phase primal simplex, it is possible to
identify a subproblem containing all the infeasibilities (corresponding to the given basis) to reduce
the size of the IIS working problem dramatically, i.e., rows with zero duals (thus with artificials of
zero reduced cost) and columns that have zero reduced costs may be deleted. Moreover, for rows
and columns with nonzero costs, the sign of the cost is used to relax equality rows either to less
than or greater than equal rows, and to drop either possible upper or lower bounds on columns.
4. Initial infeasible subproblem: The subproblem identified after the sensitivity filter is referred to
as initial infeasible subproblem. Its size is crucial to the running time of the deletion filter and it
contains all the infeasibilities of the first phase simplex, thus if the corresponding rows and bounds
are removed the problem becomes feasible.
5. XPRSiisfirst performs the initial sensitivity analysis on rows and columns to reduce the problem
size, and sets up the initial infeasible subproblem. This subproblem significantly speeds up the gen-
eration of IISs, however in itself it may serve as an approximation of an IIS, since its identification
typically takes only a fraction of time compared to the identification of an IIS.
6. The IIS approximation and the IISs generated so far are always available.
Related topics
XPRSgetiisdata, XPRSiisall, XPRSiisclear, XPRSiisisolations, XPRSiisnext,
XPRSiisstatus, XPRSiiswrite, IIS.
4. The num parameter cannot be zero: the concept of isolations is meaningless for the initial infeasi-
ble subproblem.
Related topics
XPRSgetiisdata, XPRSiisall, XPRSiisclear, XPRSiisfirst, XPRSiisnext,
XPRSiisstatus, XPRSiiswrite, IIS.
Synopsis
int XPRS_CC XPRSiisnext(XPRSprob prob, int *status_code);
Arguments
prob The current problem.
status_code The status after the search:
0 success;
1 no more IIS could be found, or problem is feasible if no XPRSiisfirst call preceded;
2 on error (when the function returns nonzero).
Example
This looks for a further IIS.
XPRSiisnext(prob,&status_code);
Further information
1. Calling IIS -n from the console has the same effect as this function.
2. A model may have several infeasibilities. Repairing a single IIS may not make the model feasible.
For this reason the Optimizer attempts to find an IIS for each of the infeasibilities in a model.
You may call the XPRSiisnext function repeatedly, or use the XPRSiisall (IIS -a) function to
retrieve all IIS at once.
3. This function is not affected by the control MAXIIS.
4. If the problem has been modified since the last call to XPRSiisfirst or XPRSiisnext, the gen-
eration process has to be started from scratch.
Related topics
XPRSgetiisdata, XPRSiisall, XPRSiisclear, XPRSiisfirst, XPRSiisisolations,
XPRSiisstatus, XPRSiiswrite, IIS.
Synopsis
int XPRS_CC XPRSiisstatus(XPRSprob prob, int *iiscount, int rowsizes[], int
colsizes[], double suminfeas[], int numinfeas[]);
Arguments
prob The current problem.
iiscount The number of IISs found so far.
rowsizes Number of rows in the IISs.
colsizes Number of bounds in the IISs.
suminfeas The sum of infeasibilities in the IISs after the first phase simplex.
numinfeas The number of infeasible variables in the IISs after the first phase simplex.
Example
This example first retrieves the number of IISs found so far, and then retrieves their main
properties. Note that the arrays have size count+1, since the first index is reserved for the initial
infeasible subset.
XPRSiisstatus(myprob,&count,NULL,NULL,NULL,NULL);
rowsizes = malloc((count+1)*sizeof(int));
colsizes = malloc((count+1)*sizeof(int));
suminfeas = malloc((count+1)*sizeof(double));
numinfeas = malloc((count+1)*sizeof(int));
XPRSiisstatus(myprob,&count,rowsizes,colsizes,suminfeas,numinfeas);
Further information
1. Calling IIS -s from the console has the same effect as this function.
2. All arrays should be of dimension iiscount+1. The arrays are 0 based, index 0 corresponding to
the initial infeasible subproblem.
3. The arrays may be NULL if not required.
4. For the initial infeasible problem (at position 0) the subproblem size is returned (which may be
different from the number of bounds), while for the IISs the number of bounds is returned (usually
much smaller than the number of columns in the IIS).
5. Note that the values in suminfeas and numinfeas heavily depend on the actual basis where the
simplex has stopped.
6. iiscount is set to -1 if the search for IISs has not yet started.
Related topics
XPRSgetiisdata, XPRSiisall, XPRSiisclear, XPRSiisfirst, XPRSiisisolations,
XPRSiisnext, XPRSiiswrite, IIS.
Synopsis
int XPRS_CC XPRSiiswrite(XPRSprob prob, int num, const char *fn, int type,
const char *typeflags);
Arguments
prob The current problem.
num The ordinal number of the IIS to be written.
fn The name of the file to be created.
type Type of file to be created:
0 creates an lp/mps file containing the IIS as a linear programming problem;
1 creates a comma separated (csv) file containing the description and supplementary
information on the given IIS.
typeflags Flags passed to the XPRSwriteprob function.
Example
This writes the first IIS (if one exists and is already found) as an lp file.
XPRSiiswrite(prob,1,"[Link]",0,"l")
Further information
1. Calling IIS -w [num] fn and IIS -e [num] fn from the console have the same effect as this
function.
2. Please note, that there are problems on the boundary of being infeasible or not. For such prob-
lems, feasibility or infeasibility often depends on tolerances or even on scaling. This phenomenon
makes it possible that after writing an IIS out as an LP file and reading it back, it may report
feasibility. As a first check it is advised to consider the following options:
(a) save the IIS using MPS hexadecimal format (e.g. in console: IIS -w 1 [Link] x) to elim-
inate rounding errors associated with conversion between internal and decimal representa-
tion.
(b) turn presolve off (e.g. in console presolve = 0) since the nature of an IIS makes it necessary
that during their identification the presolve is turned off.
(c) use the primal simplex method to solve the problem (e.g. in console maxim -p).
3. Note that the original sense of the original objective function plays no role in an IIS.
4. Even though an attempt is made to identify the most infeasible IISs first by the XPRSiisfirst
(IIS), XPRSiisnext (IIS -n) and XPRSiisall (IIS -a) functions, it is also possible that an IIS
becomes just infeasible in problems that are otherwise highly infeasible. In such cases, you may
try to deal with the more stable IISs first, and consider to use the infeasibility breaker tool if only
slight infeasibilities remain.
5. The LP or MPS files created by XPRSiiswrite corresponding to an IIS contain no objective func-
tion, since infeasibility is independent from the objective.
Related topics
XPRSgetiisdata, XPRSiisall, XPRSiisclear, XPRSiisfirst, XPRSiisisolations,
XPRSiisnext, XPRSiisstatus, IIS.
Example
The following is the usual way of calling XPRSinit :
if(XPRSinit(NULL)) printf("Problem with XPRSinit\n");
Further information
1. Whilst error checking should always be used on all library function calls, it is especially important to
do so with the initialization functions, since a majority of errors encountered by users are caused
at the initialization stage. Any nonzero return code indicates that no license could be found.
In such circumstances the application should be made to exit. A return code of 32, however,
indicates that a student license has been found and the software will work, but with restricted
functionality and problem capacity. It is possible to retrieve a message describing the error by
calling XPRSgetlicerrmsg.
2. In multi-threaded applications where all threads are equal, XPRSinit may be called by each thread
prior to using the library. Whilst the process of initialization will be carried out only once, this
guarantees that the library functions will be available to each thread as necessary. In applications
with a clear master thread, spawning other Optimizer threads, initialization need only be called
by the master thread.
Related topics
XPRScreateprob, XPRSfree, XPRSgetlicerrmsg.
Example
The following initializes the global search before attempting to solve the problem again:
XPRSinitglobal(prob);
XPRSmaxim(prob,"g");
Related topics
XPRSglobal, XPRSmaxim (MAXIM)/XPRSminim (MINIM).
Synopsis
int XPRS_CC XPRSinitializenlphessian(XPRSprob prob, const int mstart[],
const int mcol[]);
Arguments
prob The current problem.
mstart Integer array of length NCOLS indicating the starting offsets in the for each column.
mcol Integer array of length mstart[NCOLS-CSTYLE] containing the column indices of the
nonzero elements in the lower triangular part of the quadratic matrix.
Further information
No multiple definitions of the same entry are allowed, and the matrix must be lower triangular.
Because the Hessian user callback will expect the same order as is defined here, the optimizer
does not attempt to correct any inconsistancies in the input data, but gives an error message if
any is detected.
Related topics
XPRSinitializenlphessian_indexpairs, XPRSsetcbnlpevaluate,
XPRSsetcbnlpgradient, XPRSsetcbnlphessian, XPRSgetcbnlpevaluate,
XPRSgetcbnlpgradient, XPRSgetcbnlphessian, XPRSresetnlp, 4.5.
Synopsis
int XPRS_CC XPRSinitializenlphessian_indexpairs(XPRSprob prob, int nqcelem,
const int mcol1[], const int mcol2[]);
Arguments
prob The current problem.
nqcelem Number of nonzeros in the maximal possible Hessian.
mcol1 First index of the nonzeros.
mcol2 Second index of the nonzeros.
Further information
1. Arrays mcol1 and mcol2 should satisfy the following requirements:
XPRSreadprob(prob,"problem","");
XPRSloadbasis(prob,rstatus,cstatus);
XPRSminim(prob,"");
Further information
If the problem has been altered since saving an advanced basis, you may want to alter the basis as
follows before loading it:
• Make new variables non-basic at their lower bound (cstatus[icol]=0), unless a variable
has an infinite lower bound and a finite upper bound, in which case make the variable
non-basic at its upper bound (cstatus[icol]=2);
• Make new constraints basic (rstatus[jrow]=1);
• Try not to delete basic variables, or non-basic constraints.
Related topics
XPRSgetbasis, XPRSgetpresolvebasis, XPRSloadpresolvebasis.
Synopsis
int XPRS_CC XPRSloadbranchdirs(XPRSprob prob, int ndirs, const int mcols[],
const int mbranch[]);
Arguments
prob The current problem.
ndirs Number of directives.
mcols Integer array of length ndirs containing the column numbers. A negative value
indicates a set number (the first set being -1, the second -2, and so on).
mbranch Integer array of length ndirs containing either 0 or 1 for the entities given in mcols.
Entities for which mbranch is set to 1 will be branched on until fixed before a global
feasible solution is returned. If mbranch is NULL, the branching directive will be set
for all entities in mcols.
Related topics
XPRSloaddirs, XPRSreaddirs, A.6.
Further information
Delayed rows must be set up before solving the problem. Any delayed rows will be removed from
the matrix after presolve and added to a special pool. A delayed row will be added back into the
active matrix only when such a row is violated by an integer solution found by the optimizer.
Related topics
XPRSloadmodelcuts.
Related topics
XPRSgetdirs, XPRSloadpresolvedirs, XPRSreaddirs.
maximize: x + 2y
subject to: 3x + 2y ≤ 400
x + 3y ≤ 200
int ngents = 2;
int nsets = 0;
char qgtype[] = {"I","I"};
int mgcols[] = {0,1};
...
XPRSloadglobal(prob, probname, ncol, nrow, qrtype, rhs, NULL,
objcoefs, mstart, NULL, mrwind,
dmatval, dlb, dub, ngents, nsets, qgtype, mgcols,
NULL, NULL, NULL, NULL, NULL);
Further information
1. The row and column indices follow the usual C convention of going from 0 to nrow-1 and 0 to
ncol-1 respectively.
2. The double constants XPRS_PLUSINFINITY and XPRS_MINUSINFINITY are defined in the Opti-
mizer library header file.
3. Semi-continuous lower bounds are taken from the dlim array. If this is NULL then they are given
a default value of 1.0. If a semi-continuous variable has a positive lower bound then this will be
used as the semi-continuous lower bound and the lower bound on the variable will be set to zero.
Related topics
XPRSaddsetnames, XPRSloadlp, XPRSloadqglobal, XPRSloadqp, XPRSreadprob.
Synopsis
int XPRS_CC XPRSloadlp(XPRSprob prob, const char *probname, int ncol, int
nrow, const char qrtype[], const double rhs[], const double range[],
const double obj[], const int mstart[], const int mnel[], const int
mrwind[], const double dmatval[], const double dlb[], const double
dub[]);
Arguments
prob The current problem.
probname A string of up to 200 characters containing a names for the problem.
ncol Number of structural columns in the matrix.
nrow Number of rows in the matrix (not including the objective). Objective coefficients
must be supplied in the obj array, and the objective function should not be included
in any of the other arrays.
qrtype Character array of length nrow containing the row types:
L indicates a ≤ constraint;
E indicates an = constraint;
G indicates a ≥ constraint;
R indicates a range constraint;
N indicates a nonbinding constraint.
rhs Double array of length nrow containing the right hand side coefficients of the rows.
The right hand side value for a range row gives the upper bound on the row.
range Double array of length nrow containing the range values for range rows. Values for
all other rows will be ignored. May be NULL if not required. The lower bound on a
range row is the right hand side value minus the range value. The sign of the range
value is ignored - the absolute value is used in all cases.
obj Double array of length ncol containing the objective function coefficients.
mstart Integer array containing the offsets in the mrwind and dmatval arrays of the start of
the elements for each column. This array is of length ncol or, if mnel is NULL, length
ncol+1. If mnel is NULL, the extra entry of mstart, mstart[ncol], contains the
position in the mrwind and dmatval arrays at which an extra column would start, if it
were present. In C, this value is also the length of the mrwind and dmatval arrays.
mnel Integer array of length ncol containing the number of nonzero elements in each
column. May be NULL if not required. This array is not required if the non-zero
coefficients in the mrwind and dmatval arrays are continuous, and the mstart array
has ncol+1 entries as described above.
mrwind Integer array containing the row indices for the nonzero elements in each column. If
the indices are input contiguously, with the columns in ascending order, the length of
the mrwind is mstart[ncol-1]+mnel[ncol-1] or, if mnel is NULL, mstart[ncol].
dmatval Double array containing the nonzero element values; length as for mrwind.
dlb Double array of length ncol containing the lower bounds on the columns. Use
XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
dub Double array of length ncol containing the upper bounds on the columns. Use
XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
Related controls
Integer
maximize: x+y
subject to: 2x ≥ 3
x + 2y ≥ 3
x+y ≥ 1
the following shows how this may be loaded into the Optimizer using XPRSloadlp:
char probname[] = "small";
int ncol = 2, nrow = 3;
char qrtype[] = {"G","G","G"};
double rhs[] = { 3 , 3 , 1 };
double obj[] = { 1 , 1 };
int mstart[] = { 0 , 3 , 5 };
int mrwind[] = { 0 , 1 , 2 , 1 , 2 };
double dmatval[] = { 2 , 1 , 1 , 2 , 1 };
double dlb[] = { 0 , 0 };
double dub[] = {XPRS_PLUSINFINITY,XPRS_PLUSINFINITY};
X
rhsj − |rangej | ≤ aij xi ≤ rhsj
i
Related topics
XPRSloadglobal, XPRSloadqglobal, XPRSloadqp, XPRSreadprob.
XPRSreadprob(prob,"problem",""):
XPRSloadmipsol(prob,dsol,&status);
XPRSminim(prob,"g");
Further information
The values for the continuous variables in the dsol array are ignored and are calculated by fixing
the integer variables and reoptimizing.
Related topics
XPRSgetmipsol.
Example
This sets the first six matrix rows as model cuts in the global problem myprob.
int mrows[] = {0,1,2,3,4,5}
...
XPRSloadmodelcuts(prob,6,mrows);
XPRSminim(prob,"g");
Further information
1. During presolve the model cuts are removed from the matrix. Following optimization, the violated
model cuts are added back into the matrix and the matrix re-optimized. This continues until no
violated cuts remain.
2. The model cuts must be "true" model cuts, in the sense that they are redundant at the optimal
MIP solution. The Optimizer does not guarantee to add all violated model cuts, so they must not
be required to define the optimal MIP solution.
Related topics
5.5.
Related controls
Integer
EXTRACOLS Number of extra columns to be allowed for.
EXTRAELEMS Number of extra matrix elements to be allowed for.
EXTRAMIPENTS Number of extra global entities to be allowed for.
EXTRAPRESOLVE Number of extra elements to allow for in presolve.
EXTRAQCELEMENTS Number of extra qcqp elements to be allowed for.
EXTRAQCROWS Number of extra qcqp matrices to be allowed for.
EXTRAROWS Number of extra rows to be allowed for.
KEEPNROWS Status for nonbinding rows.
SCALING Type of scaling.
Double
MATRIXTOL Zero tolerance on matrix elements.
Example
To load the following problem presented in LP format:
minimize [ x^2 ]
s.t.
4 x + y <= 4
x + y + [z^2] <= 5
[ x^2 + 2 x*y + y^2 + 4 y*z + z^2 ] <= 10
x + 2 y >= 8
[ 3 y^2 ] <= 20
end
the following code may be used:
{
int ncols = 3;
int nrows = 5;
int nqtr = 1;
int mqc1[] = {0};
int mqc2[] = {0};
double dqe[] = {1};
int qmn = 3;
int qcrows[] = {1,2,4};
int qcnquads[] = {1,5,1};
int qcmcol1[] = {2,0,0,1,1,2,1};
int qcmcol2[] = {2,0,1,1,2,2,1};
// ! to have 2xy define 1xy (1yx will be assumed to be implicitly
present)
double qcdqval[] = {1,1,1,1,2,1,3};
}
XPRSloadqcqp(xprob,"qcqp",ncols,nrows,rowtypes,rhs,range,obj,mstart,
mnel,mrind,dmatval,lb,ub,nqtr,mqc1,mqc2,dqe,qmn,qcrows,qcnquads,
qcmcol1,qcmcol2,qcdqval);
Further information
1. The objective function is of the form cT x+xT Qx where Q is positive semi-definite for minimization
problems and negative semi-definite for maximization problems. If this is not the case the opti-
mization algorithms may converge to a local optimum or may not converge at all. Note that only
the upper or lower triangular part of the Q matrix is specified.
2. All Q matrices in the constraints must be positive semi-definite. Note that only the upper or lower
triangular part of the Q matrix is specified for constraints as well.
3. The row and column indices follow the usual C convention of going from 0 to nrow-1 and 0 to
ncol-1 respectively.
4. The double constants XPRS_PLUSINFINITY and XPRS_MINUSINFINITY are defined in the Opti-
mizer library header file.
Related topics
XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp, XPRSreadprob.
5. The row and column indices follow the usual C convention of going from 0 to nrow-1 and 0 to
ncol-1 respectively.
6. The double constants XPRS_PLUSINFINITY and XPRS_MINUSINFINITY are defined in the Opti-
mizer library header file.
7. Semi-continuous lower bounds are taken from the dlim array. If this is NULL then they are given
a default value of 1.0. If a semi-continuous variable has a positive lower bound then this will be
used as the semi-continuous lower bound and the lower bound on the variable will be set to zero.
Related topics
XPRSloadglobal, XPRSloadlp, XPRSloadqcqp, XPRSloadqglobal, XPRSloadqp,
XPRSreadprob.
Related topics
XPRSgetbasis, XPRSgetpresolvebasis, XPRSloadbasis.
Example
The following loads priority directives for column 0 in the matrix:
int mcols[] = {0}, mpri[] = {1};
...
XPRSminim(prob,"");
XPRSloadpresolvedirs(prob,1,mcols,mpri,NULL,NULL,NULL);
XPRSminim(prob,"g");
Related topics
XPRSgetdirs, XPRSloaddirs.
primal = malloc(ncol*sizeof(double));
dual = malloc(nrow*sizeof(double));
...
XPRSloadqglobal(prob, "myprob", ncol, nrow, qrtype, rhs,
NULL, obj, mstart, NULL, mrwind,
dmatval, lbound, ubound, nquad, mqc1, mqc2,
dquad, ngents, nsets, qgtype, mgcols, NULL,
NULL, NULL, NULL, NULL)
Further information
1. The objective function is of the form c’x+x’Qx where Q is positive semi-definite for minimization
problems and negative semi-definite for maximization problems. If this is not the case the opti-
mization algorithms may converge to a local optimum or may not converge at all. Note that only
the upper or lower triangular part of the Q matrix is specified.
2. The row and column indices follow the usual C convention of going from 0 to nrow-1 and 0 to
ncol-1 respectively.
3. The double constants XPRS_PLUSINFINITY and XPRS_MINUSINFINITY are defined in the Opti-
mizer library header file.
Related topics
XPRSaddsetnames, XPRSloadglobal, XPRSloadlp, XPRSloadqp, XPRSreadprob.
Synopsis
int XPRS_CC XPRSloadqp(XPRSprob prob, const char *probname, int ncol, int
nrow, const char qrtype[], const double rhs[], const double range[],
const double obj[], const int mstart[], const int mnel[], const int
mrwind[], const double dmatval[], const double dlb[], const double
dub[], int nqtr, const int mqc1[], const int mqc2[], const double
dqe[]);
Arguments
prob The current problem.
probname A string of up to 200 characters containing a names for the problem.
ncol Number of structural columns in the matrix.
nrow Number of rows in the matrix (not including the objective row). Objective coefficients
must be supplied in the obj array, and the objective function should not be included
in any of the other arrays.
qrtype Character array of length nrow containing the row types:
L indicates a ≤ constraint;
E indicates an = constraint;
G indicates a ≥ constraint;
R indicates a range constraint;
N indicates a nonbinding constraint.
rhs Double array of length nrow containing the right hand side coefficients of the rows.
The right hand side value for a range row gives the upper bound on the row.
range Double array of length nrow containing the range values for range rows. Values for
all other rows will be ignored. May be NULL if there are no ranged constraints. The
lower bound on a range row is the right hand side value minus the range value. The
sign of the range value is ignored - the absolute value is used in all cases.
obj Double array of length ncol containing the objective function coefficients.
mstart Integer array containing the offsets in the mrwind and dmatval arrays of the start of
the elements for each column. This array is of length ncol or, if mnel is NULL, length
ncol+1. If mnel is NULL the extra entry of mstart, mstart[ncol], contains the
position in the mrwind and dmatval arrays at which an extra column would start, if it
were present. In C, this value is also the length of the mrwind and dmatval arrays.
mnel Integer array of length ncol containing the number of nonzero elements in each
column. May be NULL if all elements are contiguous and mstart[ncol] contains the
offset where the elements for column ncol+1 would start. This array is not required if
the non-zero coefficients in the mrwind and dmatval arrays are continuous, and the
mstart array has ncol+1 entries as described above. It may be NULL if not required.
mrwind Integer array containing the row indices for the nonzero elements in each column. If
the indices are input contiguously, with the columns in ascending order, the length of
the mrwind is mstart[ncol-1]+mnel[ncol-1] or, if mnel is NULL, mstart[ncol].
dmatval Double array containing the nonzero element values; length as for mrwind.
dlb Double array of length ncol containing the lower bounds on the columns. Use
XPRS_MINUSINFINITY to represent a lower bound of minus infinity.
dub Double array of length ncol containing the upper bounds on the columns. Use
XPRS_PLUSINFINITY to represent an upper bound of plus infinity.
primal = malloc(ncol*sizeof(double));
dual = malloc(nrow*sizeof(double));
...
XPRSloadqp(prob, "example", ncol, nrow, qrtype, rhs,
NULL, obj, mstart, NULL, mrwind, dmatval,
lbound, ubound, nquad, mqc1, mqc2, dquad)
Further information
1. The objective function is of the form c’x+x’Qx where Q is positive semi-definite for minimization
problems and negative semi-definite for maximization problems. If this is not the case the opti-
mization algorithms may converge to a local optimum or may not converge at all. Note that only
the upper or lower triangular part of the Q matrix is specified.
2. The row and column indices follow the usual C convention of going from 0 to nrow-1 and 0 to
ncol-1 respectively.
3. The double constants XPRS_PLUSINFINITY and XPRS_MINUSINFINITY are defined in the Opti-
mizer library header file.
Synopsis
int XPRS_CC XPRSloadsecurevecs(XPRSprob prob, int nr, int nc, const int
mrow[], const int mcol[]);
Arguments
prob The current problem.
nr Number of rows to be marked.
nc Number of columns to be marked.
mrow Integer array of length nr containing the rows to be marked. May be NULL if not
required.
mcol Integer array of length nc containing the columns to be marked. May be NULL if not
required.
Example
This sets the first six rows and the first four columns to not be removed during presolve.
Related topics
5.3.
Related controls
Integer
AUTOPERTURB Whether automatic perturbation is performed.
BARITERLIMIT Maximum number of Newton Barrier iterations.
BARORDER Ordering algorithm for the Cholesky factorization.
BAROUTPUT Newton barrier: level of solution output.
BARTHREADS Max number of threads to run.
BIGMMETHOD Specifies "Big M" method, or phaseI/phaseII.
CACHESIZE Cache size in Kbytes for the Newton barrier.
CPUTIME 1 for CPU time; 0 for elapsed time.
CRASH Type of crash.
CROSSOVER Newton barrier crossover control.
DEFAULTALG Algorithm to use with the tree search.
DENSECOLLIMIT Columns with this many elements are considered dense.
DUALGRADIENT Pricing method for the dual algorithm.
INVERTFREQ Invert frequency.
INVERTMIN Minimum number of iterations between inverts.
KEEPBASIS Whether to use previously loaded basis.
LPITERLIMIT Iteration limit for the simplex algorithm.
LPLOG Frequency and type of simplex algorithm log.
MAXTIME Maximum time allowed.
PRESOLVE Degree of presolving to perform.
PRESOLVEOPS Specifies the operations performed during presolve.
Example 1 (Library)
XPRSmaxim(prob,"b");
This maximizes the current problem using the Newton barrier method.
Example 2 (Console)
MINIM -g
This minimizes the current problem and commences the global search.
Further information
1. The algorithm used to optimize is determined by the DEFAULTALG control. By default, the dual
simplex is used for LP and MIP problems and the barrier is used for QP problems.
2. The d and p flags can be used with the n flag to complete the solution of the model with either the
dual or primal algorithms once the network algorithm has solved the network part of the model.
3. The b flag cannot be used with the n flag.
4. The dual simplex algorithm is a two phase algorithm which can remove dual infeasibilities.
5. (Console) If the user prematurely terminates the solution process by typing CTRL-C, the iterative
procedure will terminate at the first "safe" point.
Related topics
XPRSglobal (GLOBAL), XPRSreadbasis (READBASIS), XPRSgoal (GOAL), 4, A.8.
Related topics
XPRSrhssa.
Related controls
Double
PIVOTTOL Pivot tolerance.
RELPIVOTTOL Relative pivot tolerance.
Example
The following brings the 7th variable into the basis and removes the 5th:
XPRSpivot(prob,6,4)
Further information
Row indices are in the range 0 to ROWS-1, whilst columns are in the range ROWS+SPAREROWS to
ROWS+SPAREROWS+COLS-1.
Related topics
XPRSgetpivotorder, XPRSgetpivots.
Further information
There are certain presolve operations that can prevent a row from being presolved exactly. If the
row contains a coefficient for a column that was eliminated due to duplicate column reductions
or singleton column reductions, the row might have to be relaxed to remain valid for the
presolved problem. The relaxation will be done automatically by the XPRSpresolverow
function, but a return status of +1 will be returned. If it is not possible to relax the row, a status
of -2 will be returned instead. Likewise, it is possible that certain dual reductions prevents the
row from being presolved. In such a case a status of -3 will be returned instead.
If XPRSpresolverow will be used for presolving e.g. branching bounds or constraints, then dual
reductions and duplicate column reductions should be disabled, by clearing the corresponding
bits of PRESOLVEOPS. By clearing these bits, the default value for PRESOLVEOPS changes to 471.
If the user knows in advance which columns will have non-zero coefficients in rows that will be
presolved, it is possible to protect these individual columns through the XPRSloadsecurevecs
function. This way the optimizer is left free to apply all possible reductions to the remaining
columns.
Related topics
XPRSaddcuts, XPRSloadsecurevecs, XPRSsetbranchcuts, XPRSstorecuts.
Synopsis
PRINTRANGE
Related controls
Integer
MAXPAGELINES Number of lines between page breaks.
Double
OUTPUTTOL Zero tolerance on print values.
Further information
See WRITEPRTRANGE for more information.
Related topics
XPRSgetcolrange, XPRSgetrowrange, XPRSrange (RANGE), XPRSwriteprtsol,
XPRSwriterange, A.6.
Synopsis
QUIT
Example
The command is called simply as:
QUIT
Further information
1. Fatal error conditions return nonzero exit values which may be of use to the host operating system.
These are described in 11.
2. If you wish to return an exit code reflecting the final solution status, then use the STOP command
instead.
Related topics
STOP, XPRSsave (SAVE).
Synopsis
int XPRS_CC XPRSrange(XPRSprob prob);
RANGE
Argument
prob The current problem.
Example 1 (Library)
This example computes the ranging information following optimization and outputs the solution
to a file [Link]:
XPRSreadprob(prob,"leonor","");
XPRSmaxim(prob,"");
XPRSrange(prob);
XPRSwriteprtrange(prob);
Example 2 (Console)
The following example is equivalent for the console, except the output is sent to the screen
instead of a file:
READPROB leonor
MAXIM
RANGE
PRINTRANGE
Further information
1. A basic optimal solution to the problem must be available, i.e. XPRSmaxim (MAXIM) or XPRSminim
(MINIM) must have been called (with crossover used if the Newton Barrier algorithm is being used)
and an optimal solution found.
READPROB
READBASIS
MAXIM -g
Further information
1. The only check done when reading compact basis is that the number of rows and columns in the
basis agrees with the current number of rows and columns.
2. XPRSreadbasis (READBASIS) will read the basis for the original problem even if the matrix has
been presolved. The Optimizer will read the basis, checking that it is valid, and will display error
messages if it detects inconsistencies.
Related topics
XPRSloadbasis, XPRSwritebasis (WRITEBASIS).
Example 1 (Library)
A previously saved solution can be loaded into memory and a print file created from it with the
following commands:
XPRSreadprob(prob, "myprob", "");
XPRSreadbinsol(prob, "", "");
XPRSwriteprtsol(prob, "", "");
Example 2 (Console)
An equivalent set of commands to the above for console users would be:
READPROB
READBINSOL
WRITEPRTSOL
Related topics
XPRSgetlpsol, XPRSgetmipsol, XPRSwritebinsol (WRITEBINSOL), XPRSwritesol
(WRITESOL), XPRSwriteprtsol (WRITEPRTSOL).
This is the most usual form at the console. It will attempt to read in a directives file with the
current problem name and an extension of .dir.
3. By default, XPRSglobal (GLOBAL) will explore the branch expected to yield the best integer so-
lution from each node, irrespective of whether this forces the global entity up or down. This can
be overridden with an UP or DN entry in the directives file, which forces XPRSglobal (GLOBAL) to
branch up first or down first on the specified entity.
4. Pseudo-costs are estimates of the unit cost of forcing an entity up or down. By default XPRSglobal
(GLOBAL) uses dual information to calculate estimates of the unit up and down costs and these are
added to the default pseudo costs which are set to the PSEUDOCOST control. The default pseudo
costs can be overridden by a PU or PD entry in the directives file.
5. If model cuts are used, then the specified constraints are removed from the matrix and added to
the Optimizer cut pool, and only put back in the matrix when they are violated by an LP solution
at one of the nodes in the global search.
6. If creating a directives file by hand, wild cards can be used to specify several vectors at once, for
example PR x1* 2 will give all global entities whose names start with x1 a priority of 2.
Related topics
XPRSloaddirs, A.6.
This instructs the Optimizer to read an MPS format matrix from the first file found out of
[Link], [Link] or (in LP format) [Link].
Example 2 (Console)
READPROB -l
This instructs the Optimizer to read an LP format matrix from the file problem_name .lp.
The treatment of N type rows other than the objective function depends on the KEEPNROWS con-
trol. If KEEPNROWS is 1 the rows and their elements are kept in memory; if it is 0 the rows are
retained, but their elements are removed; and if it is -1 the rows are deleted entirely. The perfor-
mance impact of retaining such N type rows will be small unless the presolve has been disabled by
setting PRESOLVE to 0 prior to optimization.
4. The Optimizer checks that the matrix file is in a legal format and displays error messages if it
detects errors. When the Optimizer has read and verified the problem, it will display summary
problem statistics.
5. By default, the MPSFORMAT control is set to -1 and XPRSreadprob (READPROB) determines auto-
matically whether the MPS files are in free or fixed format. If MPSFORMAT is set to 0, fixed format
is assumed and if it is set to 1, free format is assumed. Fields in free format MPS files are delimited
by one or more blank characters. The keywords NAME, ROWS, COLUMNS, QUADOBJ / QMATRIX,
QCMATRIX, DELAYEDROWS, MODELCUTS, SETS, RHS, RANGES, BOUNDS and ENDATAmust start in
column one and no vector name may contain blanks. If a special ordered set is specified with a
reference row, its name may not be the same as that of a column. Note that numeric values which
contain embedded spaces (for example after unary minus sign) will not be read correctly unless
MPSFORMAT is set to 0.
6. If the problem is not to be scaled automatically, set the parameter SCALING to 0 before issuing
the XPRSreadprob (READPROB) command.
7. Long MPS vector names are supported in MPS files, LP files, directives files and basis files. The
MPSNAMELENGTH control specifies the maximum number of characters in MPS vector names and
must be set before the file is read in. Internally it is rounded up to the smallest multiple of 8, and
must not exceed 64.
Related topics
XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp.
This loads the solution to the MIP problem if the problem contains global entities, or otherwise
loads it as an LP (barrier in case of quadratic problems) solution into the problem.
Example 2 (Console)
READSLXSOL lpsolution
Related topics
XPRSreadbinsol (READBINSOL), XPRSwriteslxsol (WRITESLXSOL, XPRSwritebinsol
WRITEBINSOL, XPRSreadbinsol (READBINSOL).
Related controls
Integer
DEFAULTALG Forced algorithm selection (default for repairinfeas is primal).
Example
READPROB [Link]
REPAIRINFEAS -a -d 0.002
5. The weight of each infeasibility breaker in the objective minimizing the violations is 1/p, where p
is the preference associated with the infeasibility breaker. Thus the higher the preference is, the
lower a penalty is associated with the infeasibility breaker while minimizing the violations.
6. If a feasible solution is identified for the relaxed problem, with a sum of violations p, then the sum
of violations is restricted to be no greater than (1+delta)p, and the problem is optimized with
respect to the original objective function. A nonzero delta increases the freedom of the original
problem.
7. Note that on some problems, slight modifications of delta may affect the value of the original
objective drastically.
Related topics
XPRSrepairweightedinfeas, 6.1.4.
2. A preference of 0 results in the row or bound not being relaxed. The higher the preference, the
more willing the modeller is to relax a given row or bound.
3. The weight of each infeasibility breaker in the objective minimizing the violations is 1/p, where p
is the preference associated with the infeasibility breaker. Thus the higher the preference is, the
lower a penalty is associated with the infeasibility breaker while minimizing the violations.
4. If a feasible solution is identified for the relaxed problem, with a sum of violations p, then the sum
of violations is restricted to be no greater than (1+delta)p, and the problem is optimized with
respect to the original objective function. A nonzero delta increases the freedom of the original
problem.
5. Note that on some problems, slight modifications of delta may affect the value of the original
objective drastically.
6. The default value for delta in the console is 0.001.
7. Note that because of their special associated modeling properties, binary and semi-continuous
variables are not relaxed.
8. Given any row j with preferences lrp=lrp_array[j] and grp=grp_array[j], or variable i
with bound preferences ubp=ubp_array[i] and lbp=lbp_array[i], the following rules are
applied while introducing the auxiliary variables:
Related topics
XPRSrepairinfeas (REPAIRINFEAS), 6.1.4.
Synopsis
int XPRS_CC XPRSrestore(XPRSprob prob, const char *probname, const char
*flags);
RESTORE [probname] [flags]
Arguments
prob The current problem.
probname A string of up to 200 characters containing the problem name.
flags f Force the restoring of a save file even if its from a different version.
Example 1 (Library)
XPRSrestore(prob,"","")
Example 2 (Console)
RESTORE
Further information
1. This routine restores the data structures from the file problem_name.svf that was created by
a previous execution of XPRSsave (SAVE). The file problem_name.sol is also required and,
if recommencing optimization in a global search, the files problem_name.glb and problem_-
[Link] are required too. Note that .svf files are particular to the release of the Optimizer
used to create them. They can only be read using the same release Optimizer as used to create
them.
2. (Console) The main use for XPRSsave (SAVE) and XPRSrestore (RESTORE) is to enable the user to
interrupt a long optimization run using CTRL-C, and save the Optimizer status with the ability to
restart it later from where it left off. It might also be used to save the optimal status of a problem
when the user then intends to implement several uses of XPRSalter (ALTER) on the problem,
re-optimizing each time from the saved status.
3. The use of the ’f’ flag is not recommended and can cause unexpected results.
Related topics
XPRSalter (ALTER), XPRSsave (SAVE).
Example
Here we obtain the RHS function ranges for the three columns: 2, 6 and 8:
mindex[0] = 2; mindex[1] = 8; mindex[2] = 6;
XPRSrhssa(prob,3,mindex,lower,upper);
After which lower and upper contain:
Further information
XPRSrhssa can only be called when an optimal solution to the current LP has been found. It
cannot be used when the problem is MIP presolved.
Related topics
XPRSobjsa.
Synopsis
int XPRS_CC XPRSsave(XPRSprob prob);
SAVE
Argument
prob The current problem.
Example 1 (Library)
XPRSsave(prob);
Example 2 (Console)
SAVE
Further information
The data structures are written to the file problem_name.svf. Optimization may recommence
from the same point when the data structures are restored by a call to XPRSrestore (RESTORE).
Under such circumstances, the file problem_name.sol and, if a branch and bound search is in
progress, the global files problem_name.glb and problem_name.ctp are also required. These
files will be present after execution of XPRSsave (SAVE), but will be modified by subsequent
optimization, so no optimization calls may be made after the call to XPRSsave (SAVE). Note that
the .svf files created are particular to the release of the Optimizer used to create them. They
can only be read using the same release Optimizer as used to create them.
Related topics
XPRSrestore (RESTORE).
This reads the MPS file [Link], modifies it according to instructions in the file
[Link], rescales the matrix and seeks the minimum objective value.
Example 2 (Console)
The equivalent set of commands for the Console user would be:
READPROB jovial
ALTER serious
SCALE
MINIM
Further information
1. If mrscal and mcscal are both non-NULL then they will be used to scale the matrix. Otherwise
the matrix will be scaled according to the control SCALING. This routine may be useful when the
current matrix has been modified by calls to routines such as XPRSalter (ALTER), XPRSchgmcoef
and XPRSaddrows.
2. XPRSscale (SCALE) cannot be called if the current matrix is presolved.
Related topics
XPRSalter (ALTER), XPRSreadprob (READPROB).
if( ifup )
{
dbd = ceil(curval);
XPRSstorebounds(prob, 1, &iglsel, "L", &dbd, &index);
}
else
{
dbd = floor(curval);
XPRSstorebounds(prob, 1, &iglsel, "U", &dbd, &index);
}
XPRSsetbranchbounds(prob, index);
return 0;
}
Related topics
XPRSloadcuts, XPRSsetcbestimate, XPRSsetcbsepnode, XPRSstorebounds, 5.5.
int current_iteration;
double PrimalObj, DualObj, Gap, PrimalInf, DualInf, ComplementaryGap;
// To set callback:
XPRSsetcbbariteration(xprob, BarrierIterationCallback, (void *) &my);
Further information
1. The following functions are expected to be called from the callback: XPRSgetlpsol and the
attribute/control value retrieving and setting routines.
2. General barrier iteration values are available by using XPRSgetdblattrib to retrieve:
Synopsis
int XPRS_CC XPRSsetcbbarlog (XPRSprob prob, int (XPRS_CC *fubl)(XPRSprob
my_prob, void *my_object), void *object);
Arguments
prob The current problem.
fubl The callback function itself. This takes two arguments, my_prob and my_object, and
has an integer return value. If the value returned by fubl is nonzero, the solution
process will be interrupted. This function is called at every barrier iteration.
my_prob The problem passed to the callback function, fubl.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbbarlog.
object A user-defined object to be passed to the callback function, fubl.
Example
This simple example prints a line to the screen for each iteration of the algorithm.
XPRSsetcbbarlog(prob,barLog,NULL);
XPRSmaxim(prob,"b");
/* setup data */
XPRSgetintattrib(prob, XPRS_COLS, &([Link]));
XPRSgetdblcontrol(prob, XPRS_MATRIXTOL, &([Link]));
[Link] =
(double*) malloc(sizeof(double)*[Link]);
[Link] =
(char*) malloc(sizeof(char)*[Link]);
XPRSgetcoltype(prob, [Link], 0, [Link]-1);
Synopsis
int XPRS_CC XPRSsetcbchgbranchobject(XPRSprob prob, void (XPRS_CC *f_-
chgbranchobject)(XPRSprob my_prob, void* my_object, XPRSbranchobject
obranch, XPRSbranchobject* p_newobject), void* object);
Arguments
prob The current problem.
f_chgbranchobject The callback function, which takes four arguments: myprob, my_object,
obranch and p_newobject. This function is called every time the optimizer has
selected a candidate entity for branching.
my_prob The problem passed to the callback function, f_chgbranchobject.
my_object The user defined object passed as object when setting up the callback with
XPRSsetcbchgbranchobject.
obranch The candidate branching object selected by the optimizer.
p_newobject Optional new branching object to replace the optimizer’s selection.
Further information
1. The branching object given by the optimizer provides a linear description of how the optimizer
intends to branch on the selected candidate. This will often be one of standard global entities of
the current problem, but can also be e.g. a split disjunction or a structural branch, if those features
are turned on.
2. The functions XPRS_bo_getbranches, XPRS_bo_getbounds and XPRS_bo_getrows can be used
to inspect the given branching object.
3. Refer to XPRS_bo_create on how to create a new branching object to replace the optimizer’s
selection. Note that the new branching object should be created with a priority value no higher
than the current object to guarantee it will be used for branching.
Related topics
XPRSgetcbchgbranchobject, XPRS_bo_create.
Synopsis
int XPRS_CC XPRSsetcbchgnode(XPRSprob prob, void (XPRS_CC *fusn)(XPRSprob
my_prob, void *my_object, int *nodnum), void *object);
Arguments
prob The current problem.
fusn The callback function which takes three arguments, my_prob, my_object and
nodnum, and has no return value. This function is called every time a new node is
selected.
my_prob The problem passed to the callback function, fusn.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbchgnode.
nodnum A pointer to the number of the node, nodnum, selected by the Optimizer. By changing
the value pointed to by this argument, the selected node may be changed with this
function.
object A user-defined object to be passed to the callback function, fusn.
Related controls
Integer
NODESELECTION Node selection control.
Example
The following prints out the node number every time a new node is selected during the global
search:
XPRSminim(prob,"");
XPRSsetintcontrol(prob,XPRS_MIPLOG,3);
XPRSsetintcontrol(prob,XPRS_NODESELECTION,2);
XPRSsetcbchgnode(prob,nodeSelection,NULL);
XPRSglobal(prob);
Synopsis
int XPRS_CC XPRSsetcbcutmgr(XPRSprob prob, int (XPRS_CC *fcme)(XPRSprob
my_prob, void *my_object), void *object);
Arguments
prob The current problem
fcme The callback function which takes two arguments, my_prob and my_object, and has
an integer return value. This function is called at each node in the Branch and Bound
search.
my_prob The problem passed to the callback function, fcme.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbcutmgr.
object A user-defined object to be passed to the callback function, fcme.
Related controls
Integer
EXTRAELEMS Number of extra matrix elements to be allowed for.
EXTRAROWS Number of extra rows to be allowed for.
Further information
1. For maximum efficiency, the space-allocating controls EXTRAROWS, EXTRAELEMS should be speci-
fied by the user if their values are known. If this is not done, resizing will occur automatically, but
more space may be allocated than the user requires.
2. The cut manager routine will be called repeatedly at each node until it returns a value of 0. The
sub-problem is automatically optimized if any cuts are added or deleted.
3. The FICO Xpress Optimizer ensures that cuts added to a node are automatically restored at descen-
dant nodes. To do this, all cuts are stored in a cut pool and the Optimizer keeps track of which
cuts from the cut pool must be restored at each node.
Related topics
XPRSgetcbcutmgr, XPRSsetcbcutlog.
Synopsis
int XPRS_CC XPRSsetcbdestroymt(XPRSprob prob, void (XPRS_CC *fmt)(XPRSprob
my_prob, void *my_object), void *object);
Arguments
prob The current thread problem.
fmt The callback function which takes two arguments, my_prob and my_object, and has
no return value.
my_prob The thread problem passed to the callback function.
my_object The user-defined object passed to the callback function.
object A user-defined object to be passed to the callback function.
Related controls
Integer
MIPTHREADS Number of MIP threads to create.
Further information
This callback is useful for freeing up any user data created in the MIP thread callback.
Related topics
XPRSgetcbdestroymt,XPRSsetcbmipthread.
Synopsis
int XPRS_CC XPRSsetcbestimate(XPRSprob prob, int (XPRS_CC *fbe)(XPRSprob
my_prob, void *my_object, int *iglsel, int *iprio, double *degbest,
double *degworst, double *curval, int *ifupx, int *nglinf, double
*degsum, int *nbr), void *object);
Arguments
prob The current problem.
fbe The callback function which takes eleven arguments, my_prob, my_object, iglsel,
iprio, degbest, degworst, curval, ifupx, nglinf, degsum and nbr, and has an
integer return value. This function is called at each node of the Branch and Bound
search.
my_prob The problem passed to the callback function, fbe.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbestimate.
iglsel Selected user global entity. Must be non-negative or -1 to indicate that there is no
user global entity candidate for branching. If set to -1, all other arguments, except for
nglinf and degsum are ignored. This argument is initialized to -1.
iprio Priority of selected user global entity. This argument is initialized to a value larger
(i.e., lower priority) than the default priority for global entities (see 4.3.3 in 4.3).
degbest Estimated degradation from branching on selected user entity in preferred direction.
degworst Estimated degradation from branching on selected user entity in worst direction.
curval Current value of user global entities.
ifupx Preferred branch on user global entity (0,...,nbr-1).
nglinf Number of infeasible user global entities.
degsum Sum of estimated degradations of satisfying all user entities.
nbr Number of branches. The user separate routine (set up with XPRSsetcbsepnode) will
be called nbr times in order to create the actual branches.
object A user-defined object to be passed to the callback function, fbe.
Related topics
XPRSgetcbestimate, XPRSsetbranchcuts, XPRSsetcbsepnode, XPRSstorecuts.
Related controls
Integer
MIPLOG Global print flag.
Example
The following example prints at each node of the global search the node number and its depth:
return 0;
}
See the example depthfirst.c on the FICO Xpress website.
Further information
If the callback function returns a nonzero value, the global search will be interrupted.
Related topics
XPRSgetcbgloballog, XPRSsetcbbarlog, XPRSsetcblplog, XPRSsetcbmessage.
Synopsis
int XPRS_CC XPRSsetcbinfnode(XPRSprob prob, void (XPRS_CC *fuin)(XPRSprob
my_prob, void *my_object), void *object);
Arguments
prob The current problem
fuin The callback function which takes two arguments, my_prob and my_object, and has
no return value. This function is called after the current node has been found to be
infeasible.
my_prob The problem passed to the callback function, fuin.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbinfnode.
object A user-defined object to be passed to the callback function, fuin.
Related controls
Integer
NODESELECTION Node selection control.
Example
The following notifies the user whenever an infeasible node is found during the global search:
XPRSsetintcontrol(prob,XPRS_NODESELECTION,2);
XPRSsetcbinfnode(prob,nodeInfeasible,NULL);
XPRSmaxim(prob,"g");
The callback function may resemble:
void XPRS_CC nodeInfeasible(XPRSprob prob, void *obj)
{
int node;
XPRSgetintattrib(prob, XPRS_NODES, &node);
printf("Node %d infeasible\n", node);
}
See the example depthfirst.c on the FICO Xpress website.
Related topics
XPRSgetcbinfnode, XPRSsetcbchgnode, XPRSsetcboptnode, XPRSsetcbintsol,
XPRSsetcbnodecutoff, XPRSsetcbchgbranch, XPRSsetcbprenode.
Synopsis
int XPRS_CC XPRSsetcbintsol(XPRSprob prob, void (XPRS_CC *fuis)(XPRSprob
my_prob, void *my_object), void *object);
Arguments
prob The current problem.
fuis The callback function which takes two arguments, my_prob and my_object, and has
no return value. This function is called if the current node is found to have an integer
feasible solution, i.e. every time an integer feasible solution is found.
my_prob The problem passed to the callback function, fuis.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbintsol.
object A user-defined object to be passed to the callback function, fuis.
Example
The following example prints integer solutions as they are discovered in the global search,
without using the solution file:
XPRSsetcbintsol(prob,printsol,NULL);
XPRSmaxim(prob,"g");
The callback function might resemble:
void XPRS_CC printsol(XPRSprob my_prob, void *my_object)
{
int i, cols, *x;
double objval;
Synopsis
int XPRS_CC XPRSsetcblplog(XPRSprob prob, int (XPRS_CC *fuil)(XPRSprob my_-
prob, void *my_object), void *object);
Arguments
prob The current problem.
fuil The callback function which takes two arguments, my_prob and my_object, and has
an integer return value. This function is called every LPLOG simplex iterations
including iteration 0 and the final iteration.
my_prob The problem passed to the callback function, fuil.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcblplog.
object A user-defined object to be passed to the callback function, fuil.
Related controls
Integer
LPLOG Frequency and type of simplex algorithm log.
Example
The following code sets a callback function, lpLog, to be called every 10 iterations of the
optimization:
XPRSsetintcontrol(prob,XPRS_LPLOG,10);
XPRSsetcblplog(prob,lpLog,NULL);
XPRSreadprob(prob,"problem","");
XPRSminim(prob,"");
The callback function may resemble:
int XPRS_CC lpLog(XPRSprob my_prob, void *my_object)
{
int iter; double obj;
Related topics
XPRSgetcblplog, XPRSsetcbbarlog, XPRSsetcbgloballog, XPRSsetcbmessage.
3. This function offers one method of handling the messages which describe any warnings and errors
that may occur during execution. Other methods are to check the return values of functions and
then get the error code using the ERRORCODE attribute, obtain the last error message directly
using XPRSgetlasterror, or send messages direct to a log file using XPRSsetlogfile.
4. Visual Basic, users must use the alternative function XPRSetcbmessageVB to define the callback;
this is required because of the different way VB handles strings.
Related topics
XPRSgetcbmessage, XPRSsetcbbarlog, XPRSsetcbgloballog, XPRSsetcblplog,
XPRSsetlogfile.
Synopsis
int XPRS_CC XPRSsetcbmipthread(XPRSprob prob, void (XPRS_CC *fmt)(XPRSprob
my_prob, void *my_object, XPRSprob thread_prob), void *object);
Arguments
prob The current problem.
fmt The callback function which takes three arguments, my_prob, my_object and
thread_prob, and has no return value.
my_prob The problem passed to the callback function.
my_object The user-defined object passed to the callback function.
thread_prob The problem pointer for the MIP thread
object A user-defined object to be passed to the callback function.
Related controls
Integer
MIPTHREADS Number of MIP threads to create.
Example
The following example clears the message callback for each of the MIP threads:
XPRSsetcbmipthread(prob,mipthread,NULL);
Related topics
XPRSgetcbmipthread,XPRSsetcbdestroymt.
Synopsis
int XPRS_CC XPRSsetcbnewnode(XPRSprob prob, void (XPRS_CC *f_-
newnode)(XPRSprob my_prob, void* my_object, int parentnode, int
newnode, int branch), void* object);
Arguments
prob The current problem.
f_newnode The callback function, which takes five arguments: myprob, my_object,
parentnode, newnode and branch. This function is called every time a new node is
created through branching.
my_prob The problem passed to the callback function, f_newnode.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbnewnode.
parentnode Unique identifier for the parent of the new node.
newnode Unique identifier assigned to the new node.
branch The sequence number of the new node amongst the child nodes of parentnode. For
regular branches on a global entity this will be either 0 or 1.
Further information
1. For regular branches on a global entity, branch will be either zero or one, depending on whether
the new node corresponds to branching the global entity up or down.
2. When branching on an XPRSbranchobject, branch refers to the given branch index of the object.
3. For new nodes created using the XPRSsetcbestimate/XPRSsetcbsepnode callback functions,
branch is identical to the ifup argument of the XPRSsetcbsepnode callback function.
Related topics
XPRSgetcbnewnode, XPRSsetcbchgnode
Synopsis
int XPRS_CC XPRSsetcbnlpevaluate(XPRSprob prob, void (XPRS_CC *f_-
evaluate)(XPRSprob my_prob, void * my_object, const double x[],
double * v), void * object);
Arguments
prob The current problem.
f_evaluate The callback function which takes 4 arguments, my_prob and my_object, the
point where the objective is to be evaluated, v used to return the value of the
objective at x and has an integer return value.
my_prob The problem passed to the callback function, f_evaluate.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbnlpgradient.
x Double array of length NCOLS containing the point where the NLP objective is to be
evaluated.
v Double pointer used by the callback to return the evaluated objective function value
at x.
object A user-defined object to be passed to the callback function, f_evaluate.
Related topics
XPRSinitializenlphessian, XPRSinitializenlphessian_indexpairs,
XPRSsetcbnlpgradient, XPRSsetcbnlphessian, XPRSgetcbnlpevaluate,
XPRSgetcbnlpgradient, XPRSgetcbnlphessian, XPRSresetnlp, 4.5.
Synopsis
int XPRS_CC XPRSsetcbnlpgradient(XPRSprob prob, void (XPRS_CC *f_-
gradient)(XPRSprob my_prob, void * my_object, const double x[],
double g[]), void * object);
Arguments
prob The current problem.
f_gradient The callback function which takes 4 arguments, my_prob and my_object, the
point where the objective is to be evaluated, v used to return the value of the
objective at x and has an integer return value.
my_prob The problem passed to the callback function, f_evaluate.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbnlpevaluate.
x Double array of length NCOLS containing the point where the NLP objective is to be
evaluated.
g Double array of length NCOLS used by the callback to return the evaluated gradient at
x.
object A user-defined object to be passed to the callback function, f_evaluate.
Related topics
XPRSinitializenlphessian, XPRSinitializenlphessian_indexpairs,
XPRSsetcbnlpevaluate, XPRSsetcbnlphessian, XPRSgetcbnlpevaluate,
XPRSgetcbnlpgradient, XPRSgetcbnlphessian, XPRSresetnlp, 4.5.
Synopsis
int XPRS_CC XPRSsetcbnlphessian(XPRSprob prob, void (XPRS_CC *f_-
hessian)(XPRSprob my_prob, void * my_object, const double x[], const
int mstart[], const int mqcol[], double dqe[]), void * object);
Arguments
prob The current problem.
f_hessian The callback function which takes 4 arguments, my_prob and my_object, the point
where the objective is to be evaluated, v used to return the value of the objective at x
and has an integer return value.
my_prob The problem passed to the callback function, f_hessian.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbnlphessian.
x Double array of length NCOLS containing the point where the NLP objective is to be
evaluated.
mstart Integer array of length NCOLS indicating the starting offsets in the mqcol and dqe
arrays for each column.
mqcol Integer array of length NLPHESSIANELEMS containing the column indices of the
nonzero elements in the lower triangular part of the quadratic matrix.
dqe Double array of length NLPHESSIANELEMS, used by the callback to return the
coefficients of the Hessian at x.
object A user-defined object to be passed to the callback function, f_hessian.
Related topics
XPRSinitializenlphessian, XPRSinitializenlphessian_indexpairs,
XPRSsetcbnlpevaluate, XPRSsetcbnlpgradient, XPRSgetcbnlpevaluate,
XPRSgetcbnlpgradient, XPRSgetcbnlphessian, XPRSresetnlp, 4.5.
Synopsis
int XPRS_CC XPRSsetcbnodecutoff(XPRSprob prob, void (XPRS_CC
*fucn)(XPRSprob my_prob, void *my_object, int nodnum), void *object);
Arguments
prob The current problem.
fucn The callback function, which takes three arguments, my_prob, my_object and
nodnum, and has no return value. This function is called every time a node is cut off as
the result of an improved integer solution being found.
my_prob The problem passed to the callback function, fucn.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbnodecutoff.
nodnum The number of the node that is cut off.
object A user-defined object to be passed to the callback function, fucn.
Example
The following notifies the user whenever a node is cutoff during the global search:
XPRSsetcbnodecutoff(prob,Cutoff,NULL);
XPRSmaxim(prob,"g");
Related topics
XPRSgetcbnodecutoff, XPRSsetcbchgnode, XPRSsetcboptnode, XPRSsetcbinfnode,
XPRSsetcbintsol, XPRSsetcbchgbranch, XPRSsetcbprenode.
Synopsis
int XPRS_CC XPRSsetcboptnode(XPRSprob prob, void (XPRS_CC *fuon)(XPRSprob
my_prob, void *my_object, int *feas), void *object);
Arguments
prob The current problem.
fuon The callback function which takes three arguments, my_prob, my_object and feas,
and has no return value.
my_prob The problem passed to the callback function, fuon.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcboptnode.
feas The feasibility status. If set to a nonzero value by the user, the current node will be
declared infeasible.
object A user-defined object to be passed to the callback function, fuon.
Example
The following prints an optimal solution once found:
XPRSsetcboptnode(prob,nodeOptimal,NULL);
XPRSmaxim(prob,"g");
Related topics
XPRSgetcboptnode, XPRSsetcbchgnode, XPRSsetcbinfnode, XPRSsetcbintsol,
XPRSsetcbnodecutoff, XPRSsetcbchgbranch, XPRSsetcbprenode.
Synopsis
int XPRS_CC XPRSsetcbpreintsol(XPRSprob prob, void (XPRS_CC *f_-
preintsol)(XPRSprob my_prob, void *my_object, int isheuristic, int
*ifreject, double *cutoff), void *object);
Arguments
prob The current problem.
f_preintsol The callback function which takes five arguments, my_prob, my_object,
isheuristic, ifreject and cutoff, and has no return value. This function is called
when an integer solution is found, but before the solution is accepted by the
optimizer, allowing the user to reject the solution.
my_prob The problem passed to the callback function, f_preintsol.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbpreintsol.
isheuristic Set to 1 if the solution was found using a heuristic. Otherwise, it will be the
global feasible solution to the current node of the global search.
ifreject Set this to 1 if the solution should be rejected.
cutoff The new cutoff value that the optimizer will use if the solution is accepted. If the
user changes cutoff, the new value will be used instead. The cutoff value will not
be updated if the solution is rejected.
object A user-defined object to be passed to the callback function, fuis.
Related controls
Integer
MIPABSCUTOFF Branch and Bound: If the user knows that they are interested only in values of
the objective function which are better than some value, this can be assigned
to MIPABSCUTOFF. This allows the Optimizer to ignore solving any nodes
which may yield worse objective values, saving solution time. When a MIP
solution is found a new cut off value is calculated and the value can be
obtained from the CURRMIPCUTOFF attribute. The value of CURRMIPCUTOFF
is calculated using the MIPRELCUTOFF and MIPADDCUTOFF controls.
Further information
1. If a solution is rejected, the optimizer will drop the found solution without updating any at-
tributes, including the cutoff value. To change the cutoff value when rejecting a solution, the
control MIPABSCUTOFF should be set instead.
2. When a node solution is rejected (isheuristic = 0), the node itself will be dropped without
further branching.
Related topics
XPRSgetcbpreintsol, XPRSsetcbintsol.
Synopsis
int XPRS_CC XPRSsetcbprenode(XPRSprob prob, void (XPRS_CC *fupn)(XPRSprob
my_prob, void *my_object, int *nodinfeas), void *object);
Arguments
prob The current problem.
fupn The callback function, which takes three arguments, my_prob, my_object and
nodinfeas, and has no return value. This function is called before a node is
reoptimized and the node may be made infeasible by setting *nodinfeas to 1.
my_prob The problem passed to the callback function, fupn.
my_object The user-defined object passed as object when setting up the callback with
XPRSsetcbprenode.
nodinfeas The feasibility status. If set to a nonzero value by the user, the current node will be
declared infeasible by the optimizer.
object A user-defined object to be passed to the callback function, fupn.
Example
The following example notifies the user before each node is processed:
XPRSsetcbprenode(prob, preNode, NULL);
XPRSminim(prob,"g");
if( ifup )
{
dbd = floor(xval);
XPRSstorebounds(my_prob, 1, &iglsel, "U", &dbd, &index);
}
else
{
dbd = ceil(xval);
XPRSstorebounds(my_prob, 1, &iglsel, "L", &dbd, &index);
}
XPRSsetbranchbounds(prob, index);
return 0;
}
Example
The following turns off presolve to solve a problem, before resetting it to its default value and
solving it again:
XPRSsetintcontrol(prob, XPRS_PRESOLVE, 0);
XPRSmaxim(prob, "g");
XPRSwriteprtsol(prob);
XPRSsetdefaultcontrol(prob, XPRS_PRESOLVE);
XPRSmaxim(prob, "g");
Related topics
XPRSsetdefaults, XPRSsetintcontrol, XPRSsetdblcontrol, XPRSsetstrcontrol.
Synopsis
int XPRS_CC XPRSsetdefaults(XPRSprob prob);
SETDEFAULTS
Argument
prob The current problem.
Example
The following turns off presolve to solve a problem, before resetting the control defaults,
reading it and solving it again:
XPRSsetintcontrol(prob, XPRS_PRESOLVE, 0);
XPRSmaxim(prob, "g");
XPRSwriteprtsol(prob);
XPRSsetdefaults(prob);
XPRSreadprob(prob);
XPRSmaxim(prob, "g");
Related topics
XPRSsetdefaultcontrol, XPRSsetintcontrol, XPRSsetdblcontrol, XPRSsetstrcontrol.
...
XPRSsetindicators(prob,2,mrows,inds,comps);
XPRSminim(prob,"g");
Further information
Indicator rows must be set up before solving the problem. Any indicator row will be removed
from the matrix after presolve and added to a special pool. An indicator row will be added back
into the active matrix only when its associated condition holds. An indicator variable can be used
in multiple indicator rows and can also appear in normal rows and in the objective function.
Related topics
XPRSgetindicators, XPRSdelindicators.
Example
The following directs output to the file [Link]:
XPRSinit(NULL);
XPRScreateprob(&prob);
XPRSsetlogfile(prob,"[Link]");
Further information
1. It is recommended that a log file be set up for each problem being worked on, since it provides a
means for obtaining any errors or warnings output by the Optimizer during the solution process.
2. If output is redirected with XPRSsetlogfile all screen output will be turned off.
3. Alternatively, an output callback can be defined using XPRSsetcbmessage, which will be called
every time a line of text is output. Defining a user output callback will turn all screen output off.
To discard all output messages the OUTPUTLOG integer control can be set to 0.
Related topics
XPRSsetcbmessage.
Example 1 (Library)
Attempting to optimize a problem that has no matrix loaded gives error 91. The following code
uses XPRSsetmessagestatus to suppress the error message:
XPRScreateprob(&prob);
XPRSsetmessagestatus(prob,91,0);
XPRSminim(prob,"");
Example 2 (Console)
An equivalent set of commands for the Console user may look like:
SETMESSAGESTATUS 91 0
MINIM
Further information
If a message is suppressed globally then the message can only be enabled for any problem once
the global suppression is removed with a call to XPRSsetmessagestatus with prob passed as
NULL.
Related topics
XPRSgetmessagestatus.
char sProblem[]="jo";
...
XPRSsetprobname(prob,sProblem);
Example 2 (Console)
READPROB bob
MINIM
SETPROBNAME jim
READPROB
The above will read the problem bob and then read the problem jim.
Related topics
XPRSreadprob (READPROB).
Synopsis
STOP
Example
The following example inputs a matrix file, [Link], runs a global optimization on it and then
exits:
READPROB lama
MAXIM -g
STOP
Further information
This command may be used to terminate the Optimizer as with the QUIT command. It sets an exit
value which may be inspected by the host operating system or invoking program.
Related topics
QUIT.
if( ifup )
{
dbd = ceil(curval);
XPRSstorebounds(prob, 1, &iglsel, "L", &dbd, &index);
}
else
{
dbd = floor(curval);
XPRSstorebounds(prob, 1, &iglsel, "U", &dbd, &index);
}
XPRSsetbranchbounds(prob, index);
return 0;
}
Related topics
XPRSsetbranchbounds, XPRSsetcbestimate, XPRSsetcbsepnode.
Related controls
Double
MATRIXTOL Zero tolerance on matrix elements.
Further information
1. XPRSstorecuts can be used to eliminate duplicate cuts. If the nodupl parameter is set to 1, the
cut pool will be checked for duplicate cuts with a cut type identical to the cuts being added. If a
duplicate cut is found the new cut will only be added if its right hand side value makes the cut
stronger. If the cut in the pool is weaker than the added cut it will be removed unless it has been
applied to an active node of the tree. If nodupl is set to 2 the same test is carried out on all cuts,
ignoring the cut type.
2. XPRSstorecuts returns a list of the cuts added to the cut pool in the mindex array. If the cut is
not added to the cut pool because a stronger cut exits a NULL will be returned. The mindex array
can be passed directly to XPRSloadcuts or XPRSsetbranchcuts to load the most recently stored
cuts into the matrix.
3. The columns and elements of the cuts must be stored contiguously in the mcols and dmtval arrays
passed to XPRSstorecuts. The starting point of each cut must be stored in the mstart array. To
determine the length of the final cut the mstart array must be of length ncuts+1 with the last
element of this array containing where the cut ncuts+1 would start.
Example 2 (Console)
An equivalent set of commands to the above for console users would be:
READPROB
MAXIM
WRITEBASIS
GLOBAL
Further information
1. The t flag is only useful for later input to a similar problem using the t flag with XPRSreadbasis
(READBASIS).
2. If the Newton barrier algorithm has been used for optimization then crossover must have been
performed before there is a valid basis. This basis can then only be used for restarting the simplex
(primal or dual) algorithm.
3. XPRSwritebasis (WRITEBASIS) will output the basis for the original problem even if the matrix
has been presolved.
Related topics
XPRSgetbasis, XPRSreadbasis (READBASIS).
Example 1 (Library)
After an LP has been solved or a MIP solution has been found the solution can be saved to file. If
a MIP solution exists it will be written to file unless the -x flag is passed to XPRSwritebinsol
(WRITEBINSOL) in which case the LP solution will be written. The Optimizer input commands
might then be:
Related topics
XPRSgetlpsol, XPRSgetmipsol, XPRSreadbinsol (READBINSOL), XPRSwritesol (WRITESOL),
XPRSwriteprtsol (WRITEPRTSOL).
Example 2 (Console)
WRITEPROB -p C:myprob
This instructs the Optimizer to write an MPS matrix to the file [Link] on the C: drive in full
precision.
Further information
1. If XPRSloadlp, XPRSloadglobal, XPRSloadqglobal or XPRSloadqp is used to obtain a matrix
then there is no association between the objective function and the N rows in the matrix and so
a separate N row (called __OBJ___) is created when you do an XPRSwriteprob (WRITEPROB).
Also if you do an XPRSreadprob (READPROB) and then change either the objective row or the N
row in the matrix corresponding to the objective row, you lose the association between the two
and the __OBJ___ row is created when you do an XPRSwriteprob (WRITEPROB). To remove the
objective row from the matrix when doing an XPRSreadprob (READPROB), set KEEPNROWS to -1
before XPRSreadprob (READPROB).
2. The hexadecimal format is useful for saving the exact internal precision of the matrix.
3. Warning: If XPRSreadprob (READPROB) is used to input a problem, then the input file will be
overwritten by XPRSwriteprob (WRITEPROB) if a new filename is not specified.
Related topics
XPRSreadprob (READPROB).
Synopsis
int XPRS_CC XPRSwriteprtrange(XPRSprob prob);
WRITEPRTRANGE
Argument
prob The current problem.
Related controls
Integer
MAXPAGELINES Number of lines between page breaks.
Double
OUTPUTTOL Zero tolerance on print values.
Example 1 (Library)
The following example solves the LP problem and then calls XPRSrange (RANGE) before
outputting the result to file for printing:
XPRSreadprob(prob, "myprob", "");
XPRSmaxim(prob, "");
XPRSrange(prob);
XPRSwriteprttange(prob);
Example 2 (Console)
An equivalent set of commands for the Console user would be:
READPROB
MAXIM
RANGE
WRITEPRTRANGE
Further information
1. (Console) There is an equivalent command PRINTRANGE which outputs the same informa-
tion to the screen. The format is the same as that output to file by XPRSwriteprtrange
(WRITEPRTRANGE), except that the user is permitted to enter a response after each screen if further
output is required.
2. The fixed width ASCII format created by this command is not as readily useful as that produced by
XPRSwriterange (WRITERANGE). The main purpose of XPRSwriteprtrange (WRITEPRTRANGE)
is to create a file that can be printed. The format of this fixed format range file is described in
Appendix A.
Related topics
XPRSgetcolrange, XPRSgetrowrange, XPRSrange (RANGE), XPRSwriteprtsol,
XPRSwriterange, A.6.
Related controls
Integer
MAXPAGELINES Number of lines between page breaks.
Double
OUTPUTTOL Zero tolerance on print values.
Example 1 (Library)
This example shows the standard use of this function, outputting the solution to file immediately
following optimization:
XPRSreadprob(prob, "myprob", "");
XPRSmaxim(prob, "");
XPRSwriteprtsol(prob, "", "");
Example 2 (Console)
READPROB
MAXIM
PRINTSOL
are the equivalent set of commands for Console users who wish to view the output directly on
screen.
Further information
1. (Console) There is an equivalent command PRINTSOL which outputs the same information to the
screen. The format is the same as that output to file by XPRSwriteprtsol (WRITEPRTSOL), except
that the user is permitted to enter a response after each screen if further output is required.
2. The fixed width ASCII format created by this command is not as readily useful as that produced by
XPRSwritesol (WRITESOL). The main purpose of XPRSwriteprtsol (WRITEPRTSOL) is to create
a file that can be sent directly to a printer. The format of this fixed format ASCII file is described in
Appendix A.
3. To create a prt file for a previously saved solution, the solution must first be loaded with the
XPRSreadbinsol (READBINSOL) function.
Related topics
XPRSgetlpsol, XPRSgetmipsol, XPRSreadbinsol XPRSwritebinsol, XPRSwriteprtrange,
XPRSwritesol, A.4.
Related controls
Double
OUTPUTTOL Zero tolerance on print values.
String
OUTPUTMASK Mask to restrict the row and column names output to file.
Example 1 (Library)
At its most basic, the usage of XPRSwriterange (WRITERANGE) is similar to that of
XPRSwriteprtrange (WRITEPRTRANGE), except that the output is intended as input to another
program. The following example shows its use:
XPRSreadprob(prob, "myprob", "");
XPRSminim(prob, "");
XPRSrange(prob);
XPRSwriterange(prob, "", "");
Example 2 (Console)
RANGE
WRITERANGE -nbac
This example would output just the name, basis status, activity, and cost (for columns) or slack
(for rows) for each vector to the file problem_name.rsc. It would also output a number of other
fields of ranging information which cannot be enabled/disabled by the user.
• lower activity
• unit cost down
• upper cost (or lower profit if maximizing)
• limiting process down
• status of down limiting process
• upper activity
• unit cost up
• lower cost (or upper profit if maximizing)
• limiting process up
• status of up limiting process
2. The control OUTPUTMASK may be used to control which vectors are reported to the ASCII file. Only
vectors whose names match OUTPUTMASK are output. This is set to "????????" by default, so that
all vectors are output.
Related topics
XPRSgetlpsol, XPRSgetmipsol, XPRSwriteprtrange (WRITEPRTRANGE), XPRSrange (RANGE),
XPRSwritesol (WRITESOL), A.6.
Synopsis
int XPRS_CC XPRSwriteslxsol(XPRSprob prob, const char *filename, const char
*flags);
WRITESLXSOL -[flags] [filename]
Arguments
prob The current problem.
filename A string of up to 200 characters containing the file name to which the solution is to
be written. If omitted, the default problem_name is used with a .slx extension.
flags Flags to pass to XPRSwriteslxsol (WRITESLXSOL):
l write the LP solution in case of a MIP problem;
m write the MIP solution;
p use full precision for numerical values;
x use hexadecimal format to write values.
Example 1 (Library)
XPRSwriteslxsol(prob,"lpsolution","");
This saves the MIP solution if the problem contains global entities, or otherwise saves the LP
(barrier in case of quadratic problems) solution of the problem.
Example 2 (Console)
WRITESLXSOL lpsolution
Example 2 (Console)
Suppose we wish to produce files containing
• the names and values of variables starting with the letter X which are nonzero and
• the names, values and right hand sides of constraints starting with CO2.
3. If KEEPMIPSOL has been used to store a number of MIP or goal programming solutions, the e
flag can be used to output solution information for every solution kept. The best solution found
is still output to problem_name.hdr and problem_name.asc. Any other solutions are output to
the header files problem_name.hd0, problem_name. hd1,... and ASCII solution files problem_-
name.as0, problem_name.as1,....
Related topics
XPRSgetlpsol, XPRSgetmipsol, XPRSwriterange (WRITERANGE), XPRSwriteprtsol
(WRITEPRTSOL).
Various controls exist within the Optimizer to govern the solution procedure and the form of
output. The majority of these take integer values and act as switches between various types of
behavior. The tolerances on values are double precision, and there are a few controls which are
character strings, setting names to structures. Any of these may be altered by the user to enhance
performance of the Optimizer. However, it should be noted that the default values provided have
been found to work well in practice over a range of problems and caution should be exercised if
they are changed.
control_name = new_value
where new_value is an integer value, double or string as appropriate. For character strings, the
name must be enclosed in single quotes and all eight characters must be given.
Users of the FICO Xpress Libraries are provided with the following set of functions for setting and
obtaining control values:
It is an important point that the controls as listed in this chapter must be prefixed with XPRS_ to
be used with the FICO Xpress Libraries and failure to do so will result in an error. An example of
their usage is as follows:
AUTOPERTURB
Description Simplex: This indicates whether automatic perturbation is performed. If this is set to 1,
the problem will be perturbed by the amount PERTURB whenever the simplex method
BACKTRACK
Description Branch and Bound: Specifies how to select the next node to work on when a full
backtrack is performed.
Type Integer
Values 1 Unused.
2 Select the node with the best estimated solution.
3 Select the node with the best bound on the solution.
4 Select the deepest node in the search tree (equivalent to depth-first search).
5 Select the highest node in the search tree (equivalent to breadth-first search).
6 Select the earliest node created.
7 Select the latest node created.
8 Select a node randomly.
9 Select the node whose LP relaxation contains the fewest number of infeasible
global entities.
10 Combination of 2 and 9.
11 Combination of 2 and 4.
Default value 3
Note Note When two nodes are rated the same according to the BACKTRACK selection, a
secondary rating is performed using the method set by BACKTRACKTIE.
Affects routines XPRSmipoptimize (MIPOPTIMIZE), XPRSglobal (GLOBAL)..
BACKTRACKTIE
Description Branch and Bound: Specifies how to break ties when selecting the next node to work on
when a full backtrack is performed. The options are the same as for the BACKTRACK
control.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 332
Values 1 Unused.
2 Select the node with the best estimated solution.
3 Select the node with the best bound on the solution.
4 Select the deepest node in the search tree (equivalent to depth-first search).
5 Select the highest node in the search tree (equivalent to breadth-first search).
6 Select the earliest node created.
7 Select the latest node created.
8 Select a node randomly.
9 Select the node whose LP relaxation contains the fewest number of infeasible
global entities.
10 Combination of 2 and 9.
11 Combination of 2 and 4.
Default value 10
Affects routines XPRSmipoptimize (MIPOPTIMIZE), XPRSglobal (GLOBAL)..
BARCRASH
Description Newton barrier: This determines the type of crash used for the crossover. During the
crash procedure, an initial basis is determined which attempts to speed up the crossover.
A good choice at this stage will significantly reduce the number of iterations required to
crossover to an optimal solution. The possible values increase proportionally to their
time-consumption.
Type Integer
Values 0 Turns off all crash procedures.
1-6 Available strategies with 1 being conservative and 6 being aggressive.
Default value 4
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BARDUALSTOP
Description Newton barrier: This is a convergence parameter, representing the tolerance for dual
infeasibilities. If the difference between the constraints and their bounds in the dual
problem falls below this tolerance in absolute value, optimization will stop and the
current solution will be returned.
Type Double
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 333
BARGAPSTOP
Description Newton barrier: This is a convergence parameter, representing the tolerance for the
relative duality gap. When the difference between the primal and dual objective
function values falls below this tolerance, the Optimizer determines that the optimal
solution has been found.
Type Double
BARINDEFLIMIT
Description Newton Barrier. This limits the number of consecutive indefinite barrier iterations that
will be performed. The optimizer will try to minimize (resp. maximize) a QP problem
even if the Q matrix is not positive (resp. negative) semi-definite. However, the
optimizer may detect that the Q matrix is indefinite and this can result in the optimizer
not converging. This control specifies how many indefinite iterations may occur before
the optimizer stops and reports that the problem is indefinite. It is usual to specify a
value greater than one, and only stop after a series of indefinite matrices, as the
problem may be found to be indefinite incorrectly on a few iterations for numerical
reasons.
Type Integer
Default value 15
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BARITERLIMIT
Description Newton barrier: The maximum number of iterations. While the simplex method usually
performs a number of iterations which is proportional to the number of constraints
(rows) in a problem, the barrier method standardly finds the optimal solution to a given
accuracy after a number of iterations which is independent of the problem size. The
penalty is rather that the time for each iteration increases with the size of the problem.
BARITERLIMIT specifies the maximum number of iterations which will be carried out by
the barrier.
Type Integer
Default value 200
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 334
BARORDER
Description Newton barrier: This controls the Cholesky factorization in the Newton-Barrier.
Type Integer
Values 0 Choose automatically.
1 Minimum degree method. This selects diagonal elements with the smallest num-
ber of nonzeros in their rows or columns.
2 Minimum local fill method. This considers the adjacency graph of nonzeros in the
matrix and seeks to eliminate nodes that minimize the creation of new edges.
3 Nested dissection method. This considers the adjacency graph and recursively
seeks to separate it into non-adjacent pieces.
Default value 0
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BAROUTPUT
Description Newton barrier: This specifies the level of solution output provided. Output is provided
either after each iteration of the algorithm, or else can be turned off completely by this
parameter.
Type Integer
Values 0 No output.
1 At each iteration.
Default value 1
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BARPRESOLVEOPS
Description Newton barrier: This controls the Newton-Barrier specific presolve operations.
Type Integer
Values 0 Use standard presolve.
1 Extra effort is spent in barrier specific presolve.
Default value 0
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 335
BARPRIMALSTOP
Description Newton barrier: This is a convergence parameter, indicating the tolerance for primal
infeasibilities. If the difference between the constraints and their bounds in the primal
problem falls below this tolerance in absolute value, the Optimizer will terminate and
return the current solution.
Type Double
BARSTART
Description Newton barrier: Controls the computation of the starting point for the barrier
algorithm.
Type Integer
Values 0 Determine automatically.
1 Uses simple heuristics to compute the starting point based on the magnitudes of
the matrix entries.
2 Uses the pseudoinverse of the constraint matrix to determine primal and dual
initial solutions. Less sensitive to scaling and numerically more robust, but in
several case less efficient than 1.
Default value 0
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BARSTEPSTOP
Description Newton barrier: A convergence parameter, representing the minimal step size. On each
iteration of the barrier algorithm, a step is taken along a computed search direction. If
that step size is smaller than BARSTEPSTOP, the Optimizer will terminate and return the
current solution.
Type Double
Default value 1.0E-10
Note If the barrier method is making small improvements on BARGAPSTOP on later iterations,
it may be better to set this value higher, to return a solution after a close approximation
to the optimum has been found.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 336
BARTHREADS
Description If set to a positive integer it determines the number of threads implemented to run the
Newton-barrier algorithm. If the value is set to the default value (-1), the THREADS
control will determine the number of threads used.
Type Integer
Default value -1(determined by the THREADS control)
Note There is a practical upper limit of 50 on the number of parallel threads the optimizer
will create.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also MIPTHREADS, LPTHREADS, THREADS..
BIGM
Description The infeasibility penalty used if the "Big M" method is implemented.
Type Double
Default value Dependent on the matrix characteristics.
BIGMMETHOD
Description Simplex: This specifies whether to use the "Big M" method, or the standard phase I
(achieving feasibility) and phase II (achieving optimality). In the "Big M" method, the
objective coefficients of the variables are considered during the feasibility phase,
possibly leading to an initial feasible basis which is closer to optimal. The side-effects
involve possible round-off errors due to the presence of the "Big M" factor in the
problem.
Type Integer
Values 0 For phase I / phase II.
1 If "Big M" method to be used.
Default value 1
Note Reset by XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp,
XPRSloadqglobal and XPRSloadqp.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 337
BRANCHCHOICE
Description Once a global entity has been selected for branching, this control determines whether
the branch with the minimum or the maximum estimate is solved first.
Type Integer
Values 0 Minimum estimate branch first.
1 Maximum estimate branch first.
2 If an incumbent solution exists, solve the branch satisfied by that solution first.
Otherwise solve the minimum estimate branch first (option 0).
Default value 0
Affects routines XPRSglobal (GLOBAL).
BRANCHDISJ
Description Branch and Bound: Determines whether the optimizer should attempt to branch on
general split disjunctions during the branch and bound search.
Type Integer
Values -1 Automatic selection of the strategy.
0 Disabled.
1 Cautious strategy. Disjunctive branches will be created only for general integers
with a wide range.
2 Moderate strategy.
3 Aggressive strategy. Disjunctive branches will be created for both binaries and
integers.
Default value -1
Note Note Split disjunctions are a special form of disjunctions that can be written as
P P
j mj xj ≤ m0 ∨ j mj xj ≥ m0 + 1
The split disjunctions created by the optimizer will use a combination of binary or
integer variables xj , with integer coefficients mj .
Split disjunctions for branching will always be created with a default priority value of
400 instead of the default value of 500 for regular entity branches.
Affects routines XPRSmipoptimize (MIPOPTIMIZE), XPRSglobal (GLOBAL).
BRANCHSTRUCTURAL
Description Branch and Bound: Determines whether the optimizer should search for special
structure in the problem to branch on during the branch and bound search.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 338
Values -1 Automatically determined.
0 Disabled.
1 Enabled.
Default value -1
Note Structural branches will often involve branching on more than a single global entity at a
time. As a result of a structural branch, a parent node could therefore end up with more
than two child nodes, unlike the standard single entity branches.
Structural branches will always be created with a default priority value of 400 instead of
the default value of 500 for regular entity branches.
Affects routines XPRSmipoptimize (MIPOPTIMIZE), XPRSglobal (GLOBAL).
BREADTHFIRST
Description The number of nodes to include in the best-first search before switching to the local first
search (NODESELECTION = 4).
Type Integer
Default value 11
Affects routines XPRSglobal (GLOBAL).
CACHESIZE
Description Newton barrier: L2 cache size in kB (kilo bytes) of the CPU. On Intel (or compatible)
platforms a value of -1 may be used to determine the cache size automatically.
Type Integer
Default value -1
Note Specifying the correct L2 cache size can give a significant performance advantage with
the Newton barrier algorithm.
If the size is unknown, it is better to specify a smaller size.
If the size cannot be determined automatically on Intel (or compatible) platforms, a
default size of 512 kB is assumed.
For multi-processor machines, use the cache size of a single CPU.
Specify the size in kB: for example, 0.5 MB means 512 kB and a value of 512 should be
used when setting CACHESIZE.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 339
CHOLESKYALG
CHOLESKYTOL
Description Newton barrier: The zero tolerance for pivot elements in the Cholesky decomposition of
the normal equations coefficient matrix, computed at each iteration of the barrier
algorithm. If the absolute value of the pivot element is less than or equal to
CHOLESKYTOL, it merits special treatment in the Cholesky decomposition process.
Type Double
Default value 1.0E-15
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
COVERCUTS
Description Branch and Bound: The number of rounds of lifted cover inequalities at the top node. A
lifted cover inequality is an additional constraint that can be particularly effective at
reducing the size of the feasible region without removing potential integral solutions.
The process of generating these can be carried out a number of times, further reducing
the feasible region, albeit incurring a time penalty. There is usually a good payoff from
generating these at the top node, since these inequalities then apply to every
subsequent node in the tree search.
Type Integer
Default value -1 — determined automatically.
Affects routines XPRSglobal (GLOBAL).
CPUTIME
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 340
Values 0 If elapsed time is to be used.
1 If CPU time is to be used.
Default value 1
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSglobal (GLOBAL).
CRASH
Description Simplex: This determines the type of crash used when the algorithm begins. During the
crash procedure, an initial basis is determined which is as close to feasibility and
triangularity as possible. A good choice at this stage will significantly reduce the number
of iterations required to find an optimal solution. The possible values increase
proportionally to their time-consumption.
Type Integer
Values 0 Turns off all crash procedures.
1 For singletons only (one pass).
2 For singletons only (multi pass).
3 Multiple passes through the matrix considering slacks.
4 Multiple ( ≤ 10) passes through the matrix but only doing slacks at the very end.
n>10 As for value 4 but performing at most n - 10 passes.
Default value 2
CROSSOVER
Description Newton barrier: This control determines whether the barrier method will cross over to
the simplex method when at optimal solution has been found, to provide an end basis
(see XPRSgetbasis, XPRSwritebasis) and advanced sensitivity analysis information
(see XPRSrange).
Type Integer
Values -1 Determined automatically.
0 No crossover.
1 Crossover to a basic solution.
Default value -1
Note The full primal and dual solution is available whether or not crossover is used. The
crossover must not be disabled if the barrier is used to reoptimize nodes of a MIP. By
default crossover will not be performed on QP and MIQP problems.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 341
CSTYLE
Type Integer
Values 0 Indicates that the FORTRAN convention should be used for arrays (i.e. starting
from 1).
1 Indicates that the C convention should be used for arrays (i.e. starting from 0).
Default value 1
Affects routines All library routines which take arrays as arguments.
CUTDEPTH
Description Branch and Bound: Sets the maximum depth in the tree search at which cuts will be
generated. Generating cuts can take a lot of time, and is often less important at deeper
levels of the tree since tighter bounds on the variables have already reduced the feasible
region. A value of 0 signifies that no cuts will be generated.
Type Integer
Default value -1 — determined automatically.
CUTFACTOR
Description Limit on the number of cuts and cut coefficients the optimizer is allowed to add to the
matrix during global search. The cuts and cut coefficients are limited by CUTFACTOR
times the number of rows and coefficients in the initial matrix.
Type Double
Values Bit Meaning
-1 Let the optimizer decide on the maximum amount of cuts based on
CUTSTRATEGY.
>=0 Multiple of number of rows and coefficients to use.
Default value -1
Note A value of 0.0 prevents cuts from being added, and a value of e.g. 1.0 will allow the
problem to grow to twice the initial number of rows and coefficients.
Affects routines XPRSglobal (GLOBAL).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 342
CUTFREQ
Description Branch and Bound: This specifies the frequency at which cuts are generated in the tree
search. If the depth of the node modulo CUTFREQ is zero, then cuts will be generated.
Type Integer
Default value -1 — determined automatically.
Affects routines XPRSglobal (GLOBAL).
CUTSTRATEGY
Description Branch and Bound: This specifies the cut strategy. A more aggressive cut strategy,
generating a greater number of cuts, will result in fewer nodes to be explored, but with
an associated time cost in generating the cuts. The fewer cuts generated, the less time
taken, but the greater subsequent number of nodes to be explored.
Type Integer
Values -1 Automatic selection of the cut strategy.
0 No cuts.
1 Conservative cut strategy.
2 Moderate cut strategy.
3 Aggressive cut strategy.
Default value -1
CUTSELECT
Description A bit vector providing detailed control of the cuts created for the root node of a global
solve. Use TREECUTSELECT to control cuts during the tree search.
Type Integer
Values Bit Meaning
5 Clique cuts.
6 Mixed Integer Rounding (MIR) cuts.
7 Lifted cover cuts.
11 Flow path cuts.
12 Implication cuts.
13 Turn on automatic Lift-and-Project cutting strategy.
14 Disable cutting from cut rows.
15 Lifted GUB cover cuts.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 343
Default value -1
Note The default value is -1 which enables all bits. Any bits not listed in the above table
should be left in their default ’on’ state, since the interpretation of such bits might
change in future versions of the optimizer.
Affects routines XPRSglobal (GLOBAL).
See also COVERCUTS, GOMCUTS, TREECUTSELECT.
DEFAULTALG
Description This selects the algorithm that will be used to solve the LP if no algorithm flag is passed
to the optimization routines.
Type Integer
Values 1 Automatically determined.
2 Dual simplex.
3 Primal simplex.
4 Newton barrier.
Default value 1
Note Please note that this will affect how the MIP node LP problems are solved during the
global search. To change how the root LP is solved only, please use the appropriate flags
to XPRSminim, XPRSmaxim, XPRSlpoptimize or XPRSmipoptimize.
Affects routines XPRSlpoptimize (LPOPTIMIZE), XPRSmipoptimize (MIPOPTIMIZE), XPRSmaxim
(MAXIM), XPRSminim (MINIM), XPRSglobal (GLOBAL).
DEGRADEFACTOR
Description Branch and Bound: Factor to multiply estimated degradations associated with an
unexplored node in the tree. The estimated degradation is the amount by which the
objective function is expected to worsen in an integer solution that may be obtained
through exploring a given node.
Type Double
Default value 1.0
Affects routines XPRSglobal (GLOBAL).
DENSECOLLIMIT
Description Newton barrier: Columns with more than DENSECOLLIMIT elements are considered to
be dense. Such columns will be handled specially in the Cholesky factorization of this
matrix.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 344
Type Integer
Default value 0 — determined automatically.
DETERMINISTIC
Description Branch and Bound: Specifies whether the parallel MIP search should be deterministic.
Type Integer
DUALGRADIENT
DUALIZE
Description This specifies whether presolve should form the dual of the problem.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 345
DUALSTRATEGY
Description Simplex: Specifies the dual strategy that should be used when re-optimizing with the
dual algorithm in the branch and bound tree.
Type Integer
Values 0 Use the primal algorithm to remove dual infeasibilities if they arise when the
problem is still primal infeasible.
1 Use the dual algorithm to remove dual infeasibilities if they arise when the prob-
lem is still primal infeasible.
Default value 1
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSglobal (GLOBAL).
EIGENVALUETOL
ELIMTOL
Description The Markowitz tolerance for the elimination phase of the presolve.
Type Double
Default value 0.001
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
ETATOL
Description Zero tolerance on eta elements. During each iteration, the basis inverse is premultiplied
by an elementary matrix, which is the identity except for one column - the eta vector.
Elements of eta vectors whose absolute value is smaller than ETATOL are taken to be
zero in this step.
Type Double
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 346
Default value 1.0E-13
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSbtran, XPRSftran.
EXTRACOLS
Description The initial number of extra columns to allow for in the matrix. If columns are to be
added to the matrix, then, for maximum efficiency, space should be reserved for the
columns before the matrix is input by setting the EXTRACOLS control. If this is not done,
resizing will occur automatically, but more space may be allocated than the user actually
requires.
Type Integer
Default value 0
Affects routines XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadqp.
See also EXTRAROWS, EXTRAELEMS, EXTRAMIPENTS.
EXTRAELEMS
Description The initial number of extra matrix elements to allow for in the matrix, including
coefficients for cuts. If rows or columns are to be added to the matrix, then, for
maximum efficiency, space should be reserved for the extra matrix elements before the
matrix is input by setting the EXTRAELEMS control. If this is not done, resizing will occur
automatically, but more space may be allocated than the user actually requires. The
space allowed for cut coefficients is equal to the number of extra matrix elements
remaining after rows and columns have been added but before the global optimization
starts. EXTRAELEMS is set automatically by the optimizer when the matrix is first input
to allow space for cuts, but if you add rows or columns, this automatic setting will not
be updated. So if you wish cuts, either automatic cuts or user cuts, to be added to the
matrix and you are adding rows or columns, EXTRAELEMS must be set before the matrix
is first input, to allow space both for the cuts and any extra rows or columns that you
wish to add.
Type Integer
Default value Hardware/platform dependent.
Affects routines XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadqp, XPRSsetcbcutmgr.
See also EXTRACOLS, EXTRAROWS.
EXTRAMIPENTS
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 347
Type Integer
Default value 0
EXTRAPRESOLVE
Description The initial number of extra elements to allow for in the presolve.
Type Integer
EXTRAQCELEMENTS
Description This control is deprecated, and will be removed from future versions of the optimizer.
Type Integer
Default value 0
Affects routines XPRSreadprob (READPROB), XPRSloadqcqp.
See also EXTRAELEMS, EXTRAMIPENTS, EXTRAROWS, EXTRAQCROWS.
EXTRAQCROWS
Description This control is deprecated, and will be removed from future versions of the optimizer.
Type Integer
Default value 0
Affects routines XPRSreadprob (READPROB), XPRSloadqcqp.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 348
EXTRAROWS
Description The initial number of extra rows to allow for in the matrix, including cuts. If rows are to
be added to the matrix, then, for maximum efficiency, space should be reserved for the
rows before the matrix is input by setting the EXTRAROWS control. If this is not done,
resizing will occur automatically, but more space may be allocated than the user actually
requires. The space allowed for cuts is equal to the number of extra rows remaining
after rows have been added but before the global optimization starts. EXTRAROWS is set
automatically by the optimizer when the matrix is first input to allow space for cuts, but
if you add rows, this automatic setting will not be updated. So if you wish cuts, either
automatic cuts or user cuts, to be added to the matrix and you are adding rows,
EXTRAROWS must be set before the matrix is first input, to allow space both for the cuts
and any extra rows that you wish to add.
Type Integer
Default value Dependent on the matrix characteristics.
Affects routines XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadqp, XPRSsetcbcutmgr.
See also EXTRACOLS.
EXTRASETELEMS
Description The initial number of extra elements in sets to allow for in the matrix. If sets are to be
added to the matrix, then, for maximum efficiency, space should be reserved for the set
elements before the matrix is input by setting the EXTRASETELEMS control. If this is not
done, resizing will occur automatically, but more space may be allocated than the user
actually requires.
Type Integer
Default value 0
Affects routines XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadqp.
See also EXTRAMIPENTS, EXTRASETS.
EXTRASETS
Description The initial number of extra sets to allow for in the matrix. If sets are to be added to the
matrix, then, for maximum efficiency, space should be reserved for the sets before the
matrix is input by setting the EXTRASETS control. If this is not done, resizing will occur
automatically, but more space may be allocated than the user actually requires.
Type Integer
Default value 0
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 349
Affects routines XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadqp.
See also EXTRAMIPENTS, EXTRASETELEMS.
FEASIBILITYPUMP
Description Branch and Bound: Decides if the Feasibility Pump heuristic should be run at the top
node.
Type Integer
Values 0 Turned off.
1 Always try the Feasibility Pump.
2 Try the Feasibility Pump only if other heuristics have failed to find an integer
solution.
Default value 0
Affects routines XPRSglobal (GLOBAL).
FEASTOL
Description This is the zero tolerance on right hand side values, bounds and range values, i.e. the
bounds of basic variables. If one of these is less than or equal to FEASTOL in absolute
value, it is treated as zero.
Type Double
Default value 1.0E-06
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSgetinfeas.
FORCEOUTPUT
Description Certain names in the problem object may be incompatible with different file formats
(such as names containing spaces for LP files). If the optimizer might be unable to read
back a problem because of non-standard names, it will first attempt to write it out using
an extended naming convention. If the names would not be possible to extend so that
they would be reproducible and recognizable, it will give an error message and won’t
create the file. If the optimizer might be unable to read back a problem because of
non-standard names, it will give an error message and won’t create the file. This option
may be used to force output anyway.
Type Integer
Values 0 Check format compatibility, and in case of failure try to extend names so that
they are reproducible and recognizable.
1 Force output.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 350
Default value 0
Affects routines XPRSwriteprob (WRITEPROB).
GLOBALFILEBIAS
Description When the memory used by the branch and bound search tree exceeds the target
specified by the TREEMEMORYLIMIT control, there are two techniques the optimizer uses
to reduce the tree’s memory imprint: compressing more nodes in memory, and writing
already compressed nodes to the global file. The GLOBALFILEBIAS control allows you
to influence which of these techniques the optimizer will favour. A high value of
GLOBALFILEBIAS will result in the optimizer preferring to write already compressed
nodes to the global file rather than compressing some more highly rated nodes in
memory. At the most extreme, a value of 1.0 will result in every node being written to
disc immediately after it is compressed. A low value of GLOBALFILEBIAS will cause the
optimizer to prefer compressing higher rated nodes to saving lower rated nodes in the
global file. At the most extreme, a value of 0.0 will cause the optimizer to compress
every node it can before writing anything to the global file. There is an obvious speed
penalty when the optimizer needs to access a compressed node during the solve, as it
has to be decompressed, but there is an additional penalty if it requires a node that is
both compressed and saved to the global file. GLOBALFILEBIAS allows you to tune the
memory management of the branch and bound tree to minimize the overall penalty
incurred in your solve.
Type Double
Default value 0.5
See also TREEMEMORYLIMIT.
GOMCUTS
Description Branch and Bound: The number of rounds of Gomory cuts at the top node. These can
always be generated if the current node does not yield an integral solution. However,
Gomory cuts are not usually as effective as lifted cover inequalities in reducing the size
of the feasible region.
Type Integer
Default value -1 — determined automatically.
Affects routines XPRSglobal (GLOBAL).
HEURDEPTH
Description Branch and Bound: Sets the maximum depth in the tree search at which heuristics will
be used to find MIP solutions. It may be worth stopping the heuristic search for solutions
after a certain depth in the tree search. A value of 0 signifies that heuristics will not be
used.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 351
Type Integer
Default value -1
Affects routines XPRSglobal (GLOBAL).
HEURDIVERANDOMIZE
Description The level of randomization to apply in the diving heuristic. The diving heuristic uses
priority weights on rows and columns to determine the order in which to e.g. round
fractional columns, or the direction in which to round them. This control determines by
how large a random factor these weights should be changed.
Type Double
Values 0.0-1.0 Amount of randomization (0.0=none, 1.0=full)
Default value 0.0
Affects routines XPRSglobal (GLOBAL).
See also HEURDIVESTRATEGY, HEURDIVESPEEDUP.
HEURDIVESPEEDUP
Description Branch and Bound: Changes the emphasis of the diving heuristic from solution quality
to diving speed.
Type Integer
Values -2 Automatic selection biased towards quality
-1 Automatic selection biased towards speed.
0-4 manual emphasis bias from emphasis on quality (0) to emphasis on speed (4).
Default value -1
Affects routines XPRSglobal (GLOBAL).
See also HEURDIVESTRATEGY.
HEURDIVESTRATEGY
Description Branch and Bound: Chooses the strategy for the diving heuristic.
Type Integer
Values -1 Automatic selection of strategy.
0 Disables the diving heuristic.
1-10 Available pre-set strategies for rounding infeasible global entities and reoptimiz-
ing during the heuristic dive.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 352
Default value -1
Affects routines XPRSglobal (GLOBAL).
See also HEURSTRATEGY.
HEURFREQ
Description Branch and Bound: This specifies the frequency at which heuristics are used in the tree
search. Heuristics will only be used at a node if the depth of the node is a multiple of
HEURFREQ.
Type Integer
Default value -1
Affects routines XPRSglobal (GLOBAL).
HEURMAXSOL
Description Branch and Bound: This specifies the maximum number of heuristic solutions that will
be found in the tree search.
Type Integer
Default value -1
Affects routines XPRSglobal (GLOBAL).
HEURNODES
Description Branch and Bound: This specifies the maximum number of nodes at which heuristics are
used in the tree search.
Type Integer
Default value -1
Affects routines XPRSglobal (GLOBAL).
HEURSEARCHEFFORT
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 353
Note HEURSEARCHEFFORT is used as a multiplier on the default amount of work the local
search heuristics should do. A higher value means the local search heuristics will be run
more often and that they are allowed to search larger neighborhoods.
Affects routines XPRSglobal (GLOBAL).
HEURSEARCHFREQ
Description Branch and Bound: This specifies how often the local search heuristic should be run in
the tree.
Type Integer
Values -1 Automatic.
0 Disabled in the tree.
n>0 Number of nodes between each run.
Default value -1
Affects routines XPRSglobal (GLOBAL).
See also HEURSTRATEGY.
HEURSEARCHROOTSELECT
Description A bit vector for selecting which local search heuristics to apply on the root node of a
global solve. Use HEURSEARCHTREESELECT to control local search heuristics during the
tree search.
Type Integer
Note The local search heuristics will benefit from having an existing incumbent solution, but it
is not required. An initial solution can also be provided by the user through either
XPRSloadmipsol or XPRSloadascsol.
Affects routines XPRSglobal (GLOBAL).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 354
HEURSEARCHTREESELECT
Description A bit vector for selecting which local search heuristics to apply during the tree search of
a global solve. Use HEURSEARCHROOTRSELECT to control local search heuristics on the
root node.
Type Integer
Values Bit Meaning
0 Local search with a large neighborhood. Potentially slow but is good for finding
solutions that differs significantly from the incumbent.
1 Local search with a small neighborhood centered around a node LP solution.
2 Local search with a small neighborhood centered around an integer solution.
This heuristic will often provide smaller, incremental improvements to an incum-
bent solution.
Default value 1
Note The local search heuristics will benefit from having an existing incumbent solution, but it
is not required. An initial solution can also be provided by the user through either
XPRSloadmipsol or XPRSloadascsol.
Affects routines XPRSglobal (GLOBAL).
See also HEURSTRATEGY, HEURSEARCHROOTSELECT, HEURSEARCHEFFORT.
HEURSTRATEGY
Description Branch and Bound: This specifies the heuristic strategy. On some problems it is worth
trying more comprehensive heuristic strategies by setting HEURSTRATEGY to 2 or 3.
Type Integer
Values -1 Automatic selection of heuristic strategy.
0 No heuristics.
1 Basic heuristic strategy.
2 Enhanced heuristic strategy.
3 Extensive heuristic strategy.
Default value -1
Affects routines XPRSglobal (GLOBAL).
HEURTHREADS
Description Branch and Bound: The number of threads to dedicate to running heuristics on the root
node.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 355
Values -1 Automatically determined from the THREADS control.
0 Disabled. Heuristics will be run sequentially with the root LP solve and cutting.
>=1 Number of root threads to dedicate to parallel heuristics.
Default value 0
Note When heuristic threads are enable, the heuristics will be run in parallel with the initial
LP solve, if possible, and in parallel with the root cutting.
Affects routines XPRSmipoptimize (MIPOPTIMIZE).
See also THREADS.
HISTORYCOSTS
Description Branch and Bound: How to update the pseudo cost for a global entity when a strong
branch or a regular branch is applied.
Type Integer
IFCHECKCONVEXITY
Description Determines if the convexity of the problem is checked before optimization. Applies to
quadratic, mixed integer quadratic and quadratically constrained problems. Checking
convexity takes some time, thus for problems that are known to be convex it might be
reasonable to switch the checking off.
Type Integer
Values 0 Turn off convexity checking.
1 Turn on convexity checking.
Default value 1
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 356
INDLINBIGM
Description Indicator constraints can be internally converted to regular rows (i.e. linearized) using a
BigM coefficient whenever the BigM coefficient is smaller or equal to this value.
Type Double
Default value 1.0E+05
Affects routines XPRSglobal (GLOBAL), XPRSmaxim (MAXIM), XPRSminim (MINIM).
INVERTFREQ
Description Simplex: The frequency with which the basis will be inverted. The basis is maintained in
a factorized form and on most simplex iterations it is incrementally updated to reflect
the step just taken. This is considerably faster than computing the full inverted matrix at
each iteration, although after a number of iterations the basis becomes less
well-conditioned and it becomes necessary to compute the full inverted matrix. The
value of INVERTFREQ specifies the maximum number of iterations between full
inversions.
Type Integer
Default value -1 — the frequency is determined automatically.
INVERTMIN
Description Simplex: The minimum number of iterations between full inversions of the basis matrix.
See the description of INVERTFREQ for details.
Type Integer
Default value 3
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
KEEPBASIS
Description Simplex: This determines which basis to use for the next iteration. The choice is between
using that determined by the crash procedure at the first iteration, or using the basis
from the last iteration.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 357
Values 0 Problem optimization starts from the first iteration, i.e. the previous basis is
ignored.
1 The previously loaded basis (last in memory) should be used.
Default value 1
Note This gets reset to the default value after optimization has started.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
KEEPMIPSOL
Description Branch and Bound: The number of integer solutions to store. During a global search,
any number of integer solutions may be found, which may or may not represent optimal
solutions. See XPRSglobal (GLOBAL). Goal Programming: The number of partial
solutions to store in the pre-emptive goal programming. Pre-emptive goal programming
solves a sequence of problems giving a sequence of partial solutions. See XPRSgoal
(GOAL). The stored solutions can only be accessed in a limited way - see the notes below.
An alternative method of storing multiple integer solutions from the Optimizer library
(or Mosel) is to use an integer solution callback function to retrieve and store them - see
XPRSsetcbintsol for details.
Type Integer
Values 1 store the best/final solution only.
n=2-11 store the n best/most recent solutions.
Default value 1
Note Multiple solutions are kept by storing them on separate binary solution files. The
best/final solution is stored on the default solution file, [Link], as usual. The
next best solution (if found) is stored on a solution file named probname.so0, the next
best on probname.so1, and so on up to probname.so9, or until there are no further
solutions. The only function able to access the multiple solution files is XPRSwritesol
(WRITESOL) - refer to its "e" flag. It is also possible to use other functions that access the
solution from the solution file by renaming a particular stored solution file, e.g.,
probname.so3, to the default solution file [Link] before using the function. A
list of functions that may be used to access the solution from the solution file may be
found under the SOLUTIONFILE control.
Affects routines XPRSglobal (GLOBAL), XPRSgoal (GOAL).
See also XPRSwritesol (WRITESOL) with its e flag; XPRSsetcbintsol.
KEEPNROWS
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 358
Default value 1
Affects routines XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadqp.
L1CACHE
Description Newton barrier: L1 cache size in kB (kilo bytes) of the CPU. On Intel (or compatible)
platforms a value of -1 may be used to determine the cache size automatically.
Type Integer
LINELENGTH
Type Integer
Default value 2048
Affects routines XPRSreadprob (READPROB)
LNPBEST
Description Number of infeasible global entities to create lift-and-project cuts for during each round
of Gomory cuts at the top node (see GOMCUTS).
Type Integer
Default value 50
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 359
LNPITERLIMIT
Type Integer
Default value 10
Note By setting the number to zero a Gomory cut will be created instead.
LPITERLIMIT
Description Simplex: The maximum number of iterations that will be performed before the
optimization process terminates. For MIP problems, this is the maximum total number of
iterations over all nodes explored by the Branch and Bound method.
Type Integer
Default value 2147483645
Note By setting the number to zero a Gomory cut will be created instead.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
LOCALCHOICE
Description Controls when to perform a local backtrack between the two child nodes during a dive
in the branch and bound tree.
Type Integer
Values 1 Never backtrack from the first child, unless it is dropped (infeasible or cut off).
2 Always solve both child nodes before deciding which child to continue with.
3 Automatically determined.
Default value 1
Affects routines XPRSglobal (GLOBAL).
LPLOG
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 360
Values n<0 Detailed output every -n iterations.
0 Log displayed at the end of the optimization only.
n>0 Summary output every n iterations.
Default value 100
LPTHREADS
Description If set to a positive integer, it determines the number of threads implemented to run the
concurrent LP code. If the value is set to the default value (-1), the THREADS control will
determine the number of threads used for the LP solves. This control only affects the LP
solves if the DETERMINISTIC control is set to 0.
Type Integer
Values -1 Determined by the THREADS control.
>0 Number of threads to use.
Default value -1
Note There is a practical upper limit of 50 on the number of parallel threads the optimizer
will create.
Affects routines XPRSglobal (GLOBAL), XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also DETERMINISTIC, MIPTHREADS, BARTHREADS, THREADS.
MARKOWITZTOL
Description The Markowitz tolerance used for the factorization of the basis matrix.
Type Double
Default value 0.01
MATRIXTOL
Description The zero tolerance on matrix elements. If the value of a matrix element is less than or
equal to MATRIXTOL in absolute value, it is treated as zero.
Type Double
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 361
Affects routines XPRSreadprob (READPROB), XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadqp, XPRSalter (ALTER), XPRSaddcols, XPRSaddcuts, XPRSaddrows,
XPRSchgcoef, XPRSchgmcoef, XPRSstorecuts.
MAXCUTTIME
Description The maximum amount of time allowed for generation of cutting planes and
reoptimization. The limit is checked during generation and no further cuts are added
once this limit has been exceeded.
Type Integer
MAXGLOBALFILESIZE
Description The maximum size, in megabytes, to which the global file may grow, or 0 for no limit.
When the global file reaches this limit, a second global file will be created. Useful if you
are using a filesystem that puts a maximum limit on the size of a file.
Type Integer
Default value 0 (determined by the THREADS control)
See also GLOBALFILESIZE.
MAXIIS
Description This function controls the number of Irreducible Infeasible Sets to be found using the
XPRSiisall (IIS -a).
Type Integer
Values -1 Search for all IIS.
0 Do not search for IIS.
n>0 Search for the first n IIS.
Default value -1
Note The function XPRSiisnext is not affected.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 362
MAXMIPSOL
Description Branch and Bound: This specifies a limit on the number of integer solutions to be found
by the Optimizer. It is possible that during optimization the Optimizer will find the same
objective solution from different nodes. However, MAXMIPSOL refers to the total
number of integer solutions found, and not necessarily the number of distinct solutions.
Type Integer
Default value 0
Affects routines XPRSglobal (GLOBAL).
MAXNODE
Description Branch and Bound: The maximum number of nodes that will be explored.
Type Integer
Default value 100000000
Affects routines XPRSglobal (GLOBAL).
MAXPAGELINES
MAXSCALEFACTOR
Description This determines the maximum scaling factor that can be applied during scaling. The
maximum is provided as an exponent of a power of 2.
Type Integer
Values 0-64 The maximum is provided an exponent of a power of 2.
Default value 64
Affects routines XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp, XPRSreadprob
(READPROB), XPRSscale (SCALE).
See also SCALING.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 363
MAXTIME
Description The maximum time in seconds that the Optimizer will run before it terminates, including
the problem setup time and solution time. For MIP problems, this is the total time taken
to solve all the nodes.
Type Integer
Values 0 No time limit.
n>0 If an integer solution has been found, stop MIP search after n seconds, otherwise
continue until an integer solution is finally found.
n<0 Stop in LP or MIP search after n seconds.
Default value 0
Affects routines XPRSglobal (GLOBAL), XPRSmaxim (MAXIM), XPRSminim (MINIM).
MIPABSCUTOFF
Description Branch and Bound: If the user knows that they are interested only in values of the
objective function which are better than some value, this can be assigned to
MIPABSCUTOFF. This allows the Optimizer to ignore solving any nodes which may yield
worse objective values, saving solution time. When a MIP solution is found a new cut off
value is calculated and the value can be obtained from the CURRMIPCUTOFF attribute.
The value of CURRMIPCUTOFF is calculated using the MIPRELCUTOFF and
MIPADDCUTOFF controls.
Type Double
Default value 1.0E+40 (for minimization problems); -1.0E+40 (for maximization problems).
Note MIPABSCUTOFF can also be used to stop the dual algorithm.
Affects routines XPRSglobal (GLOBAL), XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also MIPRELCUTOFF, MIPADDCUTOFF.
MIPABSSTOP
Description Branch and Bound: The absolute tolerance determining whether the global search will
continue or not. It will terminate if
|MIPOBJVAL - BESTBOUND| ≤ MIPABSSTOP
where MIPOBJVAL is the value of the best solution’s objective function, and BESTBOUND
is the current best solution bound. For example, to stop the global search when a MIP
solution has been found and the Optimizer can guarantee it is within 100 of the optimal
solution, set MIPABSSTOP to 100.
Type Double
Default value 0.0
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 364
Affects routines XPRSglobal (GLOBAL).
See also MIPRELSTOP, MIPADDCUTOFF.
MIPADDCUTOFF
Description Branch and Bound: The amount to add to the objective function of the best integer
solution found to give the new CURRMIPCUTOFF. Once an integer solution has been
found whose objective function is equal to or better than CURRMIPCUTOFF,
improvements on this value may not be interesting unless they are better by at least a
certain amount. If MIPADDCUTOFF is nonzero, it will be added to CURRMIPCUTOFF each
time an integer solution is found which is better than this new value. This cuts off
sections of the tree whose solutions would not represent substantial improvements in
the objective function, saving processor time. The control MIPABSSTOP provides a
similar function but works in a different way.
Type Double
MIPLOG
MIPPRESOLVE
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 365
Values Bit Meaning
0 Reduced cost fixing will be performed at each node. This can simplify the node
before it is solved, by deducing that certain variables’ values can be fixed based
on additional bounds imposed on other variables at this node.
1 Logical preprocessing will be performed at each node. This is performed on bi-
nary variables, often resulting in fixing their values based on the constraints. This
greatly simplifies the problem and may even determine optimality or infeasibility
of the node before the simplex method commences.
2 [Unused] This bit is no longer used to control probing. Refer to the integer con-
trol PREPROBING for setting probing level during presolve.
3 If node preprocessing is allowed to change bounds on continuous columns.
Default value -1
Note If the user has not set MIPPRESOLVE then its value is determined automatically after
presolve (in the XPRSmaxim (MAXIM), XPRSminim (MINIM) call) according to the
properties of the matrix.
MIPRELCUTOFF
Description Branch and Bound: Percentage of the LP solution value to be added to the value of the
objective function when an integer solution is found, to give the new value of
CURRMIPCUTOFF. The effect is to cut off the search in parts of the tree whose best
possible objective function would not be substantially better than the current solution.
The control MIPRELSTOP provides a similar functionality but works in a different way.
Type Double
Default value 1.0E-04
MIPRELSTOP
Description Branch and Bound: This determines whether or not the global search will terminate.
Essentially it will stop if:
|MIPOBJVAL - BESTBOUND| ≤ MIPRELSTOP x BESTBOUND
where MIPOBJVAL is the value of the best solution’s objective function and BESTBOUND
is the current best solution bound. For example, to stop the global search when a MIP
solution has been found and the Optimizer can guarantee it is within 5% of the optimal
solution, set MIPRELSTOP to 0.05.
Type Double
Default value 0.0001
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 366
Affects routines XPRSglobal (GLOBAL).
See also MIPABSSTOP, MIPRELCUTOFF.
MIPTARGET
Description Branch and Bound: The target object function for the global search (only used by certain
node selection criteria). This is set automatically after an LP optimization routine, unless
it was previously set by the user.
Type Double
MIPTHREADS
Description If set to a positive integer it determines the number of threads implemented to run the
parallel MIP code. If the value is set to the default value (-1), the THREADS control will
determine the number of threads used.
Type Integer
MIPTOL
Description Branch and Bound: This is the tolerance within which a decision variable’s value is
considered to be integral.
Type Double
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 367
MPS18COMPATIBLE
Description If set to 0, the MPS writer creates an output that is compatible with version 18 (i.e. skips
writing sections introduced in later releases).
Type Integer
Default value 0
Affects routines XPRSwriteprob (WRITE PROB)
MPSBOUNDNAME
Description The bound name sought in the MPS file. As with all string controls, this is of length 64
characters plus a null terminator, \0.
Type String
Default value 64 blanks
Affects routines XPRSreadprob (READPROB).
MPSECHO
Description Determines whether comments in MPS matrix files are to be printed out during matrix
input.
Type Integer
Values 0 MPS comments are not to be echoed.
1 MPS comments are to be echoed.
Default value 1
Affects routines XPRSreadprob (READPROB).
MPSFORMAT
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 368
MPSNAMELENGTH
Description The maximum length (in 8 character units) of row and column names in the matrix.
Type Integer
Default value 8
Note MPSNAMELENGTH must not be set to more than 64 characters.
MPSOBJNAME
Description The objective function name sought in the MPS file. As with all string controls, this is of
length 64 characters plus a null terminator, \0.
Type String
MPSRANGENAME
Description The range name sought in the MPS file. As with all string controls, this is of length 64
characters plus a null terminator, \0.
Type String
Default value 64 blanks
Affects routines XPRSreadprob (READPROB).
MPSRHSNAME
Description The right hand side name sought in the MPS file. As with all string controls, this is of
length 64 characters plus a null terminator, \0.
Type String
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 369
MUTEXCALLBACKS
Description Branch and Bound: This determines whether the callback routines are mutexed from
within the optimizer.
Type Integer
Values 0 Callbacks are not mutexed.
1 Callbacks are mutexed.
Default value 1
Note If the users’ callbacks take a significant amount of time it may be preferable not to
mutex the callbacks. In this case the user must ensure that their callbacks are threadsafe.
Affects routines XPRSsetcbchgbranchXPRSsetcbchgnode, XPRSsetcboptnode, XPRSsetcbinfnode,
XPRSsetcbintsol, XPRSsetcbnodecutoff, XPRSsetcbprenode.
NODESELECTION
Description Branch and Bound: This determines which nodes will be considered for solution once
the current node has been solved.
Type Integer
Values 1 Local first: Choose between descendant and sibling nodes if available; choose
from all outstanding nodes otherwise.
2 Best first: Choose from all outstanding nodes.
3 Local depth first: Choose between descendant and sibling nodes if available;
choose from the deepest nodes otherwise.
4 Best first, then local first: Best first is used for the first BREADTHFIRST nodes,
after which local first is used.
5 Pure depth first: Choose from the deepest outstanding nodes.
Default value Dependent on the matrix characteristics.
Affects routines XPRSglobal (GLOBAL).
OPTIMALITYTOL
Description Simplex: This is the zero tolerance for reduced costs. On each iteration, the simplex
method searches for a variable to enter the basis which has a negative reduced cost. The
candidates are only those variables which have reduced costs less than the negative
value of OPTIMALITYTOL.
Type Double
Default value 1.0E-06
Affects routines XPRSgetinfeas, XPRSmaxim (MAXIM), XPRSminim (MINIM).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 370
OUTPUTLOG
Description This controls the level of output produced by the Optimizer during optimization. Output
is sent to the screen (stdout) by default, but may be intercepted by a user function
using the user output callback; see XPRSsetcbmessage. However, under Windows, no
output from the Optimizer DLL is sent to the screen. The user must define a callback
function and print messages to the screen them self if they wish output to be displayed.
Type Integer
Values 0 Turn all output off.
1 Print all messages.
3 Print error and warning messages.
4 Print error messages only.
Default value 1
Affects routines XPRSsetcbmessage, XPRSsetlogfile.
OUTPUTMASK
Description Mask to restrict the row and column names written to file. As with all string controls,
this is of length 64 characters plus a null terminator, \0.
Type String
Default value 64 ’?’s
Affects routines XPRSwriterange (WRITERANGE), XPRSwritesol (WRITESOL).
OUTPUTTOL
PENALTY
Description Minimum absolute penalty variable coefficient. BIGM and PENALTY are set by the input
routine (XPRSreadprob (READPROB)) but may be reset by the user prior to XPRSmaxim
(MAXIM), XPRSminim (MINIM).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 371
Type Double
Default value Dependent on the matrix characteristics.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
PERTURB
Description The factor by which the problem will be perturbed prior to optimization if the control
AUTOPERTURB has been set to 1. A value of 0.0 results in an automatically determined
perturbation value.
Type Double
Default value 0.0 — perturbation value is determined automatically by default.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
PIVOTTOL
Description Simplex: The zero tolerance for matrix elements. On each iteration, the simplex method
seeks a nonzero matrix element to pivot on. Any element with absolute value less than
PIVOTTOL is treated as zero for this purpose.
Type Double
Default value 1.0E-09
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSpivot.
PPFACTOR
PRECOEFELIM
Description Presolve: Specifies whether the optimizer should attempt to recombine constraints in
order to reduce the number of non zero coefficients when presolving a mixed integer
problem.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 372
Values 0 Disabled.
1 Remove as many coefficients as possible.
2 Cautious eliminations. Will not perform a reduction if it might destroy problem
structure useful to e.g. heuristics or cutting.
Default value 2
Affects routines XPRSmipoptimize (MIPOPTIMIZE), XPRSglobal (GLOBAL).
See also PRESOLVE, PRESOLVEOPS.
PREDOMCOL
Description Presolve: Determines the level of dominated column removal reductions to perform
when presolving a mixed integer problem. Only binary columns will be checked.
Type Integer
Values -1 Automatically determined.
0 Disabled.
1 Cautious strategy.
2 All candidate binaries will be checked for domination.
Default value -1
PREDOMROW
Description Presolve: Determines the level of dominated row removal reductions to perform when
presolving a problem.
Type Integer
Values -1 Automatically determined.
0 Disabled.
1 Cautious strategy.
2 Medium strategy.
3 Aggressive strategy. All candidate row combinations will be considered.
Default value -1
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 373
PREPROBING
Description Amount of probing to perform on binary variables during presolve. This is done by
fixing a binary to each of its values in turn and analyzing the implications.
Type Integer
Values -1 Let the optimizer decide on the amount of probing.
0 Disabled.
+1 Light probing - only few implications will be examined.
+2 Full probing - all implications for all binaries will be examined.
+3 Full probing and repeat as long as the problem is significantly reduced.
Default value -1
Affects routines XPRSglobal (GLOBAL).
See also PRESOLVE.
PRESOLVE
Description This control determines whether presolving should be performed prior to starting the
main algorithm. Presolve attempts to simplify the problem by detecting and removing
redundant constraints, tightening variable bounds, etc. In some cases, infeasibility may
even be determined at this stage, or the optimal solution found.
Type Integer
Values -1 Presolve applied, but a problem will not be declared infeasible if primal infea-
sibilities are detected. The problem will be solved by the LP optimization algo-
rithm, returning an infeasible solution, which can sometimes be helpful.
0 Presolve not applied.
1 Presolve applied.
2 Presolve applied, but redundant bounds are not removed. This can sometimes
increase the efficiency of the barrier algorithm.
Default value 1
Note Memory for presolve is dynamically resized. If the Optimizer runs out of memory for
presolve, an error message (245 ) is produced.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
PRESOLVEOPS
Description This specifies the operations which are performed during the presolve.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 374
Type Integer
Values Bit Meaning
0 Singleton column removal.
1 Singleton row removal.
2 Forcing row removal.
3 Dual reductions.
4 Redundant row removal.
5 Duplicate column removal.
6 Duplicate row removal.
7 Strong dual reductions.
8 Variable eliminations.
9 No IP reductions.
10 No semi-continuous variable detection.
11 No advanced IP reductions.
14 Linearly dependant row removal.
15 No integer variable and SOS detection.
Default value 511 (bits 0 — 8 incl. are set)
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSpresolverow.
See also 5.3, PRESOLVE, MIPPRESOLVE.
PRICINGALG
Description Simplex: This determines the primal simplex pricing method. It is used to select which
variable enters the basis on each iteration. In general Devex pricing requires more time
on each iteration, but may reduce the total number of iterations, whereas partial
pricing saves time on each iteration, but may result in more iterations.
Type Integer
Values -1 Partial pricing.
0 Determined automatically.
1 Devex pricing.
2 Steepest edge.
3 Steepest edge with unit initial weights.
Default value 0
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also DUALGRADIENT.
PRIMALOPS
Description Primal simplex: allows fine tuning the variable selection in the primal simplex solver.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 375
Type Integer
Values Bit Meaning
0 Use aggressive dj scaling.
1 Conventional dj scaling.
2 Use reluctant switching back to partial pricing.
3 Use dynamic switching between cheap and expensive pricing strategies.
Default value -1
Note If both bits 0 and 1 are both set or unset then the dj scaling strategy is determined
automatically.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also PRICINGALG.
PRIMALUNSHIFT
PROBNAME
PSEUDOCOST
Description Branch and Bound: The default pseudo cost used in estimation of the degradation
associated with an unexplored node in the tree search. A pseudo cost is associated with
each integer decision variable and is an estimate of the amount by which the objective
function will be worse if that variable is forced to an integral value.
Type Double
Default value 0.01
Affects routines XPRSglobal (GLOBAL), XPRSreaddirs (READDIRS).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 376
QUADRATICUNSHIFT
Description Determines whether an extra solution purification step is called after a solution found
by the quadratic simplex (either primal or dual).
Type Integer
Values -1 Determined automatically.
0 No purification step.
1 Always do the purification step.
Default value 0
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
REFACTOR
Description Indicates whether the optimization should restart using the current representation of
the factorization in memory.
Type Integer
Values 0 Do not refactor on reoptimizing.
1 Refactor on reoptimizing.
Default value 0 — for the global search. 1 — for reoptimizing.
Note In the tree search, the optimal bases at the nodes are not refactorized by default, but
the optimal basis for an LP problem will be refactorized. If you are repeatedly solving
LPs with few changes then it is more efficient to set REFACTOR to 0.
Affects routines XPRSglobal (GLOBAL), XPRSmaxim (MAXIM), XPRSminim (MINIM).
RELPIVOTTOL
Description Simplex: At each iteration a pivot element is chosen within a given column of the
matrix. The relative pivot tolerance, RELPIVOTTOL, is the size of the element chosen
relative to the largest possible pivot element in the same column.
Type Double
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 377
REPAIRINDEFINITEQ
Description Controls if the optimizer should make indefinite quadratic matrices positive definite
when it is possible.
Type Integer
Values 0 Repair if possible.
1 Do not repair.
Default value 1
Affects routines XPRSglobal (GLOBAL), XPRSmaxim (MAXIM), XPRSminim (MINIM).
ROOTPRESOLVE
Description Determines if presolving should be performed on the problem after the global search
has finished with root cutting and heuristics.
Type Integer
Values -1 Let the optimizer decide if the problem should be presolved again.
0 Disabled.
+1 Always presolve the root problem.
Default value -1
Affects routines XPRSglobal (GLOBAL).
See also PRESOLVE.
SBBEST
Description Number of infeasible global entities to initialize pseudo costs for on each node.
Type Integer
Values -1 determined automatically.
0 disable strong branching.
n>0 perform strong branching on up to n entities at each node.
Default value -1
Note By default, strong branching will be performed only for infeasible global entities whose
pseudo costs have not otherwise been initialized (see HISTORYCOSTS).
If SBBEST is set to zero, the control HISTORYCOSTS will also be treated as zero and no
past branching or strong branching information will be used in the global entity
selection.
Affects routines XPRSglobal (GLOBAL), XPRSmipoptimize (MIPOPTIMIZE).
See also SBITERLIMIT, SBSELECT, SBEFFORT, HISTORYCOSTS.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 378
SBEFFORT
Description Adjusts the overall amount of effort when using strong branching to select an infeasible
global entity to branch on.
Type Double
Default value 1.0
Note SBEFFORT is used as a multiplier on other strong branching related controls, and affects
the values used for SBBEST, SBSELECT and SBITERLIMIT when those are set to
automatic.
Affects routines XPRSglobal (GLOBAL).
See also SBBEST, SBITERLIMIT, SBSELECT.
SBESTIMATE
Description Branch and Bound: How to calculate pseudo costs from the local node when selecting
an infeasible global entity to branch on. These pseudo costs are used in combination
with local strong branching and history costs to select the branch candidate.
Type Integer
SBITERLIMIT
Description Number of dual iterations to perform the strong branching for each entity.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 379
SBSELECT
Description The size of the candidate list of global entities for strong branching.
Type Integer
Values -2 Automatic (low effort).
-1 Automatic (high effort).
n>=0 Include n entities in the candidate list (but always at least SBBEST candidates).
Default value -2
Note Before strong branching is applied on a node of the branch and bound tree, a list of
candidates is selected among the infeasible global entities. These entities are then
evaluated based on the local LP solution and prioritized. Strong branching will then be
applied to the SBBEST candidates. The evaluation is potentially expensive and for some
problems it might improve performance if the size of the candidate list is reduced.
SCALING
Description This determines how the Optimizer will rescale a model internally before optimization.
If set to 0, no scaling will take place.
Type Integer
Values Bit Meaning
0 Row scaling.
1 Column scaling.
2 Row scaling again.
3 Maximum.
4 Curtis-Reid.
5 0: scale by geometric mean.
1: scale by maximum element.
7 Objective function scaling.
8 Exclude the quadratic part of constraint when calculating scaling factors.
9 Scale before presolve.
10 Do not scale rows up.
11 Do not scale columns down.
Default value 163
Affects routines XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp, XPRSreadprob
(READPROB), XPRSscale (SCALE).
See also 6.3.1, MAXSCALEFACTOR.
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 380
SOLUTIONFILE
Description The SOLUTIONFILE control is deprecated and will be removed in version 18. Binary
solution files are no longer created automatically and it is now necessary to explicitly
create a binary solution file with the XPRSwritebinsol (WRITEBINSOL) command. The
XPRSwriteprtsol (WRITEPRTSOL), XPRSwritesol (WRITESOL) and PRINTSOL
commands will write or print reports for the solution in memory. To write a report on a
solution in binary solution file, the solution must first be loaded with the
XPRSreadbinsol (READBINSOL) command. The XPRSgetbasis, XPRSgetinfeas and
XPRSgetlpsol commands all obtain information from the solution in memory. To
obtain information on a solution in binary solution file, the solution must first be loaded
with the XPRSreadbinsol (READBINSOL) command.
Users should use the XPRSgetlpsol function to get the current LP solution and
XPRSgetmipsol function to get the last found MIP solution. The XPRSgetlpsol will
read the current LP solution from memory and the XPRSgetmipsol will read the
current MIP solution from memory.
Type Integer
Values -1 The binary file is not created.
0 The binary file is not created.
1 The binary solution file will be created and used to store the final LP solution,
or, if a MIP solution has been found, the best known MIP solution. The solu-
tion is written to the file by the XPRSmaxim (MAXIM), XPRSminim (MINIM) and
XPRSglobal (GLOBAL) functions. The binary solution file will remain after the
Optimizer has finished.
Default value -1
SOSREFTOL
Description The minimum relative gap between the ordering values of elements in a special ordered
set. The gap divided by the absolute value of the larger of the two adjacent values must
be less than SOSREFTOL.
Type Double
Default value 1.0E-06
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 381
TEMPBOUNDS
Description Simplex: Specifies whether temporary bounds should be placed on unbounded variables
when optimizing with the dual algorithm. The temporary bounds allow the dual
algorithm to start from a dual feasible starting point and can speed up the optimization
time. The temporary bounds are removed during the optimization process.
Type Integer
THREADS
Note The value may be changed for specific parts of the optimization by the LPTHREADS,
MIPTHREADS and BARTHREADS controls.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also DETERMINISTIC, MIPTHREADS, BARTHREADS, LPTHREADS.
TRACE
Description Display the infeasibility diagnosis during presolve. If non-zero, an explanation of the
logical deductions made by presolve to deduce infeasibility or unboundedness will be
displayed on screen or sent to the message callback function.
Type Integer
Default value 0
Note Presolve is sometimes able to detect infeasibility and unboundedness in problems. The
set of deductions made by presolve can allow the user to diagnose the cause of
infeasibility or unboundedness in their problem. However, not all infeasibility or
unboundedness can be detected and diagnosed in this way.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 382
TREECOMPRESSION
Description When the size of the branch-and-bound tree exceeds the limit specified in the
TREEMEMORYLIMIT control, the optimizer will try to use data-compression techniques to
reduce the memory used by the tree. The TREECOMPRESSION control determines the
strength of the data-compression algorithm used; higher values give superior
data-compression at the affect of decreasing performance, while lower values compress
quicker but not as effectively. Where TREECOMPRESSION is set to 0, no data compression
will be used to reduce the tree size.
Type Integer
Default value 2
Note Presolve is sometimes able to detect infeasibility and unboundedness in problems. The
set of deductions made by presolve can allow the user to diagnose the cause of
infeasibility or unboundedness in their problem. However, not all infeasibility or
unboundedness can be detected and diagnosed in this way.
Affects routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also TREEMEMORYLIMIT.
TREECOVERCUTS
Description Branch and Bound: The number of rounds of lifted cover inequalities generated at
nodes other than the top node in the tree. Compare with the description for
COVERCUTS.
Type Integer
Default value 1
Affects routines XPRSglobal (GLOBAL).
TREECUTSELECT
Description A bit vector providing detailed control of the cuts created during the tree search of a
global solve. Use CUTSELECT to control cuts on the root node.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 383
Values Bit Meaning
5 Clique cuts.
6 Mixed Integer Rounding (MIR) cuts.
7 Lifted cover cuts.
11 Flow path cuts.
12 Implication cuts.
13 Turn on automatic Lift and Project cutting strategy.
14 Disable cutting from cut rows.
15 Lifted GUB cover cuts.
Default value 255743
Affects routines XPRSglobal (GLOBAL).
See also COVERCUTS, GOMCUTS, CUTSELECT.
TREEDIAGNOSTICS
Description A bit vector providing control over how various tree-management-related messages get
printed in the global logfile during the branch-and-bound search.
Type Integer
Values Bit Meaning
0 Output regular summaries of current tree memory usage.
1 Output messages whenever tree data is being compressed or written to global
file.
Default value 3
Affects routines XPRSglobal (GLOBAL).
See also MIPLOG, GOMCUTS, CUTSELECT.
TREEGOMCUTS
Description Branch and Bound: The number of rounds of Gomory cuts generated at nodes other
than the first node in the tree. Compare with the description for GOMCUTS.
Type Integer
Default value 1
Affects routines XPRSglobal (GLOBAL).
TREEMEMORYLIMIT
Description A soft limit, in megabytes, for the amount of memory to use in storing the branch and
bound search tree. This doesn’t include memory used for presolve, heuristics, solving the
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 384
LP relaxation, etc. When set to 0 (the default), the optimizer will calculate a limit
automatically based on the amount of free physical memory detected in the machine.
When the memory used by the branch and bound tree exceeds this limit, the optimizer
will try to reduce the memory usage by compressing lower-rated sections of the tree or
writing them out to the global file. Though the solve can continue if it cannot bring the
tree memory usage below the specified limit, performance will be inhibited and a
message will be printed to the log.
Type Integer
Default value 0 (calculate limit automatically)
TREEMEMORYSAVINGTARGET
Description When the memory used by the branch-and-bound search tree exceeds the limit specified
by the TREEMEMORYLIMIT control, the optimizer will try to save memory by compressing
lower-rated sections of the tree or writing them out to the global file. The target
amount of memory to save will be enough to bring memory usage back below the limit,
plus enough extra to give the tree room to grow. The TREEMEMORYSAVINGTARGET
control specifies the extra proportion of the tree’s size to try to save; for example, if the
tree memory limit is 1000Mb and TREEMEMORYSAVINGTARGET is 0.1, when the tree size
exceeds 1000Mb the optimizer will try to reduce the tree size to 900Mb. Reducing the
value of TREEMEMORYSAVINGTARGET will cause less extra nodes of the tree to be
compressed or saved to the global file, but will result in the memory saving routine
being triggered more often (as the tree will have less room in which to grow), which can
reduce performance. Increasing the value of TREEMEMORYSAVINGTARGET will cause
additional, more highly-rated nodes, of the tree to be compressed or saved to the global
file, which can cause performance issues if these nodes are required later in the solve.
Default value 0.1
Affects routines XPRSglobal (GLOBAL).
VARSELECTION
Description Branch and Bound: This determines the formula used to calculate the estimate of each
integer variable, and thus which integer variable is selected to be branched on at a
given node. The variable selected to be branched on is the one with the maximum
estimate. The variable estimates are also combined to calculate the overall estimate of
the node, which, depending on the BACKTRACK setting, may be used to choose between
outstanding nodes.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 385
Values -1 Determined automatically.
1 The minimum of the ’up’ and ’down’ pseudo costs.
2 The ’up’ pseudo cost plus the ’down’ pseudo cost.
3 The maximum of the ’up’ and ’down’ pseudo costs, plus twice the minimum of
the ’up’ and ’down’ pseudo costs.
4 The maximum of the ’up’ and ’down’ pseudo costs.
5 The ’down’ pseudo cost.
6 The ’up’ pseudo cost.
Default value -1
VERSION
Description The Optimizer version number, e.g. 1301 meaning release 13.01.
Type Integer
Control Parameters c
2009 Fair Isaac Corporation. All rights reserved. page 386
Chapter 10
Problem Attributes
During the optimization process, various properties of the problem being solved are stored and
made available to users of the FICO Xpress Libraries in the form of problem attributes. These can
be accessed in much the same manner as for the controls. Examples of problem attributes include
the sizes of arrays, for which library users may need to allocate space before the arrays themselves
are retrieved. A full list of the attributes available and their types may be found in this chapter.
Much as for the controls previously, it should be noted that the attributes as listed in this chapter
must be prefixed with XPRS_ to be used with the FICO Xpress Libraries and failure to do so will
result in an error. An example of their usage is the following which returns and prints the optimal
value of the objective function after the linear problem has been solved:
ACTIVENODES
BARAASIZE
BARCGAP
BARCROSSOVER
Description Indicates whether or not the basis crossover phase has been entered.
Type Integer
Values 0 the crossover phase has not been entered.
1 the crossover phase has been entered.
Set by routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BARDENSECOL
BARDUALINF
Description Sum of the dual infeasibilities for the Newton barrier algorithm.
Type Double
BARDUALOBJ
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 388
Type Double
Set by routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BARITER
BARLSIZE
BARPRIMALINF
Description Sum of the primal infeasibilities for the Newton barrier algorithm.
Type Double
Set by routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
BARPRIMALOBJ
BESTBOUND
Description Value of the best bound determined so far by the global search.
Type Double
Set by routines XPRSglobal.
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 389
BOUNDNAME
Type String
Set by routines XPRSreadprob.
BRANCHVALUE
Description The value of the branching variable at a node of the Branch and Bound tree.
Type Double
Set by routines XPRSglobal.
BRANCHVAR
Description The branching variable at a node of the Branch and Bound tree.
Type Integer
Set by routines XPRSglobal (GLOBAL).
COLS
Type Integer
Note If the matrix is in a presolved state, this attribute returns the number of columns in the
presolved matrix. If you require the value for the original matrix then use the
ORIGINALCOLS attribute instead. The PRESOLVESTATE attribute can be used to test if
the matrix is presolved or not. See also 5.3.
CORESDETECTED
Type Integer
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 390
Values >=1 Detected number of logical processors.
Note The optimizer will automatically use as many solver threads as the number of logical
processors detected.
If the detection fails, the optimizer will default to using a single thread only.
Set by routines XPRSinit.
See also THREADS.
CURRENTNODE
Description The unique identifier of the current node in the tree search.
Type Integer
Note The root node is always identified as node 1.
Set by routines XPRSmipoptimize (MIPOPTIMIZE).
CURRMIPCUTOFF
CUTS
Type Integer
Set by routines XPRSaddcuts, XPRSdelcpcuts, XPRSdelcuts, XPRSloadcuts, XPRSloadmodelcuts.
DUALINFEAS
Type Integer
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 391
Note If the matrix is in a presolved state, this attribute returns the number of dual
infeasibilities in the presolved matrix. If you require the value for the original matrix,
make sure you obtain the value when the matrix is not presolved. The PRESOLVESTATE
attribute can be used to test if the matrix is presolved or not. See also 5.3.
ELEMS
Type Integer
Note If the matrix is in a presolved state, this attribute returns the number of matrix nonzeros
in the presolved matrix. If you require the value for the original matrix, make sure you
obtain the value when the matrix is not presolved. The PRESOLVESTATE attribute can
be used to test if the matrix is presolved or not. See also 5.3.
ERRORCODE
Description The most recent Optimizer error number that occurred. This is useful to determine the
precise error or warning that has occurred, after an Optimizer function has signalled an
error by returning a non-zero value. The return value itself is not the error number.
Refer to the section 11.2 for a list of possible error numbers, the errors and warnings
that they indicate, and advice on what they mean and how to resolve them. A short
error message may be obtained using XPRSgetlasterror, and all messages may be
intercepted using the user output callback function; see XPRSsetcbmessage.
Type Integer
Set by routines Any.
GLOBALFILESIZE
Description The allocated size of the global file, in megabytes. Because data can be removed from
the global file during the branch and bound search, the size of the global file is usually
greater than the amount of data currently within it (represented by the
GLOBALFILEUSAGE control).
Type Integer
See also GLOBALFILEUSUAGE.
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 392
GLOBALFILEUSAGE
Description The number of megabytes of data from the branch-and-bound tree that have been
saved to the global file. Note that the actual allocated size of the global file
(represented by the GLOBALFILESIZE control) may be greater than this value.
Type Integer
Set by routines XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSglobal.
See also GLOBALFILESIZE, GLOBALFILEBIAS, TREEMEMORYLIMIT.
INDICATORS
LPOBJVAL
LPSTATUS
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 393
Note The possible return values are defined as constants in the Optimizer C header file and
VB .bas file.
Set by routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
MATRIXNAME
Note This is the name read from the MATRIX field in an MPS matrix, and is not related to the
problem name used in the Optimizer. Use XPRSgetprobname to get the problem name.
Set by routines XPRSreadprob, XPRSsetprobname.
MIPENTS
Description Number of global entities (i.e. binary, integer, semi-continuous, partial integer, and
semi-continuous integer variables) but excluding the number of special ordered sets.
Type Integer
Note If the matrix is in a presolved state, this attribute returns the number of global entities
in the presolved matrix. If you require the value for the original matrix, make sure you
obtain the value when the matrix is not presolved. The PRESOLVESTATE attribute can
be used to test if the matrix is presolved or not. See also 5.3.
Set by routines XPRSaddcols, XPRSchgcoltype, XPRSdelcols, XPRSloadglobal,
XPRSloadqglobal, XPRSreadprob.
See also SETS.
MIPINFEAS
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 394
MIPOBJVAL
Type Double
Set by routines XPRSglobal.
See also LPOBJVAL.
MIPSOLNODE
Description Node at which the last integer feasible solution was found.
Type Integer
Set by routines XPRSglobal.
MIPSOLS
MIPSTATUS
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 395
The possible return values are defined as constants in the Optimizer C header file and
VB .bas file. Refer to one of those files for the value of the return codes listed above.
Set by routines XPRSglobal, XPRSloadglobal, XPRSloadqglobal, XPRSmaxim (MAXIM), XPRSminim
(MINIM), XPRSreadprob.
MIPTHREADID
Note The first MIP thread has ID 0 and is the same as the main thread. All other threads are
new threads and are destroyed when the global search is halted.
Set by routines XPRSglobal.
See also MIPTHREADS.
NAMELENGTH
Description The length (in 8 character units) of row and column names in the matrix. To allocate a
character array to store names, you must allow 8*NAMELENGTH+1 characters per name
(the +1 allows for the string terminator character).
Type Integer
Set by routines XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp, XPRSreadprob.
NLPHESSIANELEMS
Description The number of coefficients of the maximal possible Hessian in the NLP problem.
Type Integer
Set by routines XPRSinitializenlphessian, XPRSinitializenlphessian_indexpairs.
NODEDEPTH
Type Integer
Set by routines XPRSglobal, XPRSinitglobal.
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 396
NODES
Description Number of nodes solved so far in the global search. The node numbers start at 1 for the
first (top) node in the Branch and Bound tree. Nodes are numbered consecutively.
Type Integer
Set by routines XPRSglobal, XPRSinitglobal.
NUMIIS
OBJNAME
OBJRHS
OBJSENSE
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 397
Type Double
Values -1.0 For maximization problems.
1.0 For minimization problems.
Note The objective sense of a problem can be changed using XPRSchgobjsense.
ORIGINALCOLS
Description Number of columns (i.e. variables) in the original matrix before presolving.
Type Integer
Note If you require the value for the presolved matrix then use the COLS attribute.
Set by routines XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp, XPRSreadprob.
ORIGINALROWS
Description Number of rows (i.e. constraints) in the original matrix before presolving.
Type Integer
Note If you require the value for the presolved matrix then use the ROWS attribute.
Set by routines XPRSaddrows, XPRSdelrows, XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadlp, XPRSreadprob.
PARENTNODE
Description The parent node of the current node in the tree search.
Type Integer
Set by routines XPRSglobal, XPRSinitglobal.
PENALTYVALUE
Description The weighted sum of violations in the solution to the relaxed problem identified by the
infeasibility repair function.
Type Double
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 398
PRESOLVESTATE
Type Integer
Values Bit Meaning
0 Problem has been loaded.
1 Problem has been LP presolved.
2 Problem has been MIP presolved.
7 Solution in memory is valid.
Note Other bits are reserved.
PRIMALINFEAS
Note If the matrix is in a presolved state, this attribute returns the number of primal
infeasibilities in the presolved matrix. If you require the value for the original matrix,
make sure you obtain the value when the matrix is not presolved. The PRESOLVESTATE
attribute can be used to test if the matrix is presolved or not. See also 5.3.
Set by routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
QCELEMS
Note If the matrix is in a presolved state, this attribute returns the number of quadratic row
coefficients in the presolved matrix.
Set by routines XPRSaddqmatrix, XPRSchgqrowcoeff, XPRSgetqrowqmatrixtrplets,
XPRSloadqcqp.
QCONSTRAINTS
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 399
Type Integer
Note If the matrix is in a presolved state, this attribute returns the number of rows with
quadratic coefficients in the presolved matrix.
Set by routines XPRSaddqmatrix, XPRSchgqrowcoeff, XPRSgetqrowqmatrixtrplets,
XPRSloadqcqp.
QELEMS
RANGENAME
RHSNAME
ROWS
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 400
Set by routines XPRSaddrows, XPRSdelrows, XPRSloadglobal, XPRSloadlp, XPRSloadqglobal,
XPRSloadlp, XPRSmaxim (MAXIM), XPRSminim (MINIM), XPRSreadprob.
SIMPLEXITER
SETMEMBERS
Description Number of variables within special ordered sets (set members) in the matrix.
Type Integer
Note If the matrix is in a presolved state, this attribute returns the number of variables within
special ordered sets in the presolved matrix. If you require the value for the original
matrix, make sure you obtain the value when the matrix is not presolved. The
PRESOLVESTATE attribute can be used to test if the matrix is presolved or not. See also
5.3.
Set by routines XPRSloadglobal, XPRSloadqglobal, XPRSreadprob.
SETS
Note If the matrix is in a presolved state, this attribute returns the number of special ordered
sets in the presolved matrix. If you require the value for the original matrix, make sure
you obtain the value when the matrix is not presolved. The PRESOLVESTATE attribute
can be used to test if the matrix is presolved or not. See also 5.3.
Set by routines XPRSloadglobal, XPRSloadqglobal, XPRSreadprob.
SPARECOLS
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 401
Type Integer
Set by routines XPRSloadglobal, XPRSloadlp, XPRSloadqglobal, XPRSloadqp, XPRSreadprob.
SPAREELEMS
SPAREMIPENTS
SPAREROWS
SPARESETELEMS
SPARESETS
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 402
STOPSTATUS
Value Description
XPRS_STOP_TIMELIMIT time limit hit
XPRS_STOP_CTRLC control C hit
XPRS_STOP_NODELIMIT node limit hit
XPRS_STOP_ITERLIMIT iteration limit hit
XPRS_STOP_MIPGAP MIP gap is sufficiently small
XPRS_STOP_SOLLIMIT solution limit hit
XPRS_STOP_USER user interrupt.
SUMPRIMALINF
TREEMEMORYUSAGE
Description The amount of physical memory, in megabytes, currently being used to store the
branch-and-bound search tree.
Type Integer
Note If the matrix is in a presolved state, this attribute returns the scaled sum of primal
infeasibilities in the presolved matrix. If you require the value for the original matrix,
make sure you obtain the value when the matrix is not presolved. The PRESOLVESTATE
attribute can be used to test if the matrix is presolved or not. See also 5.3.
Set by routines XPRSmaxim (MAXIM), XPRSminim (MINIM).
See also TREEMEMORYLIMIT, GLOBALFILEUSAGE.
Problem Attributes c
2009 Fair Isaac Corporation. All rights reserved. page 403
Chapter 11
Return Codes and Error Messages
When the Optimizer terminates after the STOP command, it may set an exit code that can be
tested by the operating system or by the calling program. The exit code is set as follows:
XPRSgetintattrib(prob,XPRS_ERRORCODE,&errorcode);
The following list contains values of ERRORCODE and a possible resolution of the error or
warning.
257 Simplex Optimizer only: buy barrier Optimizer from your vendor.
The Optimizer can only use the simplex algorithm. Please contact your local sales office to
upgrade your authorization if you wish to use this command.
366 Problems with Quadratic terms can only be solved with the barrier.
An attempt has been made to solve a quadratic problem using an algorithm other than the
barrier. Please use XPRSmaxim (MAXIM), XPRSminim (MINIM) with the b flag to invoke the
barrier solver.
368 QSECTION second element in line ignored: <line>.
The second element in line <line> will be ignored.
381 Bug in lifting of cover inequalities.
Internal error. Please contact you local support office.
386 This version is not authorized to run Goal Programming.
The Optimizer you are using is not authorized to run Goal Programming. Please contact
you local sales office to upgrade your authorization if you wish to use this command.
390 Slave number <num> has failed - insufficient memory.
Process on slave <num> has been aborted because there is not enough memory. Please
increase your virtual page space or physical memory and try again. The tasks of the failing
slaves will be reallocated to the remaining slaves.
392 This version is not authorized to be called from BCL.
This version of the Optimizer cannot be called from the subroutine library BCL. Please
contact your local sales office to upgrade your authorization if you wish to run the
Optimizer from BCL.
394 Fatal communications error.
There has been a communication error between the master and the slave processes. Please
check the network and try again.
395 This version is not authorized to be called from the Optimizer library.
This version of the Optimizer cannot be called from the Optimizer library. Please contact
your local sales office to upgrade your authorization if you wish to run the Optimizer using
the libraries.
401 Invalid row type passed to <function>.
Elements <num> of your array has invalid row type <type>. There has been an error in one
of the arguments of function <function>. The row type corresponding to element <num>
of the array is invalid. Please refer to the section corresponding to function <function> in 8
for further information about the row types that can be used.
474 Column passed to <routine> has inconsistent bounds. See column <index> of <count>.
The bounds are inconsistent for column <index> of the <count> columns passed into
routine <routine>.
475 Inconsistent bounds [<lb>,<ub>] for column <column name> in call to <routine>.
The lower bound <lb> is greater than the upper bound <ub> in the bound pair given for
column <column name> passed into routine <routine>.
476 Unable to round bounds [<lb>,<ub>] for integral column <column name> in call to
<routine>.
Either the lower bound <lb> is greater than the upper bound <ub> in the bound pair given
for the integer column <column name> passed into routine <routine> or the interval
defined by <lb> and <ub> does not contain an integer value.
501 Error at <line> Empty file.
Read aborted. The Optimizer cannot read the problem because the file is empty.
555 Can not presolve cut with PRESOLVEOPS bits 0, 5 or 8 set or bit 11 cleared.
Can not presolve cut with PRESOLVEOPS bits 0, 5 or 8 set or bit 11 cleared.
No cuts can be presolved if the following presolve options are turned on:
bit 0: singleton column removal,
bit 5: duplicate column removal,
bit 8: variable eliminations
or if the option
bit 11: No advanced IP reductions is turned off. Please check the presolve settings.
557 Integer solution is not available
Failed to retrieve an integer solution because no integer solution has been identified yet.
714 Delayed rows not supported by the parallel solver. Disabling parallel.
Delayed rows is not supported by the parallel solver. The parallel feature has been
disabled.
715 Invalid objective sense passed to <function>. Must be XPRS_OBJ_MINIMIZE or
XPRS_OBJ_MAXIMIZE.
Invalid objective sense was passed to function <function>. Please use either
XPRS_OBJ_MINIMIZE or XPRS_OBJ_MAXIMIZE.
716 Invalid names type passed to XPRSgetnamelist.
Type code <num> is unrecognized.
An invalid name type was passed to XPRSgetnamelist.
725 Problems with variables for which shift infeasibilities cannot be removed are considered
infeasible in the IIS
The irreducible infeasible set (IIS) subproblem being solved by the IIS procedure is on the
boundary of being feasible or infeasible. For problems that are only very slightly infeasible,
726 This function is not valid for the IIS approximation. Please specify an IIS with count
number > 0
Irreducible infeasible set (IIS) number 0 (the ordinal number of the IIS) refers to the IIS
approximation, but the functionality called is not available for the IIS approximation.
Please use an IIS number between 1 and NUMIIS.
758 No SETS and SOS sections are allowed in the same file
The optimizer expects special order sets to be defined in the SETS section. However, for
compatibility considerations, the optimizer can also interpret the SOS section. The two
formats differ only in syntax, and feature the same expressive power. Both a SETS and a
SOS section are not expected to be present in the same matrix file.
764 <sec> section is not yet supported in an MPS file, skipping section
The section <sec> is not allowed in an MPS file. Sections like "SOLUTION" and "BASIS"
must appear in separate ".slx" and ".bas" files.
765 Ignoring repeated specification for column : <col>
Column <col> is defined more than once in the MPS file. Any repeated definitions are
ignored. Please make sure to use unique column names. If the column names are unique,
then please make sure that the COLUMNS section is organized in a contiguous order.
766 Ignoring repeated coefficients for row <row> found in RANGE <range>
The range value for row <row> in range vector <range> in the RANGE section is defined
more than once. Any repeated definitions are ignored. Please make sure that the row
names in the RANGE section are correct.
767 Ignoring repeated coefficients for row <row> found in RHS <rhs>
The value for row <row> in right hand side vector <rhs> is defined more than once in the
RHS section. Any repeated definitions are ignored. Please make sure that the row names in
the RHS section are correct.
796 Char <c> is not supported in a name by file format. It may not be possible to read such
files back correctly. Please set FORCEOUTPUT to 1 to write the file anyway, or use
scrambled names.
Certain names in the problem object may be incompatible with different file formats (like
names containing spaces for LP files). If the optimizer might be unable to read back a
problem because of non-standard names, it will give an error message and won’t create
the file. However, you may force output using control FORCEOUTPUT or change the names
by using scrambled names (-s option for XPRSwriteprob).
843 Delayed row (lazy constraint) <row> is not allowed to be of type ’N’. Row ignored
Delayed rows cannot be neutral. Please define all neutral rows as ordinary ones in the
ROWS section.
844 Section synonims DELAYEDROWS and LAZYCONS are not allowed in the same file
Section names DELAYEDROWS and LAZYCONS are synonims, and as such only one of them is
allowed in any MPS file.
845 No rows specified before delayed rows (lazy constrains)
The order in which the ROWS and DELAYEDROWS (LAZYCONS) appear is fixed in any MPS file.
846 Definition of delayed rows (lazy constrains) should preceed the COLUMNS section
The DELAYEDROWS (LACYCONS) sections specify special types of rows. As such, it must be
defined after ROWS, but before the COLUMNS sections in any MPS file.
847 Model cut (user cut) <row> is not allowed to be of type ’N’. Row ignored
Model cuts cannot be neutral. Please define all neutral rows as ordinary ones in the ROWS
section.
848 Section synonims MODELCUTS and USERCUTS are not allowed in the same file
Section names MODELCUTS and USERCUTS are synonims, and as such only one of them is
allowed in any MPS file.
849 No rows specified before model cuts (user cuts)
The order in which the ROWS and MODELCUTS (USERCUTS) appear is fixed in any MPS file.
850 Definition of model cuts (user cuts) should preceed the COLUMNS section
The MODELCUTS (USERCUTS) sections specify special types of rows. As such, it must be
defined after ROWS, but before the COLUMNS sections in any MPS file.
862 Quadratic constraint rows must be of type ’L’ or ’G’. Wrong row type for row <row>
All quadratic rows must be of type ’L’ or ’G’ in the ROWS section of the MPS file (and the
corresponding quadratic matrix be positive semi-definite).
863 The current version of XPRESS does not yet support MIQCQP problems
The current version of XPRESS does not yet support mixed integer quadratically constraint
problems.
899 The quadratic objective is not convex. Set IFCHECKCONVEXITY=0 to disable check
The quadratic objective is not convex. Please check that the proper sense of optimization
(minimization or maximization) is used.
c
2009 Fair Isaac Corporation. All rights reserved. page 432
A.2 XMPS Matrix Files
The FICO Xpress Optimizer accepts matrix files in LP or MPS format, and an extension of this,
XMPS format. In that the latter represents a slight modification of the industry-standard, we
provide details of it here.
XMPS format defines the following fields:
Field 1 2 3 4 5 6
Columns 2-3 5-12 15-22 25-36 40-47 50-61
Field 1 Field 2
type row_name
followed by columns in the matrix in column order, i.e. all entries for one column must finish
before those for another column start, where:
specifies an entry of value1 in column col and row row1 (and value2 in col and row row2). The
Field 5/Field 6 pair is optional.
or
followed by a description of the quadratic terms. For each quadratic term, we have:
where col1 is the first variable in the quadratic term, col2 is the second variable and value is the
associated coefficient from the Q matrix. In the QMATRIX section all nonzero Q elements must be
specified. In the QUADOBJ section only the nonzero elements in the upper (or lower) triangular
part of Q should be specified. In the QMATRIX section the user must ensure that the Q matrix is
symmetric, whereas in the QUADOBJ section the symmetry of Q is assumed and the missing part is
generated automatically.
Note that the Q matrix has an implicit factors of 0.5 when included in the objective function.
This means, for instance that an objective function of the form
5x 2 + 7xy + 9y 2
(The additional term ’y x 7’ is assumed which is why the coefficient is not doubled); and in a
QMATRIX section as:
QMATRIX
x x 10
x y 7
y x 7
y y 18
The QUADOBJ and QMATRIX sections must appear somewhere after the COLUMNS section and must
only contain columns previously defined in the columns section. Columns with no elements in the
problem matrix must be defined in the COLUMNS section by specifying a (possibly zero) cost
coefficient.
Each constraint having quadratic terms should have it’s own QCMATRIX section. The QCMATRIX
section exactly follows the description of the QMATRIX section, i.e. for each quadratic term, we
have:
where col1 is the first variable in the quadratic term, col2 is the second variable and value is the
associated coefficient from the Q matrix. All nonzero Q elements must be specified. The user
must ensure that the Q matrix is symmetric. For instance a constraint of the form
is represented as:
NAME example
ROWS
L qc1
COLUMNS
x qc1 1
y qc1 0
QCMATRIX qc1
x x 5
x y 3.5
y x 3.5
y y 9
RHS
RHS1 qc1 2
END
Field 1 Field 2
type row_name
NOTE: For compatibility reasons, section names DELAYEDROWS and LAZYCONS are treated as
synonyms.
Field 1 Field 2
type row_name
Subsequent records give the associations between rows and the controlling binary columns, with
the following form:
which specifies that the row row_name must be satisfied only when column col_name has value
value. Here type must always be IF and value can be either 0 or 1. Also referenced rows must be
of type L or G only, and referenced columns must be binary.
This record introduces the section which specifies any Special Ordered Sets. If present it must
appear after the COLUMNS section and before the RHS section. It is followed by a record which
specifies the type and name of each set, as defined below.
Field 1 Field 2
type set
Where type is S1 for a Special Ordered Set of type 1 or S2 for a Special Ordered Set of type 2 and
set is the name of the set.
Subsequent records give the set members for the set and are of the form:
which specifies a set member col1 with reference value value1 (and col2 with reference value
value2). The Field 5/Field 6 pair is optional.
specifies that the right hand side column is called rhs and has a value of value1 in row row1 (and
a value of value2 in row row2). The Field 5/Field 6 pair is optional.
specifies that the right hand side range column is called rng and has a value of value1 in row
row1 (and a value of value2 in row row2). The Field 5/Field 6 pair is optional.
For any row, if b is the value given in the RHS section and r the value given in the RANGES section,
then the activity limits below are applied:
The value specified is an upper bound on the largest value the variable can take for types UP, FR,
UI, SC and SI; a lower bound for types LO and LI; a fixed value for type FX; and ignored for
types BV, MI and PL. For type PI it is the switching value: below which the variable must be
integer, and above which the variable is continuous. If a non-integer value is given with a UI or
LI type, only the integer part of the value is used.
Integer variables may only take integer values between 0 and the upper bound. Integer
variables with an upper bound of unity are treated as binary variables.
Binary variables may only take the values 0 and 1. Sometimes called 0/1 variables.
Partial integer variables must be integral when they lie below the stated value, above that
value they are treated as continuous variables.
Semi-continuous variables may take the value zero or any value between a lower bound
and some finite upper bound. By default, this lower bound is 1.0. Other positive values
can be specified as an explicit lower bound. For example
BOUNDS
LO x 0.8
SC x 12.3
means that x can take the value zero or any value between 0.8 and 12.3.
Semi-continuous integer variables may take the value zero or any integer value between a
lower bound and some finite upper bound.
Minimize
obj: - 2 x3
Subject To
c1: x2 - x1 <= 10
c2: x1 + x2 + x3 <= 20
Bounds
x1 <= 30
End
\Problem name:
Minimize
- 2 x3
Subject To
c1: x2 - x1 <= 10
c2: x3 + x2 + x1 <= 20
Bounds
x1 <= 30
End
Note that the last constraint in the output .lp file has the variables in reverse order to those in
the input .lp file. The ordering of variables in the last constraint of the rewritten file is the order
that the variables were encountered during file reading. Also note that although the optimal
solution is unique for this particular problem in other problems with many equal optimal
solutions the path taken by the solver may depend on the variable ordering and therefore by
changing the ordering of your constraints in the .lp file may lead to different solution values for
the variables.
A.3.4 Sections
The LP file is broken up into sections separated by section keywords. The following are a list of
section keywords you can use in your LP files. A section started by a keyword is terminated with
another section keyword indicating the start of the subsequent section.
Variables that do not appear in any of the variable type registration sections (i.e., integers,
generals, binaries, semi-continuous, semi integer, partial integer) are defined to
be continuous variables by default. That is, there is no section defining variables to be continuous
variables.
With the exception of the objective function section (maximize or minimize) and the constraints
section (subject to), which must appear as the first and second sections respectively, the
sections may appear in any order in the file. The only mandatory section is the objective function
section. Note that you can define the objective function to be a constant in which case the
problem is a so-called constraint satisfaction problem. The following two examples of LP file
contents express empty problems with constant objective functions and no variables or
constraints.
Empty problem 1:
Minimize
Empty problem 2:
Minimize
End
The end of a matrix description in an LP file can be indicated with the keyword end entered on a
line by itself. This can be useful for allowing the remainder of the file for storage of comments,
unused matrix definition information or other data that may be of interest to be kept together
with the LP file.
!"#$%&/,.;?@_‘’{}()|~’
A variable name can not begin with a number or a period. Care should be taken using the
characters E or e since these may be interpreted as exponential notation for numbers.
Maximize
- 1 x1 + 2 x2 + 3x + 4y
or
Minimize
- 1 x1 + 2 x2 + 3x + 4y
Generally objective functions are defined using many terms and since the maximum length of any
line of file input is 512 characters the objective function definitions are typically always broken
A.3.8 Constraints
The section of the LP file defining the constraints is preceded by the keyword subject to. Each
constraint definition must begin on a new line. A constraint may be named with an identifier
followed by a colon before the constraint expression. Constraint names must follow the same
rules as variable names. If no constraint name is specified for a constraint then a default name is
assigned of the form C0000001, C0000002, C0000003, etc. Constraint names are trimmed of
white space before being stored.
The constraints are defined as a linear expression in the variables followed by an indicator of the
constraint’s sense and a numerical right-hand side coefficient. The constraint sense is indicated
intuitively using one of the tokens: >=, <=, or =. For example, here is a named constraint:
Note that tokens > and < can be used, respectively, in place of the tokens >= and <=.
Generally, constraints are defined using many terms and since the maximum length of any line of
file input is 512 characters the constraint definitions are typically always broken with line
continuations. No line continuation character is required and lines may be broken for
continuation wherever you may use white space.
Minimize
obj: x1 + x2
subject to
x1 <= 10
x1 + x2 >= 1
delayed rows
x1 >= 2
end
For compatibility reasons, the term "lazy constraints" is used as a synonym to "delayed rows".
For compatibility reasons, the term "user cuts" is used as a synonym to "model cuts".
which means that the constraint linear_inequality should be enforced only when the
variable col_name has value value.
As for general constraints, the constraint_name: part is optional; col_name is the name of the
controlling binary variable (it must be declared as binary in the binaries section); and value
may be either 0 or 1. Finally the linear_inequality is defined in the same way as for general
constraints.
For example:
Minimize
obj: x1 + x2
subject to
x1 + 2 x2 >= 2
x1 = 0 -> x2 >= 2
binary
x1
end
A.3.12 Bounds
The list of bounds in the bounds section are preceded by the keyword bounds. Each bound
definition must begin on a new line. Single or double bounds can be defined for variables.
Double bounds can be defined on the same line as 10 <= x <= 15 or on separate lines in the
following ways:
10 <= x
15 >= x
or
x >= 10
x <= 15
If no bounds are defined for a variable the FICO Xpress Optimizer uses default lower and upper
bounds. An important point to note is that the default bounds are different for different types of
variables. For continuous variables the interval defined by the default bounds is [0,
XPRS_PLUSINFINITY] while for variables declared in the integers and generals section (see
later) the relaxation interval defined by the default bounds is [0, 1] and [0, XPRS_MAXINT],
respectively. Note that the constants XPRS_PLUSINFINITY and XPRS_MAXINT are defined in the
FICO Xpress Optimizer header files in your FICO Xpress Optimizer libraries package.
Note that the keywords infinity and inf may not be used as a right-hand side coefficient of a
constraint.
A variable with a negative infinity lower bound and positive infinity upper bound may be entered
as free (case insensitive). For example, x9 free in an LP file bounds section is equivalent to:
or
- infinity <= x9
In the last example here, which uses a single bound is used for x9 (which is positive infinity for
continuous example variable x9).
Semi-continuous
The following example shows the format of entries in the semi integer section.
Semi integer
x7 >= 3
x8
x9 >= 5
Note that you can not use the <= token in place of the >= token.
The threshold of the interval within which a variable may have real (or integer) values is defined
in two ways depending on whether the entry for the variable is (i) a variable name or (ii) a
variable name-number pair. If the entry is just a variable name, then the variable’s threshold is
the variable’s lower bound, defined in the bounds section (see earlier). If the entry for a variable
is a variable name-number pair, then the variable’s threshold is the number value in the pair.
It is important to note that if (a) the threshold of a variable is defined by a variable name-number
pair and (b) a lower bound on the variable is defined in the bounds section, then:
Case 1) If the lower bound is less then zero, then the lower bound is zero.
Case 2) If the lower bound is greater than zero but less than the threshold, then the value of zero
is essentially cut off the domain of the semi-continuous (or semi-integer) variable and the
variable becomes a simple bounded continuous (or integer) variable.
Case 3) If the lower bound is greater than the threshold, then the variable becomes a simple
lower bounded continuous (or integer) variable.
If no upper bound is defined in the bounds section for a semi-continuous (or semi-integer)
variable, then the default upper bound that is used is the same as for continuous variables, for
semi-continuous variables, and generals section variables, for semi-integer variables.
It is important to note that you will only be able to use this section if your FICO Xpress Optimizer
is licensed for Mix Integer Programming.
Partial integers
x11 >= 8
x12 >= 9
Note that you can not use the <= token in place of the >= token.
It is important to note that you will only be able to use special ordered sets if your FICO Xpress
Optimizer is licensed for Mix Integer Programming.
Minimize
obj: x1 + x2 + [ x12 + 4 x1 * x2 + 3 x22 ] /2
Note that if in a solution the variables x1 and x2 both have value 1 then value of the objective
function is 1 + 1 + (1*1 + 4*1*1 + 3*1*1) / 2 = 2 + (8) / 2 = 6.
It is important to note that you will only be able to use quadratic objective function components
if your FICO Xpress Optimizer is licensed for Quadratic Programming.
Minimize
obj: x1 + x2
s.t.
x1 + [ x1^2 + 4 x1 * x2 + 3 x2^2 ] <= 10
x1 >= 1
end
Please be aware of the differences of the default behaviour of the square brackets in the
objective compared to the constraints. For example problem:
min y + [ x^2 ]
st.
x >= 1
y >= 1
end
min t
s.t.
-t + y + [ x^2 ] <= 0
x >= 1
y >= 1
end
has an optimum of 2. The user is suggested to use the explicit /2 in the objective function like:
min y + [ x^2 ] / 2
st.
x >= 1
y >= 1
end
to make sure that the model represents what the modeller meant.
• Fields of type real contain a decimal character representation of a real number, right
justified, with six digits to the right of the decimal point.
• The status of the problem (field 5) is a single character as follows:
O optimal;
N infeasible;
U unbounded;
Z unfinished.
Problem Statistics
Matrix simple
Objective *OBJ*
RHS *RHS*
Problem has 3 rows and 2 structural columns
Solution Statistics
Maximization performed
Optimal solution found after 3 iterations
Objective function value is 171.428571
Next, the Rows Section presents the solution for the rows, or constraints, of the problem.
The first column shows the constraint type: L means a ’less than or equal to’ constrain; E indicates
an ’equality’ constraint; G refers to a ’greater than or equal to’ constraint; N means a ’nonbinding’
constraint – this is the objective function.
The sequence numbers are in the next column, followed by the name of the constraint. The At
column displays the status of the constraint. A UL indicator shows that the row is at its upper
limit. In this case a ≤ row is hard up against the right hand side that is constraining it. BS means
that the constraint is not active and could be removed from the problem without changing the
optimal value. If there were ≥ constraints then we might see LL indicators, meaning that the
constraint was at its lower limit. Other possible values include:
The RHS column is the right hand side of the original constraint and the Slack Value is the
amount by which the constraint is away from its right hand side. If we are tight up against a
constraint (the status is UL or LL) then the slack will be 0.
The Dual Value is a measure of how tightly a constraint is acting. If a row is hard up against a ≤
constraint then it might be expected that a greater profit would result if the constraint were
relaxed a little. The dual value gives a precise numerical measure to this intuitive feeling. In
general terms, if the right hand side of a ≤ row is increased by 1 then the profit will increase by
the dual value of the row. More specifically, if the right hand side increases by a sufficiently small
δ then the profit will increase by δ x dual value, since the dual value is a marginal concept. Dual
values are sometimes known as shadow prices.
Finally, the Columns Section gives the solution for the columns, or variables.
Columns Section
Number Column At Value Input Cost Reduced Cost
C 4 a BS 114.285714 1.000000 .000000
C 5 b BS 28.571429 2.000000 .000000
The first column contains a C meaning column (compare with the rows section above). The
number is a sequence number. The name of the decision variable is given under the Column
heading. Under At is the status of the column: BS means it is away from its lower or upper
bound, LL means that it is at its lower bound and UL means that the column is limited by its
upper bound. Other possible values include:
The Value column gives the optimal value of the variable. For instance, the best value for the
variable a is 114.285714 and for variable b it is 28.571429. The Input Cost column tells you
the coefficient of the variable in the objective function.
The final column in the solution print gives the Reduced Cost of the variable, which is always
zero for variables that are away from their bounds – in this case, away from zero. For variables
Solution Statistics
Minimization performed
Optimal solution found after 6 iterations
Objective function value is 15.000000
The next section presents data for the rows, or constraints, of the problem. For each constraint,
data are displayed in two lines. In this example the data for just one row is shown:
Rows Section
Vector Activity Lower actvty Unit cost DN Upper cost Limiting AT
Number Slack Upper actvty Unit cost UP Process
G C1 10.000000 9.000000 -1.000000 x4 LL
LL 2 .000000 12.000000 1.000000 C6 UL
In the first of the two lines, the row type (N, G, L or E) appears before the row name. The value of
the activity follows. Then comes Lower actvty, the level to which the activity may be decreased
at a cost per unit of decrease given by the Unit cost DN column. At this level the unit cost
changes. The Limiting Process is the name of the row or column that would change its status
if the activity of this row were decreased beyond its lower activity. The AT column displays the
status of the limiting process when the limit is reached. It is either LL, meaning that it leaves or
enters the basis at its lower limit, or UL, meaning that it leaves or enters the basis at its upper
limit. In calculating Lower actvty, the lower bound on the row as specified in the RHS section
of the matrix is ignored.
The second line starts with the current status of the row and the sequence number. The value of
the slack on the row is then shown. The next four pieces of data are exactly analogous to the data
above them. Again, in calculating Upper actvty, the upper bound on that activity is ignored.
The columns, or variables, are similarly displayed in two lines. Here we show just two columns:
Columns Section
Vector Activity Lower actvty Unit costDN Upper cost Limiting AT
Number Input cost Upper actvty Unit costUP Lower cost Process
C x4 1.000000 -2.000000 5.000000 6.000000 C5 LL
BS 8 1.000000 3.000000 1.000000 .000000 C1 LL
The vector type is always C, denoting a column. The Activity is the optimal value. The
Lower/Upper actvty is the activity level that would result from a cost coefficient
increase/decrease from the Input cost to the Upper/Lower cost (assuming a minimization
problem). The lower/upper bound on the column is ignored in this calculation. The Unit cost
DN/UP is the change in the objective function per unit of change in the activity down/up to the
Lower/Upper activity. The interpretation of the Limiting Processes and AT statuses is as for
rows. The second line contains the column’s status and sequence number.
Note that for non-basic columns, the Unit costs are always the (absolute) values of the reduced
costs.
PR implying a priority entry (the value gives the priority, which must be an integer between
0 and 1000. Values greater than 1000 are rejected, and real values are rounded down
to the next integer. A low value means that the entity is more likely to be selected for
branching.)
UP the entity is to be forced up (value is not used)
DN the entity is to be forced down (value is not used)
PU an up pseudo cost entry (the value gives the cost)
PD a down pseudo cost entry (the value gives the cost)
MC a model cut entry (value is not used)
DR a delayed row entry (value is not used
BR force the optimizer to branch on the entity even if it is satisfied. If a node solution is
global feasible, the optimizer will first branch on any branchable entity flagged with BR
before returning the solution.
entity is the name of a global entity (vector or special ordered set), or a mask. A mask may
comprise ordinary characters which match the given character: a ? which matches any single
character, or a *, which matches any string or characters. A * can only appear at the end of a
mask.
value is the value to accompany the type.
For example:
PR x1* 2
gives global entities (integer variables etc.) whose names start with x1 a priority of 2. Note that
the use of a mask: a * matches all possible strings after the initial x1.
Note that each IIS may contain a row or column with only on one of its possible senses. This also
means that equality rows and columns with both lower and upper bounds, only one side of the
restriction may be present. Range constraints in an IIS are converted to greater than or equal
constraints.
An IIS often contains other columns than those listed in the IIS. Such columns are free, and have
no associated conflicting bounds.
The information contained in these files is the same as returned by the XPRSgetiisdata
function, or displayed by (IIS -p).
RRRRRRRR
CCRider
2.087
changes the coefficient of CCRider in row RRRRRRRR to 2.087. The action may be one of the
following possibilities.
Note that N type rows will not be present in the matrix in memory if the control KEEPNROWS has
been set to zero before XPRSreadprob (READPROB).
A more detailed log can be displayed every n iterations by setting LPLOG to -n. The detailed log
has the form:
During the barrier optimization, a summary log is displayed in every iteration. This summary log
has the form:
After the barrier algorithm a crossover procedure may be applied. This process prints at most 3
log lines about the different phases of the crossover procedure. The structure of these lines
follows The Simplex Log described in the section above.
If BAROUTPUT is set to 0, no log is displayed until the barrier algorithm finishes.
This log is also printed when an integer feasible solution is found. Stars (*) printed on both sides
of the log indicate a solution has been found. Pluses (+) printed on both sides of the log indicate
a heuristic solution has been found.
Not all the information described above is present for all nodes. If the LP relaxation is cut off,
only the Branch and Parent (and possibly Solution) are displayed. If the LP relaxation is infeasible,
only the Branch and Parent appear. If an integer solution is discovered, this is highlighted before
the log line is printed.
If MIPLOG is set to 2, the detailed log is printed at integer feasible solutions only. When MIPLOG is
set to 0 or 1, no log is displayed and status messages only are displayed at the end of the search.
The LP iteration log is suppressed, but messages from the LP Optimizer may be seen if major
numerical difficulties are encountered.
c
2009 Fair Isaac Corporation. All rights reserved. page 460
307, 413 504, 418
308, 413 505, 418
309, 413 506, 418
310, 413 507, 418
314, 413 508, 418
316, 413 509, 418
318, 413 510, 418
319, 413 511, 418
320, 413 512, 418
324, 413 513, 418
326, 413 514, 418
352, 413 515, 418
361, 414 516, 418
362, 414 517, 419
363, 414 518, 419
364, 414 519, 419
366, 414 520, 419
368, 414 521, 419
381, 414 522, 419
386, 414 523, 419
390, 414 524, 419
392, 414 525, 419
394, 414 526, 419
395, 414 527, 419
401, 414 528, 419
402, 415 529, 419
403, 415 530, 419
404, 415 531, 420
405, 415 532, 420
406, 415 533, 420
407, 415 539, 420
409, 415 552, 420
410, 415 553, 420
411, 415 554, 420
412, 415 555, 420
413, 416 557, 420
414, 416 558, 420
415, 416 559, 420
416, 416 606, 420
417, 416 706, 420
418, 416 707, 421
419, 416 708, 421
422, 416 710, 421
423, 416 711, 421
424, 416 713, 421
425, 416 714, 421
426, 417 715, 421
427, 417 716, 421
429, 417 721, 421
430, 417 722, 421
433, 417 723, 421
434, 417 724, 421
436, 417 725, 421
473, 417 726, 422
474, 417 727, 422
475, 417 728, 422
476, 417 729, 422
501, 417 730, 422
502, 417 731, 422
503, 418 732, 422
Index c
2009 Fair Isaac Corporation. All rights reserved. page 461
733, 422 795, 427
734, 422 796, 427
735, 422 797, 428
736, 422 798, 428
738, 423 799, 428
739, 423 843, 428
740, 423 844, 428
741, 423 845, 428
742, 423 846, 428
743, 423 847, 428
744, 423 848, 428
745, 423 849, 428
746, 423 850, 428
748, 423 861, 428
749, 423 862, 428
750, 424 863, 428
751, 424 864, 429
752, 424 865, 429
753, 424 866, 429
754, 424 867, 429
755, 424 889, 429
756, 424 893, 429
757, 424 894, 429
758, 424 895, 429
759, 424 896, 429
760, 424 897, 429
761, 424 898, 429
762, 425 899, 429
763, 425 900, 430
764, 425 901, 430
765, 425 902, 430
766, 425 903, 430
767, 425 1001, 430
768, 425 1002, 430
769, 425 1003, 430
770, 425 1004, 430
771, 425 1005, 430
772, 425 1034, 430
773, 425 1035, 430
774, 426 1036, 430
775, 426 1037, 430
776, 426 1038, 430
777, 426 1039, 430
778, 426
779, 426 A
780, 426 ACTIVENODES, 387
781, 426 Advanced Mode, 45
782, 426 algorithms, 1
783, 426 default, 17
784, 426 ALTER, 84, 411, 456
785, 426 Archimedean model, see goal programming
786, 427 array numbering, 342
787, 427 AUTOPERTURB, 331, 372
788, 427
789, 427 B
790, 427 BACKTRACK, 332
791, 427 BACKTRACKTIE, 332
792, 427 BARAASIZE, 387
793, 427 BARCGAP, 388
794, 427 BARCRASH, 333
Index c
2009 Fair Isaac Corporation. All rights reserved. page 462
BARCROSSOVER, 388 CHOLESKYALG, 340
BARDENSECOL, 388 CHOLESKYTOL, 340
BARDUALINF, 388 COLS, 390
BARDUALOBJ, 388 columns
BARDUALSTOP, 333 density, 344, 388
BARGAPSTOP, 334, 336 nonzeros, 146
BARINDEFLIMIT, 334 returning bounds, 168, 199
BARITER, 389 returning indices, 161
BARITERLIMIT, 9, 334 returning names, 177
BARLSIZE, 389 types, 147
BARORDER, 335 comments, 368
BAROUTPUT, 19, 30, 335 Console Mode, 1, 45
BARPRESOLVEOPS, 335 Console Xpress, 1
BARPRIMALINF, 389 command line options, 2
BARPRIMALOBJ, 389 termination, 316
BARPRIMALSTOP, 336 controls, 47
BARSTART, 336 changing values, 331
BARSTEPSTOP, 336 copying between problems, 101
BARTHREADS, 337 retrieve values, 198
basis, 320, 357 retrieving values, 155, 166
inversion, 357 setting values, 307, 311, 315
loading, 221, 239 convex region, 15
reading from file, 261 CORESDETECTED, 390
BASISCONDITION, 85 COVERCUTS, 340, 383
batch mode, 316 CPUTIME, 340
BCL, 1 CRASH, 341
BESTBOUND, 389 CROSSOVER, 19, 341
BIGM, 337, 371 crossover, 341, 388
BIGMMETHOD, 337 CSTYLE, 342
bitmaps, 166, 311 CSV, 432
BOUNDNAME, 390 CURRENTNODE, 391
bounds, 88, 168, 305, 456 CURRMIPCUTOFF, 391
Branch and Bound, 19 cut manager, 31
BRANCHCHOICE, 338 routines, 32, 126, 287
BRANCHDISJ, 338 cut pool, 31, 77, 105, 149, 287, 305, 412
branching, 289 cuts, 223, 318
directions, 156, 264, 455 lifted cover inequalities, 340
variable, 282 list of indices, 148
BRANCHSTRUCTURAL, 338 cut strategy, 343
BRANCHVALUE, 390 CUTDEPTH, 342
BRANCHVAR, 390 CUTFACTOR, 342
BREADTHFIRST, 339 CUTFREQ, 343
cutoff, 20, 22, 139, 301, 364, 366
C CUTS, 391
CACHESIZE, 18, 339 cuts, 31, 77, 305, 410, 412
callbacks, 29 deleting, 106
barrier log, 121, 281 generation, 342
branching variable, 122, 282 Gomory cuts, 384
copying between problems, 100 list of active cuts, 150
estimate function, 128, 289 model cuts, 232
global log, 129, 290 CUTSELECT, 343
node cutoff, 139, 301 CUTSTRATEGY, 343
node selection, 124, 285 cutting planes, see cuts
optimal node, 140, 302
preprocess node, 142, 304 D
separate, 143, 305 default algorithm, 344
simplex log, 132, 293 DEFAULTALG, 17, 250, 344
CHECKCONVEXITY, 87 degradation, 21, 289, 344, 376
CHGOBJSENSE, 94 DEGRADEFACTOR, 344
Cholesky factorization, 335, 340, 344, 389 DENSECOLLIMIT, 344
Index c
2009 Fair Isaac Corporation. All rights reserved. page 463
DETERMINISTIC, 345 .xpr, 2
directives, 156, 240, 411, 412 CSV, 432
loading, 225 FIXGLOBAL, 260
read from file, 263 FIXGLOBALS, 115
dongles, 2 FORCEOUTPUT, 350
dual values, 10
DUALGRADIENT, 345 G
DUALINFEAS, 391 GETMESSAGESTATUS, 171
DUALIZE, 345 GLOBAL, 9, 202
DUALSTRATEGY, 346 global entities, 394, 402
DUMPCONTROLS, 113 branching, 277, 278
extra entities, 347
E fixing, 115
early termination, 9 loading, 226
EIGENVALUETOL, 346 global log, 290
ELEMS, 392 global search, 19, 31, 108, 397, 417
ELIMTOL, 346 callbacks, 30
ERRORCODE, 392, 405 directives, 263
errors, 295, 312, 392 MIP solution status, 395
checking, 216 termination, 364, 366
ETATOL, 346 GLOBALFILEBIAS, 351
EXIT, 114 GLOBALFILESIZE, 392
EXTRACOLS, 347, 413, 416 GLOBALFILEUSAGE, 393
EXTRAELEMS, 84, 347, 412, 416 GOAL, 41, 204
EXTRAMIPENTS, 347 goal programming, 41, 204, 413
EXTRAPRESOLVE, 348, 413 using constraints, 41
EXTRAQCELEMENTS, 348 using objective functions, 42
EXTRAQCROWS, 348 GOMCUTS, 351, 384
EXTRAROWS, 349, 410, 416
EXTRASETELEMS, 349 H
EXTRASETS, 349 HELP, 206
Hessian matrix, 95, 186
F HEURDEPTH, 351
fathoming, 19 HEURDIVERANDOMIZE, 352
FEASIBILITYPUMP, 350 HEURDIVESPEEDUP, 352
feasible region, 18 HEURDIVESTRATEGY, 352
FEASTOL, 350 HEURFREQ, 353
files HEURMAXSOL, 353
. bss, 409 HEURNODES, 353
.alt, 84, 432 HEURSEARCHEFFORT, 353
.asc, 432 HEURSEARCHFREQ, 354
.bss, 26, 432 HEURSEARCHROOTSELECT, 354
.dir, 21, 432 HEURSEARCHTREESELECT, 355
.glb, 203, 273, 406, 432 HEURSTRATEGY, 355
.gol, 432 HEURTHREADS, 355
.grp, 432 HISTORYCOSTS, 356
.hdr, 432
.iis, 432 I
.ini, 3 IFCHECKCONVEXITY, 356
.lp, 1, 265, 432 IIS, 207
.[Link], 26 indicator constraints, 14
.mat, 265, 432 INDICATORS, 393
.[Link], 26 INDLINBIGM, 357
.[Link], 26 infeasibility, 17, 34, 200, 374, 417
.prt, 325, 432 diagnosis, 382
.rng, 145, 193, 260, 432 integer, 37, 394
.rrt, 260, 324, 432 node, 291
.rsc, 432 infeasibility repair, 36
.sol, 273, 409, 432 infinity, 76
.svf, 273, 275, 432 initialization, 216, 412
Index c
2009 Fair Isaac Corporation. All rights reserved. page 464
integer preprocessing, 365 reading, 26
integer presolve, 417 rows, 27
integer programming, 13, 19, 28 scaling, 276
integer solutions, see global search, 363, 395 size, 28
begin search, 202 spare columns, 401
branching variable, 282 spare elements, 402, 416
callback, 131, 292 spare global entities, 402
cutoff, 301 MATRIXNAME, 394
node selection, 285 MATRIXTOL, 361
reinitialize search, 217 MAXCUTTIME, 362
retrieving information, 157 MAXGLOBALFILESIZE, 362
interfaces, 1 MAXIIS, 362
interior point, see Newton barrier MAXIM, 9, 249
INVERTFREQ, 357 MAXMIPSOL, 363
INVERTMIN, 357 MAXNODE, 363
irreducible infeasible sets, 35, 362, 397 MAXPAGELINES, 363
IVE, 1 MAXSCALEFACTOR, 363
MAXTIME, 9, 364
K memory, 112, 116, 374, 406, 411
Karush-Kuhn-Tucker conditions, 11 MINIM, 9, 249
KEEPBASIS, 357 MIPABSCUTOFF, 364
KEEPMIPSOL, 330, 358 MIPABSSTOP, 364
KEEPNROWS, 358, 457 MIPADDCUTOFF, 22, 365
MIPENTS, 394
L MIPINFEAS, 394
L1CACHE, 18, 359 MIPLOG, 30, 365, 458
license, 6 MIPOBJVAL, 10, 395
lifted cover inequalities, 383 MIPOPTIMIZE, 251
line length, 419 MIPPRESOLVE, 23, 365
LINELENGTH, 359 MIPRELCUTOFF, 22, 366
LNPBEST, 359 MIPRELSTOP, 366
LNPITERLIMIT, 360 MIPSOLNODE, 395
LOCALCHOICE, 360 MIPSOLS, 395
log file, 312 MIPSTATUS, 395
LP relaxation, 459 MIPTARGET, 367
LPITERLIMIT, 9, 360, 405 MIPTHREADID, 396
LPLOG, 18, 30, 293, 360 MIPTHREADS, 367
LPOBJVAL, 10, 393 MIPTOL, 367
LPOPTIMIZE, 248 model cuts, 264
LPSTATUS, 393 Mosel, 1
LPTHREADS, 361 MPS file format, see files
MPS18COMPATIBLE, 368
M MPSBOUNDNAME, 368
Markowitz tolerance, 346, 361 MPSECHO, 368
MARKOWITZTOL, 361 MPSFORMAT, 368
matrix MPSNAMELENGTH, 369
adding names, 8 MPSOBJNAME, 369
changing coefficients, 84, 89, 91, 97 MPSRANGENAME, 369
column bounds, 88 MPSRHSNAME, 369
columns, 27, 75, 104, 390, 398 MUTEXCALLBACKS, 370
constraint senses, 84
cuts, 391 N
deleting cuts, 106 NAMELENGTH, 396
elements, 372 Newton barrier, 18
extra elements, 347, 348 controlling performance, 18
input, 229 convergence criterion, 388
modifying, 27 crossover, 19
nonzeros, 146 log callback, 121, 281
quadratic elements, 400 number of iterations, 9, 18, 334
range, 98 output, 30
Index c
2009 Fair Isaac Corporation. All rights reserved. page 465
NLPHESSIANELEMS, 396 PREDOMROW, 373
NODEDEPTH, 396 PREPROBING, 374
NODES, 397 PRESOLVE, 28, 84, 374, 408, 411
nodes, 20 presolve, 28, 247, 346, 348, 374, 382, 411, 413
active cuts, 150, 223 diagnosing infeasibility, 35
cut routines, 287 integer, 23
deleting, 108 presolved problem, 196
deleting cuts, 106 basis, 182, 239
infeasibility, 130, 291 directives, 156, 240
maximum number, 363 PRESOLVEOPS, 374
number solved, 397 PRESOLVESTATE, 399
optimal, 140, 302 pricing, 375
outstanding, 387 Devex, 375
parent node, 106, 398 partial, 372, 375
prior to optimization, 304 PRICINGALG, 375
selection, 124, 285, 370 primal infeasibilities, 389, 403
separation, 305 PRIMALINFEAS, 399
NODESELECTION, 339, 370 PRIMALOPS, 375
numerical difficulties, 459 PRIMALUNSHIFT, 376
NUMIIS, 397 PRINTRANGE, 257, 324
PRINTSOL, 258, 325
O priorities, 156, 264, 407, 454
objective function, 18, 27, 367, 369, 397 problem
changing coefficients, 93 file access, 265, 323
dual value, 388 input, 8, 229
optimum value, 393, 395 name, 26, 185, 314, 376
primal value, 389 pointers, 7
quadratic, 27, 92, 95, 241, 244 problem attributes, 10
retrieving coefficients, 178 prefix, 387
OBJNAME, 397 retrieving values, 154, 165, 197
OBJRHS, 397 problem pointers, 103
OBJSENSE, 397 copying, 102
optimal basis, 31 deletion, 112
OPTIMALITYTOL, 370 PROBNAME, 376
optimization sense, 397 pseudo cost, 21, 156, 264, 376, 455
Optimizer output, 7, 19, 133, 294 PSEUDOCOST, 376
ORIGINALCOLS, 398
ORIGINALROWS, 398 Q
OUTPUTLOG, 312, 371 QCELEMS, 399
OUTPUTMASK, 327, 330, 371 QCONSTRAINTS, 399
OUTPUTTOL, 371 QELEMS, 400
quadratic programming, 413, 414
P coefficients, 92, 95, 186, 400
PARENTNODE, 398 loading global problem, 241
PENALTY, 371 loading problem, 244
PENALTYVALUE, 398 QUADRATICUNSHIFT, 377
performance, 28, 410, 412 QUIT, 259, 316
PERTURB, 331, 372
pivot, 377, 416 R
list of variables, 181 RANGE, 115, 257, 260, 324
order of basic variables, 180 RANGENAME, 400
PIVOTTOL, 372 ranging, 98, 99, 145, 400
positive semi-definite matrix, 15 information, 260
postoptimal analysis, 260 name, 369
POSTSOLVE, 254 retrieve values, 193
postsolve, 28 READBASIS, 261
PPFACTOR, 372 READBINSOL, 262
pre-emptive model, see goal programming READDIRS, 263, 455
PRECOEFELIM, 372 READPROB, 265
PREDOMCOL, 373 READSLXSOL, 267
Index c
2009 Fair Isaac Corporation. All rights reserved. page 466
reduced costs, 10, 115, 370 type of crash, 341
REFACTOR, 377 simplex log, 360
relaxation, see LP relaxation simplex pivot, see pivot
RELPIVOTTOL, 377 SIMPLEXITER, 401
REPAIRINDEFINITEQ, 378 solution, 9, 10, 14, 24, 172
REPAIRINFEAS, 268 beginning search, 249
RESTORE, 273 output, 258, 325, 329
return codes, 47, 114, 259, 316 SOLUTIONFILE, 381
RHSNAME, 400 SOSREFTOL, 381
right hand side, 97, 191 SPARECOLS, 401
name, 369 SPAREELEMS, 402
ranges, 260 SPAREMIPENTS, 402
retrieve range values, 192 SPAREROWS, 402
ROOTPRESOLVE, 378 SPARESETELEMS, 402
ROWS, 400 SPARESETS, 402
rows special order sets
addition, 80 branching, 21
deletion, 110 special ordered sets, 14, 226, 241
extra rows, 349, 402 STOP, 114, 259, 316
indices, 161 STOPSTATUS, 403
model cuts, 232 student mode, 410
names, 78, 177 SUMPRIMALINF, 403
nonzeros, 194 supported APIs, 1
number, 398, 400
types, 99, 195 T
running time, 364 TEMPBOUNDS, 382
THREADS, 382
S tightening
SAVE, 273, 275 bound, 28
SBBEST, 378 coefficient, 28
SBEFFORT, 379 tolerance, 350, 361, 364, 367, 370–372, 377
SBESTIMATE, 379 TRACE, 35, 382
SBITERLIMIT, 379 tracing, 417
SBSELECT, 380 tree, see global search
SCALE, 39, 276 TREECOMPRESSION, 383
SCALING, 39, 276, 380 TREECOVERCUTS, 383
scaling, 38, 276, 412 TREECUTSELECT, 383
security system, 6 TREEDIAGNOSTICS, 384
sensitivity analysis, 115 TREEGOMCUTS, 384
separation, 19 TREEMEMORYLIMIT, 384
set TREEMEMORYSAVINGTARGET, 385
returning names, 177 TREEMEMORYUSAGE, 403
SETDEFAULTCONTROL, 308
SETDEFAULTS, 309 U
SETLOGFILE, 312 unboundedness, 20, 38, 200
SETMEMBERS, 401
SETMESSAGESTATUS, 313 V
SETPROBNAME, 314 variables
SETS, 401 binary, 13, 226, 241, 439
sets, 394, 401 continuous, 226, 241, 439
addition, 82 continuous integer, 90, 226, 241
deletion, 111 infeasible, 196
names, 83 integer, 14, 226, 241, 439
shadow prices, 260 partial integer, 14, 226, 241, 439
simplex primal, 163
crossover, 19 selection, 21
log callback, 132, 293 semi-continuous, 14
number of iterations, 9, 401 semi-continuous integer, 14
output, 18, 30 slack, 10, 106
perturbation, 331 VARSELECTION, 385
Index c
2009 Fair Isaac Corporation. All rights reserved. page 467
VERSION, 386 XPRSchgobjsense, 94
version number, 386 XPRSchgqobj, 27, 95
XPRSchgqrowcoeff, 96
W XPRSchgrhs, 27, 97
warning messages, 29 XPRSchgrhsrange, 27, 98
WRITEBASIS, 320 XPRSchgrowtype, 27, 99
WRITEBINSOL, 321 XPRScopycallbacks, 100, 102
WRITEDIRS, 322 XPRScopycontrols, 101, 102
WRITEPROB, 323 XPRScopyprob, 102
WRITEPRTRANGE, 324 XPRScreateprob, 7, 103
WRITEPRTSOL, 10, 325 XPRSdelcols, 27, 104
WRITERANGE, 326 XPRSdelcpcuts, 32, 105
WRITESLXSOL, 328 XPRSdelcuts, 31, 105, 106
WRITESOL, 329, 448 XPRSdelindicators, 107
XPRSdelnode, 108
X XPRSdelqmatrix, 109
XPRS_bo_addbounds, 48 XPRSdelrows, 27, 110
XPRS_bo_addbranches, 49 XPRSdelsets, 111
XPRS_bo_addrows, 50 XPRSdestroyprob, 7, 103, 112
XPRS_bo_create, 51 XPRSetcbmessageVB, 295
XPRS_bo_destroy, 53 XPRSfixglobal, 260
XPRS_bo_getbounds, 54 XPRSfixglobals, 115
XPRS_bo_getbranches, 55 XPRSfree, 6, 116
XPRS_bo_getlasterror, 56 XPRSftran, 117
XPRS_bo_getrows, 57 XPRSgetbanner, 118
XPRS_bo_setcbmsghandler, 58 XPRSgetbasis, 119
XPRS_bo_setpreferredbranch, 59 XPRSgetcbbariteration, 120
XPRS_bo_setpriority, 60 XPRSgetcbbarlog, 121
XPRS_bo_store, 61 XPRSgetcbchgbranch, 122
XPRS_ge_getlasterror, 62 XPRSgetcbchgbranchobject, 123
XPRS_ge_setcbmsghandler, 63 XPRSgetcbchgnode, 124
XPRS_nml_addnames, 64 XPRSgetcbcutlog, 125
XPRS_nml_copynames, 65 XPRSgetcbcutmgr, 126
XPRS_nml_create, 66 XPRSgetcbdestroymt, 127
XPRS_nml_destroy, 67 XPRSgetcbestimate, 128
XPRS_nml_findname, 68 XPRSgetcbgloballog, 129
XPRS_nml_getlasterror, 69 XPRSgetcbinfnode, 130
XPRS_nml_getmaxnamelen, 70 XPRSgetcbintsol, 131
XPRS_nml_getnamecount, 71 XPRSgetcblplog, 132
XPRS_nml_getnames, 72 XPRSgetcbmessage, 133
XPRS_nml_removenames, 73 XPRSgetcbmipthread, 134
XPRS_nml_setcbmsghandler, 74 XPRSgetcbnewnode, 135
XPRS_MINUSINFINITY, 76, 148 XPRSgetcbnlpevaluate, 136
XPRS_PLUSINFINITY, 76 XPRSgetcbnlpgradient, 137
XPRSaddcols, 27, 75 XPRSgetcbnlphessian, 138
XPRSaddcuts, 31, 77 XPRSgetcbnodecutoff, 139
XPRSaddnames, 8, 75, 78 XPRSgetcboptnode, 140
XPRSaddqmatrix, 79 XPRSgetcbpreintsol, 141
XPRSaddrows, 27, 80 XPRSgetcbprenode, 142
XPRSaddsetnames, 83 XPRSgetcbsepnode, 143
XPRSaddsets, 82 XPRSgetcoef, 144
XPRSalter, 84, 411, 456 XPRSgetcolrange, 145
XPRSbasiscondition, 85 XPRSgetcols, 27, 146
XPRSbtran, 86 XPRSgetcoltype, 27, 147
XPRSchgbounds, 88 XPRSgetcpcutlist, 32, 148
XPRSchgcoef, 27, 89 XPRSgetcpcuts, 32, 149
XPRSchgcoltype, 27, 90 XPRSgetcutlist, 32, 150
XPRSchgmcoef, 27, 89, 91 XPRSgetcutmap, 151
XPRSchgmqobj, 27, 92 XPRSgetcutslack, 152
XPRSchgobj, 27, 93, 415 XPRSgetdaysleft, 153
Index c
2009 Fair Isaac Corporation. All rights reserved. page 468
XPRSgetdblattrib, 10, 154, 387 XPRSloadcuts, 31, 223
XPRSgetdblcontrol, 155 XPRSloaddelayedrows, 224
XPRSgetdirs, 156 XPRSloaddirs, 225
XPRSgetglobal, 157 XPRSloadglobal, 8, 226
XPRSgetiisdata, 159 XPRSloadlp, 8, 229
XPRSgetindex, 161, 417 XPRSloadmipsol, 231
XPRSgetindicators, 162 XPRSloadmodelcuts, 232
XPRSgetinfeas, 163 XPRSloadpresolvebasis, 29, 239
XPRSgetintattrib, 10, 165, 387 XPRSloadpresolvedirs, 29, 240
XPRSgetintcontrol, 9, 166, 331 XPRSloadqcqp, 233
XPRSgetlasterror, 167 XPRSloadqcqpglobal, 236
XPRSgetlb, 27, 168 XPRSloadqglobal, 8, 241
XPRSgetlicerrmsg, 169 XPRSloadqp, 8, 244
XPRSgetlpsol, 10, 170 XPRSloadsecurevecs, 247
XPRSgetmessagestatus, 171 XPRSlpoptimize, 248
XPRSgetmipsol, 172 XPRSmaxim, 9, 249
XPRSgetmqobj, 173 XPRSminim, 9, 249
XPRSgetnamelist, 174 XPRSmipoptimize, 251
XPRSgetnamelistobject, 176 XPRSobjsa, 252
XPRSgetnames, 27, 177 XPRSpivot, 253
XPRSgetobj, 27, 178, 415 XPRSpostsolve, 203, 254
XPRSgetobjecttypename, 179 XPRSpresolverow, 255
XPRSgetpivotorder, 180 XPRSrange, 115, 145, 193, 257, 260, 324
XPRSgetpivots, 181 XPRSreadbasis, 261
XPRSgetpresolvebasis, 29, 182 XPRSreadbinsol, 262
XPRSgetpresolvemap, 183 XPRSreaddirs, 263, 455
XPRSgetpresolvesol, 29, 184 XPRSreadprob, 8, 265
XPRSgetprobname, 185 XPRSreadslxsol, 267
XPRSgetqobj, 27, 186 XPRSrepairinfeas, 268
XPRSgetqrowcoeff, 187 XPRSrepairweightedinfeas, 270
XPRSgetqrowqmatrix, 188 XPRSresetnlp, 272
XPRSgetqrowqmatrixtriplets, 189 XPRSrestore, 273
XPRSgetqrows, 190 XPRSrhssa, 274
XPRSgetrhs, 27, 191 XPRSsave, 273, 275
XPRSgetrhsrange, 27, 192 XPRSscale, 39, 276
XPRSgetrowrange, 193 XPRSsetbranchbounds, 277
XPRSgetrows, 27, 194 XPRSsetbranchcuts, 278
XPRSgetrowtype, 27, 195 XPRSsetcbbariteration, 279
XPRSgetscaledinfeas, 29, 196 XPRSsetcbbarlog, 19, 29, 281
XPRSgetstrattrib, 10, 197, 387 XPRSsetcbchgbranch, 30, 282
XPRSgetstrcontrol, 198 XPRSsetcbchgbranchobject, 284
XPRSgetub, 27, 199 XPRSsetcbchgnode, 30, 285
XPRSgetunbvec, 200 XPRSsetcbcutlog, 286
XPRSgetversion, 201 XPRSsetcbcutmgr, 32, 287
XPRSglobal, 9, 202, 217 XPRSsetcbdestroymt, 288
XPRSgoal, 41, 204 XPRSsetcbestimate, 289
XPRSiisall, 209 XPRSsetcbgloballog, 30, 290
XPRSiisclear, 210 XPRSsetcbinfnode, 30, 291
XPRSiisfirst, 211 XPRSsetcbintsol, 30, 292
XPRSiisisolations, 212 XPRSsetcblplog, 18, 29, 293
XPRSiisnext, 213 XPRSsetcbmessage, 7, 29, 294, 312
XPRSiisstatus, 214 XPRSsetcbmipthread, 296
XPRSiiswrite, 215 XPRSsetcbnewnode, 30, 297
XPRSinit, 6, 103, 116, 118, 216 XPRSsetcbnlpevaluate, 298
XPRSinitglobal, 203, 217 XPRSsetcbnlpgradient, 299
XPRSinitializenlphessian, 218 XPRSsetcbnlphessian, 300
XPRSinitializenlphessian_indexpairs, 219 XPRSsetcbnodecutoff, 30, 301
XPRSinterrupt, 220 XPRSsetcboptnode, 30, 302
XPRSloadbasis, 221 XPRSsetcbpreintsol, 30, 303
XPRSloadbranchdirs, 222 XPRSsetcbprenode, 30, 304
Index c
2009 Fair Isaac Corporation. All rights reserved. page 469
XPRSsetcbsepnode, 277, 278, 305
XPRSsetdblcontrol, 307
XPRSsetdefaultcontrol, 308
XPRSsetdefaults, 309
XPRSsetindicators, 310
XPRSsetintcontrol, 9, 311, 331
XPRSsetlogfile, 18, 19, 312
XPRSsetmessagestatus, 313
XPRSsetprobname, 314
XPRSsetstrcontrol, 315
XPRSstorebounds, 317
XPRSstorecuts, 31, 318
XPRSwritebasis, 320
XPRSwritebinsol, 321
XPRSwritedirs, 322
XPRSwriteprob, 323
XPRSwriteprtrange, 324
XPRSwriteprtsol, 10, 325
XPRSwriterange, 326
XPRSwriteslxsol, 328
XPRSwritesol, 10, 329, 448
Index c
2009 Fair Isaac Corporation. All rights reserved. page 470