EnergySystemsModellingLab / MUSE_OS

Welcome to the MUSE-OS repository
https://muse-os.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 8 forks source link

Lexical comparison fails with objective value equal to zero [BUG] #250

Open LennartMorlock opened 3 months ago

LennartMorlock commented 3 months ago

Describe the bug

A clear and concise description of what the bug is, including error messages.

When using the lexical_comparison decision method with an objective that can get zero for some technologies (e.g. fuel consumption costs of a solar heating technology), the bin size becomes zero leading to Inf and NaN when the replacements are binned.

The decision method doesn't necessarily throw an error in that case. However, the ranking of the options does not work properly since the values that are used to determine the ranking are all Inf or NaN.

Expected behavior

A clear and concise description of what you expected to happen.

To solve this I think either the objective value should never be zero or the lexical_comparison function should have a safeguard for that case.