Reformulating Integer to binary
I have an objective function (minimize) Z = 3x + 2y
As per the "problem solving handbook" the second step is to reformulate an integer problem to use binary variables.
x and y are integers. How can I convert these to binary?
Any suggestions will be appreciated.
Thank you for reaching out.
In the problem solving handbook you are referring to, there is an illustrative example of a simple map coloring problem which can walk you through a step by step guide on translating integer variables to binary.
If x and y integer variables, are single valued variables which take values from some finite discrete set, DQM (Discrete Quadratic Models) might be a great option, as well. That way you don’t have to translate x and y to binary variables.
Here’s the official documentation containing an example on constructing a DQM:
Additional resources for DQM hybrid solver, to solve the DQM problem you construct:
Video tutorial: https://youtu.be/rOrvvF-xjD4
Please let me know if you think this will work for your problem. If you'd like, I can also elaborate on the code example or the process for building a DQM problem. I hope this helps!
Thanks. This helps.
Please sign in to leave a comment.