From bd651e47b2b5bc3e3254deaa29bbdb61a3b747f8 Mon Sep 17 00:00:00 2001 From: JensZack Date: Mon, 11 Nov 2024 08:40:25 -0700 Subject: [PATCH] feat: export fuel curves for plexos (#77) --- src/r2x/exporter/plexos.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/r2x/exporter/plexos.py b/src/r2x/exporter/plexos.py index ed6b1001..694df914 100644 --- a/src/r2x/exporter/plexos.py +++ b/src/r2x/exporter/plexos.py @@ -995,10 +995,12 @@ def _variable_type_parsing(component: dict, cost_dict: dict[str, Any]) -> dict[s component["Heat Rate"] = function_data["proportional_term"] case "InputOutputCurve": raise NotImplementedError("`InputOutputCurve` not yet implemented on Plexos exporter.") - if fuel_cost := fuel_curve.get("fuel_cost"): - component["Fuel Price"] = fuel_cost - if vom_cost := fuel_curve.get("vom_cost"): - component["VO&M Charge"] = vom_cost["function_data"]["proportional_term"] case "CostCurve": - raise NotImplementedError("`CostCurve` operational cost not yet implemented on Plexos exporter.") + pass + + if fuel_cost := fuel_curve.get("fuel_cost"): + component["Fuel Price"] = fuel_cost + if vom_cost := fuel_curve.get("vom_cost"): + component["VO&M Charge"] = vom_cost["function_data"]["proportional_term"] + return component