Open trevorb1 opened 1 year ago
Perhaps it is due to the fill_value=0.0
in line 389 data = emissions_penalty.div(discount_factor_mid, fill_value=0.0)
. The fill_value
argument replaces missing data with the given value. I guess this is causing a divide by 0 error when no discount_factor_mid
is computed.
The Issue
If there is no emissions penalty, and you try to calculate results for a single year model, the calculation of
DiscountedTechnologyEmissionsPenalty
fails, and the following error is thrown:I have replicated the issue on two different models, and provided simplicity as an example below. I think I have isolated it to having to be a single year model with no emissions penalty. A single year model with an emissions penalty works fine, and a multi-year model without an emissions penalty works fine
Expected Behavior
I would expect the conversion to happen correctly
Steps To Reproduce
otoole -v results cbc csv model.sol results/ config.yaml --input_datafile data.txt
Log output
Operating System
Linux
What version of otoole are you running?
1.0.3
Possible Solution
The error points to this location in the code with line 389 throwing the actual error.
https://github.com/OSeMOSYS/otoole/blob/56baf80da81b03f13ff772cab5664cc7967d1fa8/src/otoole/results/result_package.py#L363-L394
If you print out the variables is the
try
block, these are them below:This seems correct, so idk whats going on 😅
Anything else?
OSeMOSYS.txt simplicity.txt
config.yaml