Example: file format for SMIQP

Example
Let (Pe) be an instance with 2 integer and 2 real variables and one quadratic inequality constraint:
Min f(x) =
-73 -15 -4
xt 3 -14 -7 -13 x
-15 -7 8 7
-4 -13 7 12
+
15
10 x
-7
-4
(Pe) s.t.
5 x1 + x2 + 8 x3 + 4x4 = 95
5 x1x2 + 3x32 + 2x42+ x2 + 8 x3 + 4x4 ≤ 105
0 ≤ xi ≤ 10 i ∈ {1,...,4}
x1, x2 ∈ N
x3, x4 ∈ R


The associated file format is the following:

4 2 1 0 0 1
u
10 10 10 10
l
0 0 0 0
Q
16
0 0 -7
0 1 3
0 2 -15
0 3-4
1 0 3
1 1 -14
1 2 -7
1 3 -13
2 0 -15
2 1 -7
2 2 8
2 3 7
3 0 -4
3 1 -13
3 2 7
3 3 12
c
4
0 15
1 10
2 -7
3 -4
A
4
0 0 5
0 1 1
0 2 8
0 3 4
b
1
0 95
Dq
10
0 0 2 0.5
0 0 3 4.0
0 0 4 2.0
0 1 2 2.5
0 2 0 0.5
0 2 1 2.5
0 3 0 4.0
0 3 3 3.0
0 4 0 2.0
0 4 4 2.0
eq
1
0 105

Remarks:
  1. Each index starts from 0.
  2. Each non-zero term of the matrix Q has to be written in the file. If Q is not symmetric, SMIQP rewrites Q as matrix Q' where Q'= (Q+Qt)/2.
  3. If there is no real variable, then nb_int is equal to n.
  4. If the problem does not contain linear/quadratic equality or inequality constraints do not put the corresponding lines in the instance file.
  5. If you write a linear constraints using the linear part of a quadratic constraint, the associated RLT constraints will not be used into the convexification process.


Return to the main page