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

I am reading


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.

  • $\begingroup$ maybe you can try to write FR Bound x1 for your general integer without any bounds. Is it your question asking? $\endgroup$
    – ytsao
    Nov 21, 2023 at 10:49
  • $\begingroup$ 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? $\endgroup$ Nov 21, 2023 at 11:45
  • $\begingroup$ 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. $\endgroup$
    – ytsao
    Nov 21, 2023 at 12:13
  • $\begingroup$ 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. $\endgroup$
    – prubin
    Nov 21, 2023 at 22:19
  • $\begingroup$ 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. $\endgroup$ Nov 22, 2023 at 9:41

1 Answer 1


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:

 E  R0      
    MARKER    'MARKER'                 'INTORG'
    C0        R0        1
    C1        R0        1
    MARKER    'MARKER'                 'INTEND'
    RHS1      R0        1
 LI BND1      C0        0
 FR BND1      C1      

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.