dwave-examples / job-shop-scheduling

Determine a schedule for running a set of jobs.
Apache License 2.0
45 stars 32 forks source link

fail in bqm init when max_time is increased #7

Open rugantio opened 3 years ago

rugantio commented 3 years ago

Hello, While trying this code, I noticed that the method to construct the bqm, get_jss_bqm, breaks when max_time is increased. I set up a minimal experiment:

AttributeError: 'NoneType' object has no attribute 'classical_gap'


I made some edits to the files for visualization purposes so the line number might be different, but this error seems to be quite common (I encountered it also in other set-ups)

Let me know if you can reproduce the error and if you need to know further details. Thank you!
mcfarljm commented 3 years ago

Hi, I'm able to recreate what may be a similar issue by setting max_time to 7 or larger in demo.py with all other settings the same. For me, this produces an ImpossibleBQM exception. I suspect it is related to setting the max time to a value that is larger than the worst case scenario, which for demo.py is 6. See the notes about max_time in the README file. You might try using a value of None for max_time, which defaults to the worst case. However, I have noticed that this can also lead to the exception identified in Issue #9.