go-glpk icon indicating copy to clipboard operation
go-glpk copied to clipboard

ReadLP

Open steruhs opened this issue 4 years ago • 0 comments

When I read in the LP below with the ReadLP method, I get as result x_1 = 2, x_2 = 0, x_3 = 2, x_4 = 0 which is clearly wrong when looking at the LP.

\* Problem: Unknown *\

Maximize obj: 0 x_1

Subject To r_1: + x_2 + x_1 = 2 r_2: - x_2 = 0 r_3: + x_4 + x_3 = 2 r_4: - x_3 = 0 r_5: + x_3 + x_1 <= 10 r_6: + x_4 + x_2 <= 8

End

When I don't read in the LP but create a Prob datastructure it seems to work.

steruhs avatar Aug 26 '20 07:08 steruhs