Skip to main content

Model not finding maximum




  • Marika Karbstein
    Gurobi Staff Gurobi Staff

    Your code is not directly reproducible but so far I cannot see anything suspicious. Could you explain why you think that your code does not find a maximum weighted matching?

    If you know an optimal solution that is not found with your model, you could check what happens if you fix your variables to this solution. If the resulting model is infeasible, something might be wrong with your model formulation, and the article How do I determine why my model is infeasible? – Gurobi Help Center could help.

  • Snorre Åldstedt
    First Comment
    First Question

    I found the fault, the code didn't account for parallel edges, so if there was parallel edges, the dictionary x only took the last value that it read. Otherwise I think the code is okay


Please sign in to leave a comment.