AI4OPT / OPFGenerator

Instance generator for OPF problems
MIT License
2 stars 3 forks source link

Export solver primal/dual objective value #73

Closed mtanneau closed 3 months ago

mtanneau commented 3 months ago

This PR

I had to add a safeguard for dealing with NaN / Inf values in primal/dual objectives. A solver may returned those when an instance is primal or dual infeasible, or when an error is encountered during solving. In such case, the primal/dual objective value in the result dictionary may be NaN, Inf or -Inf

However, JSON does not support those values. As a consequence, when reading the JSON file from disk back into memory, all such values will read as nothing. Notes:

ivanightingale commented 3 months ago

It seems that you still have res["objective_lb"] = -Inf in all the formulations instead of setting it to the dual objective value. Is this intended?

mtanneau commented 3 months ago

It is not intended. Thanks for catching that.