This file is indexed.

/usr/share/doc/lp-solve-doc/set_presolve.htm is in lp-solve-doc 5.5.0.13-7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<HEAD>
		<TITLE>set_presolve</TITLE>
		<style TYPE="text/css"> BODY { font-family:verdana,arial,helvetica; margin:0; }
	</style>
	</HEAD>
	<BODY>
		<TABLE class="clsContainer" style="TABLE-LAYOUT: fixed" cellSpacing="0" cellPadding="15"
			width="100%" border="0">
			<TR>
				<TD vAlign="top">
					<h1>set_presolve</h1>
					<p>Specifies if a presolve must be done before solving.</p>
					<p><b>void set_presolve(lprec </b>*<i>lp</i><b>, int </b><i>do_presolve</i><b>, int </b><i>maxloops</i><b>);</b></p>
					<p class="label"><b>Return Value</b></p>
					<p><b>set_presolve</b> has no return value.<br>
					</p>
					<p class="label"><b>Parameters</b></p>
					<p class="dt"><i>lp</i></p>
					<p class="indent">Pointer to previously created lp model. See return value of <A href="make_lp.htm">
							make_lp</A>, <A HREF="copy_lp.htm">copy_lp</A>, <A href="read_lp.htm">read_lp,
							read_LP</A>, <A href="read_mps.htm">read_mps, read_freemps, read_MPS, read_freeMPS</A>, <A HREF="read_XLI.htm">read_XLI</A></p>
					<p class="dt"><i>do_presolve</i></p>
					<p class="indent">Specifies presolve level. Can be the (OR) combination of any of
						the following values:</p>
					<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="1">
							<TR>
								<TD>PRESOLVE_NONE (0)</TD>
								<TD>No presolve at all</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_ROWS (1)</TD>
								<TD>Presolve rows</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_COLS (2)</TD>
								<TD>Presolve columns</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_LINDEP (4)</TD>
								<TD>Eliminate linearly dependent rows</TD>
							</TR>
<!--
							<TR>
								<TD>PRESOLVE_AGGREGATE (8)</TD>
								<TD>Not used at this time</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_SPARSER (16)</TD>
								<TD>Not used at this time</TD>
							</TR>
