Setting penalty value for constraints in ConstraintSatisfactionProblem
Hi,
is there a possibility to set a certain penalty value for violating a constraint set in csp.add_constraint, and therefore making it a soft constraint?
Thank you in advance,
Marek
Comments
Hello,
So far this is not possible, but it is possible to submit a feature request.
Here is a link to the GitHub page:
https://github.com/dwavesystems/dwavebinarycsp
You can create a new issue from this page and then click the "Get Started" button next to "Feature Request":
https://github.com/dwavesystems/dwavebinarycsp/issues
For convenience here is a link to the new feature page:
https://github.com/dwavesystems/dwavebinarycsp/issues/new?template=feature_request.md
It sounds like having a weighted binary CSP might be a bit error prone, and might not provide the best solutions, but it is worth submitting and feature request and explaining your use case.
I hope this helps!
Oh, thank you. How should I implement such a problem then? I'm coding nurse scheduling problem, it has some hard constraints and some soft ones.
I've seen some implementations directly defining qubo equation to do this. Is there a more high-level possibility?
Greetings,
Marek
Oh! That makes sense.
I think the best way would be to create a QUBO, but of course, having a high level way of implementing would be great!
I actually just noticed that there is a feature request for this already!
https://github.com/dwavesystems/dwavebinarycsp/issues/73
If you want to add a comment to this, it will probably help encourage the feature to be implemented sooner than later.
Having users that actually want to use a feature is great motivation for implementing it!
In the mean time, let me see if I can help find an alternative high-level solution to your problem.
Great, thank you! :D
Please sign in to leave a comment.