TulipaEnergy / NearOptimalAlternatives.jl

A package implementing modelling to generate alternatives (MGA) to find near optimal alternatives to the optimal solution.
Apache License 2.0
0 stars 1 forks source link

Make the names more understandable #22

Open gnawin opened 2 months ago

gnawin commented 2 months ago

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:

https://github.com/TulipaEnergy/NearOptimalAlternatives.jl/blob/main/src/results.jl:

https://github.com/TulipaEnergy/NearOptimalAlternatives.jl/blob/2-mga-metaheuristics/src/generate-alternatives.jl:

gnawin commented 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!

marnoldus commented 2 months ago

@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!