BrunoRosendo / master-thesis

Source code for my master's thesis, in the topic "Quantum algorithms for optimizing urban transportation"
MIT License
5 stars 0 forks source link

Try to generalize QUBO independetly of framework used #60

Closed BrunoRosendo closed 5 months ago

BrunoRosendo commented 5 months ago

This problem came because CPLEX and DWave implementations are very similar, even though they use different frameworks. It would be different to refactor the code so that I have an adapter to both frameworks and can simply set vars/constraints/objective one time

BrunoRosendo commented 5 months ago

I also think solution conversion should be in the models while build_var_dict should be in the solvers

BrunoRosendo commented 5 months ago

Since creating all the logic about linear expressions, iterators, vars, etc. would be too much trouble, I'm thinking of instead using either cplex or dimod for my custom model and then adapt to the other.

I need to weight the advantages and disadvantages of each

BrunoRosendo commented 5 months ago

CPLEX good points:

CPLEX bad points:

dimod good points:

dimod bad points:

Based on this analysis, I think cplex is slightly better. However, converting linear expressions from one model to the other will be tricky...

BrunoRosendo commented 5 months ago

Tomorrow I'll try this approach. I think if I use cplex and the tuple version of dimod for conversion then it's not too bad

BrunoRosendo commented 5 months ago

the refactor went well but there's some kind of bug. The trip requests in RPP are not being respected in either of the solvers