Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checking solution availability in OsiXprSolverInterface #2

Closed
svigerske opened this issue Mar 2, 2019 · 7 comments
Closed

checking solution availability in OsiXprSolverInterface #2

svigerske opened this issue Mar 2, 2019 · 7 comments
Labels
bug Something isn't working OsiXpr

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: @pobonomo

Original creation time: 2006-06-27 14:56:46

Assignee: somebody

Version:

CC: @pobonomo

In OsiXprSolverInterface::getWarmStart, at the very beginning of the function line 321, there is a test which I think is invalid:

XPRS_CHECKED( XPRSgetintattrib, (prob_,XPRS_PRESOLVESTATE, &pstat) );
if ( pstat != 7 ) return NULL;

I guess that this is trying to test if the solution in Xpress is valid. If so, the bit 7 of pstat should be 1 (and not pstat==7) so the test should be:

if ( (pstat & 128) ==0 ) return NULL;

@svigerske svigerske added bug Something isn't working component1 labels Mar 2, 2019
@svigerske
Copy link
Member Author

Comment by @andrea5w created at 2006-08-13 22:03:03

Made suggested correction in branches/devel version

@svigerske
Copy link
Member Author

Comment by @mjsaltzman created at 2006-10-28 23:46:49

pstat == 7 could also mean that the problem is loaded, LP presolved and MIP presolved, but the solution in memory is not valid.

Or it could be that what was intended is (pstat & 7) == 7, which would mean loaded, LP presolved, and MIP presolved, but validity is ignored.

There is another test like this on line 880. There are some other tests for whether presolve is done, but they are bitwise tests ((pstat & 6) == 0).

Unfortunately, this is code contributed by Dash. I will ask the author, but no promises that I can get an answer.

@svigerske
Copy link
Member Author

Comment by @mjsaltzman created at 2006-10-28 23:46:49

Changing component from component1 to OsiXpr.

@svigerske
Copy link
Member Author

Comment by @mjsaltzman created at 2006-10-28 23:48:37

Replying to [comment:2 mjs]:

Or it could be that what was intended is (pstat & 7) == 7, which would mean loaded, LP presolved, and MIP presolved, but validity is ignored.

Or even (pstat & 7) == 0 or (pstat & 7) != 0...

@svigerske
Copy link
Member Author

Comment by @pobonomo created at 2006-11-30 06:15:26

Replying to [comment:3 mjs]:

Replying to [comment:2 mjs]:

Or it could be that what was intended is (pstat & 7) == 7, which would mean loaded, LP presolved, and MIP presolved, but validity is ignored.

Or even (pstat & 7) == 0 or (pstat & 7) != 0...

Sorry for not following up earlier.
The function tries to obtain a basis from XPRESS. I really don't see the relation between availability of a basis and the state of LP and MIP presolve.

In any case if there is no valid solution in memory I don't see how a basis is available.

I am not working with that anymore but when I tried to use this function a few months ago, I consistently obtained incorrect results.
Regards,
Pierre

@svigerske
Copy link
Member Author

Comment by @mjsaltzman created at 2008-07-28 17:59:01

OK I am closing this. The patch has been in since at least r.951.

@svigerske
Copy link
Member Author

Comment by @mjsaltzman created at 2008-07-28 17:59:01

Resolution: fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OsiXpr
Projects
None yet
Development

No branches or pull requests

1 participant