dwave-examples / job-shop-scheduling Goto Github PK
View Code? Open in Web Editor NEWDetermine a schedule for running a set of jobs.
License: Apache License 2.0
Determine a schedule for running a set of jobs.
License: Apache License 2.0
It would be beneficial to have jobs that are relatable to folks in manufacturing.
Suggestion: change baking cupcakes and making a smoothie to bicycle assembly (frame, drive train, wheels, brakes, headset, handlebars, etc) since it's a small change and is relatable to a larger audience.
Why below input it not working
jobs = {"cupcakes": [("mixer", 1), ("oven", 4)],
"smoothie": [("mixer", 1), ("oven", 3)],
"lasagna": [("oven", 2)]}
max_time = 10
same is the case with
jobs = {"group1": [("man", 2), ("robo", 1)],
"group2": [("man", 1), ("robo", 2)],
"group3": [("man", 2), ("robo", 1)]}
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:
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!
Sorry for disturbing you. I am new to python and I want to run the programme to solve a job-shop problem, but I come across an error. I don't know how to solve it and let the programme run. Could you help me? Thank you very much!
Traceback (most recent call last):
File "C:\Users\14391\Downloads\代码\job-shop-scheduling-master\demo.py", line 31, in <module>
sampler = EmbeddingComposite(DWaveSampler())
File "C:\Users\14391\Downloads\代码\job-shop-scheduling-master\venv\lib\site-packages\dwave\system\samplers\dwave_sampler.py", line 161, in __init__
self.client = Client.from_config(**config)
File "C:\Users\14391\Downloads\代码\job-shop-scheduling-master\venv\lib\site-packages\dwave\cloud\client.py", line 344, in from_config
return _clients[_client](**config)
File "C:\Users\14391\Downloads\代码\job-shop-scheduling-master\venv\lib\site-packages\dwave\cloud\client.py", line 386, in __init__
raise ValueError("API token not defined")
ValueError: API token not defined
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
.
Re: demo py
from dwave.system.composites import EmbeddingComposite
from dwave.system.samplers import DWaveSampler
Missing from the package. Not even a comment about where one can find them!
👎
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.