Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transport/bev adapter #73

Open
wants to merge 23 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add BevAdapter (WIP).
  • Loading branch information
JonasJeckstadt committed Feb 15, 2024
commit 4180dc8d18f4ac7e89d912825ef86d6897b11654
10 changes: 10 additions & 0 deletions data_adapter_oemof/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,18 @@ class VolatileAdapter(Adapter):
type = "volatile"
facade = facades.Volatile

class Bev(Adapter):
"""
BevAdapter
"""

type = "bev"
facade = facades.Bev


# Create a dictionary of all adapter classes defined in this module
FACADE_ADAPTERS = {
name: adapter for name, adapter in globals().items() if name.endswith("Adapter")
}


69 changes: 50 additions & 19 deletions examples/transport/data_adapter_transport.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import os

os.makedirs("./collections", exist_ok=True)
os.makedirs("./structures", exist_ok=True)

os.environ["COLLECTIONS_DIR"] = "./collections/"
os.environ["STRUCTURES_DIR"] = "./structures"

Expand All @@ -9,30 +12,29 @@

from data_adapter_oemof.build_datapackage import DataPackage # noqa: E402

os.makedirs("./collections", exist_ok=True)
os.makedirs("./structures", exist_ok=True)

download_collection(
"https://databus.openenergyplatform.org/nailend/collections/emob_test_collection_1"
)
# download_collection(
# "https://databus.openenergyplatform.org/nailend/collections/emob_test_collection_1"
# )

structure = Structure("SEDOS_Modellstruktur", process_sheet="Processes_transport")
adapter = Adapter(
"steel_industry_test_adapted",
structure = Structure("sedos_johannes_emob", process_sheet="Processes_tra_road_car")
transport_adapter = Adapter(
"transport_test_adapter",
structure=structure,
)
process_adapter_map = {
"modex_tech_storage_battery": "StorageAdapter",
"modex_tech_generator_gas": "ConversionAdapter",
"modex_tech_wind_turbine_onshore": "VolatileAdapter",
"modex_demand": "LoadAdapter",
"pow_combustion_gt_natgas": "ConversionAdapter",
"x2x_import_natural_gas": "CommodityAdapter",
"x2x_import_crudesteel": "CommodityAdapter",
"x2x_import_coke_oven_gas": "CommodityAdapter",
"x2x_import_h2": "CommodityAdapter",
"ind_steel_casting_1": "MIMOAdapter",
"ind_steel_demand": "LoadAdapter",
"tra_road_mcar_fcev_pass_0": "ConversionAdapter",
"tra_road_mcar_fcev_pass_1": "ConversionAdapter",
"tra_road_mcar_bev_pass_0": "BevAdapter",
"tra_road_mcar_bev_pass_1": "BevAdapter",
"tra_road_mcar_hyb_pass_gasoline_0": "ConversionAdapter",
"tra_road_mcar_hyb_pass_gasoline_1": "ConversionAdapter",
"tra_road_mcar_hyb_pass_diesel_0": "ConversionAdapter",
"tra_road_mcar_hyb_pass_diesel_1": "ConversionAdapter",
"tra_road_mcar_ice_pass_gasoline_0": "ConversionAdapter",
"tra_road_mcar_ice_pass_gasoline_1": "ConversionAdapter",
"tra_road_mcar_ice_pass_diesel_0": "ConversionAdapter",
"tra_road_mcar_ice_pass_diesel_1": "ConversionAdapter"
}

parameter_map = {
Expand All @@ -53,6 +55,35 @@
"outflow_conversion_factor": "output_ratio",
},
"modex_tech_wind_turbine_onshore": {"profile": "onshore"},
"BevAdapter": {
# "tabular": "capacity_e_inst", #todo: ?
"charging_power_flex": "capacity_tra_connection_flex_max",
"availability_flex": "capacity_tra_connection_flex_timeseries_upper",
"charging_power_inflex": "capacity_tra_connection_inflex_max",
"availability_inflex": "capacity_tra_connection_inflex_timeseries_fixed",
# "tabular": "capacity_tra_vehicles_inst", #todo: ?
"fixed_costs": "cost_fix_tra",
# "tabular": "cost_inv_tra", #todo: ?
# "tabular": "cost_var", # part of DEFAULT
# "tabular": "demand_annual", #todo: ?
# "tabular": "demand_timeseries_fixed", #todo: ?
"efficiency_sto_in": "efficiency_sto_in",
"efficiency_sto_out": "efficiency_sto_out",
"efficiency_mob_electrical": "efficiency_tra_electrical",
"efficiency_mob_g2v": "efficiency_tra_g2v",
"efficiency_mob_v2g": "efficiency_tra_v2g",
"lifetime": "lifetime",
# "tabular": "mileage", #todo: ?
# "tabular": "occupancy_rate", #todo: ?
# "tabular": "share_tra_flex_g2v", #todo: ?
# "tabular": "share_tra_flex_v2g", #todo: ?
# "tabular": "share_tra_inflex", #todo: ?
# "tabular": "sto_init", #todo: ?
"max_storage_level": "sto_max_timeseries",
"min_storage_level": "sto_min_timeseries",
"loss_rate": "sto_self_discharge",
# "tabular": "wacc", #todo: ?
},
}

dp = DataPackage.build_datapackage(
Expand Down