Open gnawin opened 2 months ago
@marnoldus @greg-neustroev as mentioned here (https://github.com/TulipaEnergy/NearOptimalAlternatives.jl/pull/13#issuecomment-2150166607) here are some extras for the existing code. Most of them are just naming suggestions, but maybe the question (for l31 in results.jl
) is worth a comment from you? Thanks!
@gnawin what I intend to store in the results are the solutions themselves and their objective value to the original problem. The optimality gap constraint (original objective) will be something like: $c^T x \geq (1 - \gamma)c^T x^*$. I believe the value function will return the left-hand side of the constraint, so the objective value to the old problem but for the new solution. I agree that this is not completely clear from this piece of code, so a bit more documentation on this can be useful. Let me know if you have any questions!
Here are some (minor) suggestions that will improve the readability of the code while going through the repo.
https://github.com/TulipaEnergy/NearOptimalAlternatives.jl/blob/main/src/alternative-optimisation.jl:
so the sum of the distance between the new solution and each of the previous solutions is maximized
to the commenthttps://github.com/TulipaEnergy/NearOptimalAlternatives.jl/blob/main/src/results.jl:
push!(results.objective_values, objective_value(model))
? What do we want to store here?https://github.com/TulipaEnergy/NearOptimalAlternatives.jl/blob/2-mga-metaheuristics/src/generate-alternatives.jl: