chocoteam / choco-parsers

Parsers to Choco3
BSD 4-Clause "Original" or "Old" License
9 stars 4 forks source link

unexpected behavior in some mps tests #16

Closed pchtsp closed 6 years ago

pchtsp commented 6 years ago

Good day!

I've been testing the pulp integration done in issue #15 and while running pulp's internal tests we have arrived to a couple of bizarre results. For each result I'm sending the mps file of the test and the sol file I got. They're all very small examples.

Here I explain each of the cases:

Two of the cases are actually unbounded problems. Not sure how or if choco detects this and how it communicates it:

thanks!

Franco pulp_tests.zip

jgFages commented 6 years ago

We use finite domains, so if no bound is specified, we create large but still finite ones. We don't have the "unbounded" output

pchtsp commented 6 years ago

Of course, I should know that variable domains need to be bounded in CP. Thanks!

For the other two, could you please tell me if there's anything wrong with the files? that way we can fix it and try to publish the new version of pulp soon.

Thanks!

F.

jgFages commented 6 years ago

I only have my phone with me so I cannot even open the zip. Test9 looks like there is a bug... Does it include reals? Test11 if some variables have no specified bounds... It could come from default bounds of choco solver

pchtsp commented 6 years ago

Just saw that the Test09 appears to be a difference between the mps and the lp file generated by pulp. The mps appears to be feasible while the lp is not. Below are the Test09 and Test11 examples. Can you still take a look at Test11?

thanks!

F.

Test09

*SENSE:Minimize
NAME          test09
ROWS
 N  obj
 G  c1
 G  c2
 E  c3
 G  c4
COLUMNS
    w         c4         1.000000000000e+00
    x         c2         1.000000000000e+00
    x         obj        1.000000000000e+00
    y         c3        -1.000000000000e+00
    y         obj        4.000000000000e+00
    z         c2         1.000000000000e+00
    z         c3         1.000000000000e+00
    z         obj        9.000000000000e+00
RHS
    RHS       c1         5.000000000000e+00
    RHS       c2         1.000000000000e+01
    RHS       c3         7.000000000000e+00
    RHS       c4         0.000000000000e+00
BOUNDS
 UP BND       x          4.000000000000e+00
 LO BND       y         -1.000000000000e+00
 UP BND       y          1.000000000000e+00
ENDATA

or, in lp:

\* test09 *\
Minimize
obj: x + 4 y + 9 z
Subject To
_dummy: __dummy = 0
c1: __dummy >= 5
c2: x + z >= 10
c3: - y + z = 7
c4: w >= 0
Bounds
__dummy = 0
x <= 4
-1 <= y <= 1
End

Test11

*SENSE:Maximize
NAME          test011
ROWS
 N  obj
 L  c1
 G  c2  
 E  c3
 G  c4
COLUMNS
    w         c4         1.000000000000e+00
    x         c1         1.000000000000e+00
    x         c2         1.000000000000e+00
    x         obj        1.000000000000e+00
    y         c1         1.000000000000e+00
    y         c3        -1.000000000000e+00
    y         obj        4.000000000000e+00
    z         c2         1.000000000000e+00
    z         c3         1.000000000000e+00
    z         obj        9.000000000000e+00
RHS
    RHS       c1         5.000000000000e+00
    RHS       c2         1.000000000000e+01
    RHS       c3         7.000000000000e+00
    RHS       c4         0.000000000000e+00
BOUNDS
 UP BND       x          4.000000000000e+00
 LO BND       y         -1.000000000000e+00
 UP BND       y          1.000000000000e+00
ENDATA

or, in lp:

\* test011 *\
Maximize
obj: x + 4 y + 9 z
Subject To
c1: x + y <= 5
c2: x + z >= 10
c3: - y + z = 7
c4: w >= 0
Bounds
x <= 4
-1 <= y <= 1
End

optimal solution is: {x:4, y:1, z:8, w:0} choco gives: {w: 0, x: 4, y: -1, z: 6}

cprudhom commented 6 years ago

About Test11, I bet this comes from the fact that the OF has to be maximized. In MPS file, there is no such instruction and we consider OF as minimization by default. When it comes to maximization, the "-max" option should be added.

With that option on, that gives:

w   0.0
x   3.9999549755859505
y   0.9999887438964876
z   7.999994997287327

which seems correct, right ?

cprudhom commented 6 years ago

In other words, we do not parse *SENSE:Maximize

pchtsp commented 6 years ago

Ah ! That's the optimal one, yes.

I'll adapt the call to give the parameter explicitly.

Thanks both for the help. I'll close the issue when I get to my pc.

F.

On Tue, Apr 3, 2018, 13:56 cprudhom notifications@github.com wrote:

In other words, we do not parse *SENSE:Maximize

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chocoteam/choco-parsers/issues/16#issuecomment-378224441, or mute the thread https://github.com/notifications/unsubscribe-auth/AFNM8w71z-hzC5kh_CC4IuuTN3hxx6Fcks5tk2N1gaJpZM4TBdJ1 .