Describe the bug
When adding a new component in the database, with a zero interest rate, the calculation of the total cost results into a Nan value, which in turn causes the optimizer to infinitely iterate in the emo.py/sortNDHelperA function since the values from the pareto front cannot be compared. The calculation of the cost is performed in analysis/costs/equations/calc_capex_annualized.
To Reproduce
Steps to reproduce the behavior:
Introduce a new component in the component.py and in the database Conversion_new.xlsx with an IR = 0
Run the domain.py for the optimisation of the system.
Obtained error: RecursionError: maximum recursion depth exceeded while calling a Python object
Expected behaviour
The IR set at zero will lead to a division by zero due to the way the equation is written, leading to all the failure of the optimisation. The code should check the value before performing the operation in order to avoid Nan values which would break the run.
Describe the bug When adding a new component in the database, with a zero interest rate, the calculation of the total cost results into a Nan value, which in turn causes the optimizer to infinitely iterate in the emo.py/sortNDHelperA function since the values from the pareto front cannot be compared. The calculation of the cost is performed in analysis/costs/equations/calc_capex_annualized.
To Reproduce Steps to reproduce the behavior:
Expected behaviour The IR set at zero will lead to a division by zero due to the way the equation is written, leading to all the failure of the optimisation. The code should check the value before performing the operation in order to avoid Nan values which would break the run.