-->
							<TR>
							    <TD>PRESOLVE_SOS (32)</TD>
							    <TD>Convert constraints to SOSes (only SOS1 handled)</TD>
						    </TR>
							<TR>
								<TD>PRESOLVE_REDUCEMIP (64)</TD>
								<TD>If the phase 1 solution process finds that a constraint is redundant then this constraint is deleted.
                                                                    This is no longer active since it is very rare that this is effective, and also that it adds code complications and delayed presolve effects that are not captured properly.
                                                                </TD>
							</TR>
							<TR>
								<TD>PRESOLVE_KNAPSACK (128)</TD>
								<TD>Simplification of knapsack-type constraints through addition of an extra variable, which also helps bound the OF</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_ELIMEQ2 (256)</TD>
								<TD>Direct substitution of one variable in 2-element equality constraints; this requires changes to the constraint matrix</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_IMPLIEDFREE (512)</TD>
								<TD>Identify implied free variables (releasing their explicit bounds)</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_REDUCEGCD (1024)</TD>
								<TD>Reduce (tighten) coefficients in integer models based on GCD argument</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_PROBEFIX (2048)</TD>
								<TD>Attempt to fix binary variables at one of their bounds</TD>
							</TR>
                                                        <TR>
								<TD>PRESOLVE_PROBEREDUCE (4096)</TD>
								<TD>Attempt to reduce coefficients in binary models</TD>
							</TR>
                                                        <TR>
								<TD>PRESOLVE_ROWDOMINATE (8192)</TD>
								<TD>Idenfify and delete qualifying constraints that are dominated by others, also fixes variables at a bound</TD>
							</TR>
                                                        <TR>
								<TD>PRESOLVE_COLDOMINATE (16384)</TD>
								<TD>Deletes variables (mainly binary), that are dominated by others (only one can be non-zero)</TD>
							</TR>
                                                        <TR>
								<TD>PRESOLVE_MERGEROWS (32768)</TD>
								<TD>Merges neighboring &gt;= or &lt;= constraints when the vectors are otherwise relatively identical into a single ranged constraint</TD>
							</TR>
                                                        <TR>
								<TD>PRESOLVE_IMPLIEDSLK (65536)</TD>
								<TD>Converts qualifying equalities to inequalities by converting a column singleton variable to slack. The routine also detects implicit duplicate slacks from inequality constraints, fixes and removes the redundant variable. This latter removal also tends to reduce the risk of degeneracy. The combined function of this option can have a dramatic simplifying effect on some models</TD>
							</TR>
                                                        <TR>
								<TD>PRESOLVE_COLFIXDUAL (131072)</TD>
								<TD>Variable fixing and removal based on considering signs of the associated dual constraint</TD>
							</TR>
                            <TR>
								<TD>PRESOLVE_BOUNDS (262144)</TD>
								<TD>Does bound tightening based on full-row constraint information. This can assist in tightening  the OF bound, eliminate variables and constraints.  At the end of presolve, it is checked if any variables can be deemed free, thereby reducing any chance that degeneracy is introduced via this presolve option.</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_DUALS (524288)</TD>
								<TD>Calculate duals</TD>
							</TR>
							<TR>
								<TD>PRESOLVE_SENSDUALS (1048576)</TD>
								<TD>Calculate sensitivity if there are integer variables</TD>
							</TR>
						</TABLE>
					<p class="dt"><i>maxloops</i></p>
					<p class="indent">The maximum number of times presolve may be done.
					Use <A href="get_presolveloops.htm">get_presolveloops</A> if you don't want to change this value.</p>
					<br>
					<p class="label"><b>Remarks</b></p>
					<p>The <b>set_presolve</b> function specifies if a presolve must be done before
						solving. Presolve looks at the model and tries to simplify it so that solving
						times are shorter. For example a constraint on only one variable is converted
						to a bound on this variable (and the constraint is deleted). Note that the
						model dimensions can change because of this, so be careful with this. Both rows
						and columns can be deleted by the presolve.<br>
						The <i>maxloops</i> variable specifies the maximum number of times presolve is done.
					    After a presolve is done, another presolve can again result in elimination of extra rows and/or columns.
					    This number specifies the maximum number of times this process is repeated. By default this is until
					    presolve has nothing to do anymore. Use <A href="get_presolveloops.htm">get_presolveloops</A> if you don't want to change this value.<br>
						Note that PRESOLVE_LINDEP can result in deletion of rows (the linear dependent ones).
						<A href="get_constraints.htm">get_constraints, get_ptr_constraints</A> will then
						return only the values of the rows that are kept and the values of the deleted rows
						are not known anymore.
						The default is not (PRESOLVE_NONE) doing a presolve.
						The following code can be used to retrieve the values of all the variables, even if
						variables are deleted by presolve:
					</p>
<pre>
int Norig_columns, Norig_rows, i;
REAL value;

Norig_columns = get_Norig_columns(lp);
Norig_rows = get_Norig_rows(lp);
for(i = 1; i &lt;= Norig_columns; i++) {
  value = get_var_primalresult(lp, Norig_rows + i);
  printf("%f\n", value);
}
</pre>
                    <p>Note that there is no possibility to get the values of deleted rows.</p>
					<p class="label"><b>Example</b></p>
					<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include "lp_lib.h"

int main(void)
{
  lprec *lp;

  /* Create a new LP model */
  lp = make_lp(0, 0);
  if(lp == NULL) {
    fprintf(stderr, "Unable to create new LP model\n");
    return(1);
  }

  set_presolve(lp, PRESOLVE_ROWS | PRESOLVE_COLS | PRESOLVE_LINDEP, get_presolveloops(lp));

  delete_lp(lp);
  return(0);
}
</code></pre>
					<p>
						<A HREF="lp_solveAPIreference.htm">lp_solve API reference</A></p>
					<p>
						<b>See Also</b> <A HREF="make_lp.htm">make_lp</A>, <A HREF="copy_lp.htm">copy_lp</A>,
						<A href="read_lp.htm">read_lp, read_LP</A>, <A HREF="read_mps.htm">read_mps,
							read_freemps, read_MPS, read_freeMPS</A>, <A HREF="read_XLI.htm">read_XLI</A>, <A HREF="get_presolve.htm">get_presolve</A>, <A HREF="get_presolveloops.htm">get_presolveloops</A>, <A HREF="is_presolve.htm">is_presolve</A></p>
				</TD>
			</TR>
		</TABLE>
	</BODY>
</html>