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

Failure post-processing solution with max_time=5 #9

Closed
mcfarljm opened this issue Feb 6, 2021 · 0 comments · Fixed by #11
Closed

Failure post-processing solution with max_time=5 #9

mcfarljm opened this issue Feb 6, 2021 · 0 comments · Fixed by #11

Comments

@mcfarljm
Copy link

mcfarljm commented Feb 6, 2021

To reproduce, change max_time in demo.py from 4 to 5. May require a few runs to trigger the error. The exception is:

Traceback (most recent call last):
  File "demo.py", line 66, in <module>
    job_name, task_time = node.rsplit("_", 1)
ValueError: not enough values to unpack (expected 2, got 1)

The value of the variable node is aux0.

mcfarljm pushed a commit to mcfarljm/job-shop-scheduling that referenced this issue Feb 9, 2021
With max_time=5, auxiliary variables are added to the BQM.  These were
not handled in the solution post-processing and could produce a
ValueError as noted in Issue dwave-examples#9.

The fix is simply to skip the auxiliary variables when extracting the
solution in demo.py.  To simplify, a utility function
is_auxiliary_variable has been added for reuse in
test_job_shop_scheduler.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant