# General integer variables in the MPS format

Is it possible to specify an integer-constrained variable without any bounds in the MPS format?

https://www.ibm.com/docs/en/icos/22.1.0?topic=extensions-integer-variables-in-mps-files

and cannot figure out the way to do it.

Also the previously mentioned documentation states:

To specify a general integer variable with no upper bounds, one must use the first way, that is, make certain that the variable's column is described within an INTORG/INTEND marker pair.

I thought the bound key LI is used to specify an integer-constrained variable with no upper bound.

• maybe you can try to write FR Bound x1 for your general integer without any bounds. Is it your question asking? Nov 21, 2023 at 10:49
• To me it seems like a guess. Do you know whether that works? And what should I do more than FR to make the variable integer-constrained? Nov 21, 2023 at 11:45
• I tried pyscipopt, I created two general integer variables without bounds (x, y), and introduced the constraint (x+y=1) to test out, then it works, without any objective function since that would lead problem become unbounded. Nov 21, 2023 at 12:13
• LI specifies a lower bound for an integer variable and leaves it to you to specify the upper bound with a separate UB line. I'm not sure what happens if you omit the UB line. In any case, you could pecify the smallest and largest possible values (-2^31, 2^31 - 1) as bounds.
– prubin
Nov 21, 2023 at 22:19
• But what if the integer variable is not in the INTORG/INTEND section, then there is no upper bound. I would assume LI just imposed a lower bound and make the variable integer. That is what confuses me about LI. Nov 22, 2023 at 9:41

I used Gurobi to write out the following ILP in mps format:

$$\begin{array}{ll} \min & 0 \\ s.t. & x + y = 1 \\ & x \geq 0 \\ & y \text{ free} \\ & x,y \text{ integer} \end{array}$$

The corresponding result is:

NAME
ROWS
N  OBJ
E  R0
COLUMNS
MARKER    'MARKER'                 'INTORG'
C0        R0        1
C1        R0        1
MARKER    'MARKER'                 'INTEND'
RHS
RHS1      R0        1
BOUNDS
LI BND1      C0        0
FR BND1      C1
ENDATA


So it seems that using FR is the bound key here.

• Putting C0 within INTORD/INTEND should be redundant. The LI key should make C0 integer constrained I would assume. Nov 24, 2023 at 9:38