I try to use the GurobiTM Optimizer. Please find below my QP model :
The problems most commonly solved by the Gurobi Parallel Mixed Integer Programming solver are of the form: Objective: minimize cT x Constraints: A x = b (linear constraints) l ≤ x ≤ u (bound constraints) some or all xj must take integer values (integrality constraints)
Maximize
- x1 + .5 x2 + .5 x3 + x4 - x5 + .5 x6 + .5 x7 - x8
- .17 x1 * x2 + .66 * x1 * x3 + .66 x1 * x4
+ .56 x2 * x3 + .49 x2 * x4
- .17 x5 * x6 + .82 x5 * x7 + .66 x5 * x8
+ .16 x6 * x7 + .49 x6 * x8
Subject To
c1: x1 + x5 <=1
c2: x2 + x6 <=1,
c3: x3 + x7 <=1
c4: x4 + x8 <=1,
c5: x1 + x2 + x3 + x4 <= 2
c6: x5 + x6 + x7 + x8 <= 2
Bounds
0 <= x1 <= 1
0 <= x2 <= 1
0 <= x3 <= 1
0 <= x4 <= 1
0 <= x5 <= 1
0 <= x6 <= 1
0 <= x7 <= 1
0 <= x8 <= 1
Integers
PS PD JS JD AS AD MS MD
End
It seems that according to Gurobi Interactive Shell the syntax is not correct :
Error reading LP format file /.../toyproblem.lp at line 2
Malformed term in expression
Neighboring tokens: " - .17 x1 * x2 + .66 * x1 * "
Any idea ?
Thanks in advance for your help,
MM.