osemosys_global
osemosys_global copied to clipboard
[FEATURE]: Get expected otoole data/result files from the config file
Idea
Remove the csv files in resources/otoole/data, and just use the otoole config file to extract out the params and results.
Is your feature related to a bug?
No response
Suggested Soltuion
def get_otoole_data(otoole_config: str, var: str) -> list[str]:
"""Gets parameter/result files to be created"""
assert var in ("param", "result", "set")
with open(otoole_config) as f:
otoole = yaml.safe_load(f)
results = [x for x in otoole if otoole[x]["type"] == var]
missing = [
"NewStorageCapacity",
"NumberOfNewTechnologyUnits",
"SalvageValueStorage",
"StorageLevelDayTypeStart",
"StorageLevelDayTypeFinish",
"StorageLevelSeasonStart",
"StorageLevelSeasonFinish",
"StorageLevelYearStart",
"StorageLevelYearFinish",
"Trade",
]
return [x for x in results if x not in missing]
The missing accounts for some bugs with otoole where the result calculations are not implemented
Additional Info
No response