job-shop-scheduling icon indicating copy to clipboard operation
job-shop-scheduling copied to clipboard

fail in bqm init when max_time is increased

Open rugantio opened this issue 4 years ago • 1 comments

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:

  • 2 machines
  • 3 jobs (1st job: 2 ops, 2nd job: 2 ops, 3rd job: 1 op)
  • all ops of take time 1 to complete this was solved easily when max_time <= 8 but, as soon as max_time == 9, this is the error that I obtain:
  File "<ipython-input-4-7aaea837e31a>", line 96, in <module>
    bqm = get_jss_bqm(jobs, max_time, stitch_kwargs)

  File "..t/job_shop_scheduler.py", line 74, in get_jss_bqm
    return scheduler.get_bqm(stitch_kwargs)

  File "../job_shop_scheduler.py", line 352, in get_bqm
    bqm = dwavebinarycsp.stitch(self.csp, **stitch_kwargs)

  File "/usr/lib/python3.8/site-packages/dwavebinarycsp/compilers/stitcher.py", line 188, in stitch
    if pmodel.classical_gap >= min_classical_gap:

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!

rugantio avatar Feb 04 '21 14:02 rugantio