osemosys_global icon indicating copy to clipboard operation
osemosys_global copied to clipboard

[BUG]: Adding `CCG` as a `no_invest` technology breaks workflow

Open trevorb1 opened this issue 2 years ago • 1 comments

Conda environment check

  • [X] I have tried using the osemosys-global conda environment.

Current Behavior

If you add CCG as a no_invest technology, an extra PWRCCGxxxxx00 technology is written out to the the TotalAnnualMaxCapacityInvestment csv file. This leads to a double definition error thrown by glpk

Expected Behavior

Only one PWRCCGxxxxx00 is written out to the the TotalAnnualMaxCapacityInvestment csv file

Steps To Reproduce

  1. Add CCG to the no_invest technology list in the config file
  2. Run the workflow with snakemake -c

Operating System

Linux

Log output

GLPSOL--GLPK LP/MIP Solver 5.0
Parameter(s) specified in the command line:
 -m resources/osemosys_fast_preprocessed.txt -d results/India/PreProcessed_India.txt
 --wlp results/India/India.lp --check
Reading model section from resources/osemosys_fast_preprocessed.txt...
1130 lines were read
Reading data section from results/India/PreProcessed_India.txt...
results/India/PreProcessed_India.txt:31346: TotalAnnualMaxCapacityInvestment[GLOBAL,PWRCCGINDSO00,2020] already defined
Context: ...49 0 GLOBAL PWRBIOINDSO01 2050 0 GLOBAL PWRCCGINDSO00 2020 0
MathProg model processing error

Anything else?

I think the cause of this is the two CCG options in OG. PWRCCGxxxxx00 is assigned to all existing CCG plants as they have slightly worse efficiencies then new CCG plants. To prevent investment in them, all PWRCCGxxxxx00 techs are assigned a TotalAnnualMaxCapacityInvestment value of 0 by default, and the model can only invest in new high efficiecny CCG plants, PWRCCGxxxxx01.

When we add CCG to the no-invest technology list, both PWRCCGxxxxx00 and PWRCCGxxxxx01 are added to the TotalAnnualMaxCapacityInvestment data. However, since PWRCCGxxxxx00 is already there by default, it gets defined twice.

trevorb1 avatar Jun 15 '23 22:06 trevorb1

@trevorb1 honestly the easiest solution here I to just remove the entire two CCG options. We do not define different efficiencies/capacity factors for old/new plants for other technologies either so I don't see why we have to do that for CCG (I can't recall why we implemented this in the first place). Of course a better solution would be to allow users to set efficiencies for existing and new plants by technology in the user config file or to implement technology learning curves. That said, I don't think either should be a priority.

maartenbrinkerink avatar Sep 06 '24 12:09 maartenbrinkerink