[Coin-symphony] OsiSym reSolve() ignores added constraints after solving?

Kish Shen kish.shen at crosscoreop.com
Thu Aug 17 00:28:53 EDT 2006


Hi,

I have been doing some more tests with my code. As far as I can tell, once OsiSym have solved
my problem once, it will ignore new constraints that are added to the problem.

Here is what I did. First I set up the following problem (this is written out by OsiSym's writeLp()):

Minimize
obj: x0
Subject To
cons0:  x0 + x1 >= 2
cons1:  x0 - x1 = 0
Bounds
 x0 Free
 x1 Free
End

This problem is correctly solved by calling initialSolve(), giving an objective value of 1, and X and Y
with values of 1.

I then add a new constraint x0 + x1 >= 4, and resolve the problem with resolve(), but I get the 
same result as previously, i.e. the new constraint seem to be ignored, even though the constraint
does seem to have been added to the problem, as shown by writeLp():

Minimize
obj: x0
Subject To
cons0:  x0 + x1 >= 2
cons1:  x0 - x1 = 0
cons2:  x0 + x1 >= 4
Bounds
 x0 Free
 x1 Free
End

I changed the code to call initialSolve() instead of resolve(), and this time I get the correct 
answers to both solve, before and after adding the new constraint. 

By the way, I noticed a difference in the Doxygen documentation for resolve() for
OsiSolverInterface and OsiSymSolverInterface.

Here is what OsiSolverInterface say thatt resolve() is "resolve an LP relaxation after problem
modification", which is exactly how I am using it, but in OsiSymSolverInterface, the doc
for resolve() says "Resolve an IP problem modification". Is this correct?

Cheers,

Kish







More information about the Symphony mailing list