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

BoundSearch.getDecision() creating wrong decision? #615

Closed
ThisIsMyGitAcct opened this issue Feb 27, 2019 · 1 comment
Closed

BoundSearch.getDecision() creating wrong decision? #615

ThisIsMyGitAcct opened this issue Feb 27, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@ThisIsMyGitAcct
Copy link

[BUG] Just read your BIVS paper and am walking thru the BoundSearch code for the first time. It appears you have a bug, in one case it can create a decision with the wrong value. In getDecison(), in the block when the domSize is within spec, and the var is NOT enumerated, the makeIntDecision call (ln 82) is getting its value from Math.min(lbB,ubB). In turn, lbB/ubB are set from the return val of calls to bound() (ln 77/78). BUT bound() return a cost value relative to the objective var (ln 107/109), not the bounds of the var in question. So this decision will attempt to bind the variable to a value from the objective (possibly even the objective's negated UB), not its own domain.

Expected behavior

The value selection logic at line 82 should be the same as that from line 133.

Actual behavior

Possible Solution

The value selection logic at line 82 should be the same as that from line 133.

Steps to Reproduce (for bugs)

  1. Read the code.
  2. Think about what it does.
  3. Realize its wrong.

Context

Environment

  • Choco-solver version:
  • Java version:
  • Link to your project:
@cprudhom
Copy link
Member

cprudhom commented Mar 2, 2019

Hi,

Thank you for the bug report.
Obviously, l.89 should be modified to get the bound that minimizes the cost.

Best

@cprudhom cprudhom self-assigned this Mar 2, 2019
@cprudhom cprudhom added the bug label Mar 2, 2019
@cprudhom cprudhom added this to the 4.10.1 milestone Mar 2, 2019
cprudhom added a commit that referenced this issue Mar 2, 2019
@cprudhom cprudhom closed this as completed Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants