Reusing problem definitions
Sometimes it's more efficient to upload a problem definition once and find its solution using different solvers or different parameters. You can upload a problem definition using the upload method, which returns a URL, and then provide that URL to a solver using the submit or optimize methods:
url = problem.upload(workspace)
job = solver.submit(url)
print(job.id)
> 9228ea88-6832-11ea-8271-c49dede60d7c
You can also create an online problem from the submitted URL and assign it a name. This OnlineProblem object also allows you to download the problem and get the terms of the problem to run any client-side analysis, such as set_fixed_variables, evaluate the cost function for a configuration, or get specific terms from variable IDs:
online_problem = OnlineProblem(name = "o_prob", blob_uri = url)
job = solver.submit(online_problem)
problem = online_problem.download(workspace)
Next steps
Feedback
Issottometti u ara feedback għal