openego / eGon-data

GNU Affero General Public License v3.0
10 stars 4 forks source link

Inject eMob MIT timeseries into pypsa-eur-sec workflow #836

Open nesnoj opened 2 years ago

nesnoj commented 2 years ago

Tasks

The following p-e-s components/vars are relevant, the data can be obtained from the eTraGo tables:

PS: There're some more params that need to be set (e.g. electric_share) but we can tackle this later.

Snippets

(1) EgonPfHvLoadTimeseries.p_set

with db.session_scope() as session:
    query = session.query(
        EgonPfHvLoad.bus.label("bus_el_id"),
        EgonPfHvLoad.load_id.label("load_id"),
        EgonPfHvLoadTimeseries.p_set,
    ).select_from(
        EgonPfHvLoad,
    ).join(
        EgonPfHvLoadTimeseries,
        EgonPfHvLoadTimeseries.load_id == EgonPfHvLoad.load_id
    ).filter(
        EgonPfHvLoad.scn_name == "eGon100RE_lowflex",
        EgonPfHvLoad.carrier == "land transport EV",
        EgonPfHvLoadTimeseries.scn_name == "eGon100RE_lowflex",
    )
charging_load_ts = pd.read_sql(
    query.statement,
    query.session.bind,
    index_col=None
)

(2) EgonPfHvLink.p_nom and EgonPfHvLinkTimeseries.p_max_pu

with db.session_scope() as session:
    query = session.query(
        EgonPfHvLink.bus0.label("bus_el_id"),
        EgonPfHvLink.link_id.label("link_id"),
        EgonPfHvLink.p_nom,
        EgonPfHvLinkTimeseries.p_max_pu,
    ).select_from(
        EgonPfHvLink,
    ).join(
        EgonPfHvLinkTimeseries,
        EgonPfHvLinkTimeseries.link_id == EgonPfHvLink.link_id
    ).filter(
        EgonPfHvLink.scn_name == "eGon100RE",
        EgonPfHvLink.carrier == "BEV charger",
        EgonPfHvLinkTimeseries.scn_name == "eGon100RE",
    )
charging_load_ts = pd.read_sql(
    query.statement,
    query.session.bind,
    index_col=None
)
charging_load_ts

(3) EgonPfHvStore.e_nom

with db.session_scope() as session:
    query = session.query(
        EgonPfHvStore.bus.label("bus_el_id"),
        EgonPfHvStore.store_id.label("store_id"),
        EgonPfHvStore.e_nom,
    ).filter(
        EgonPfHvStore.scn_name == "eGon100RE",
        EgonPfHvStore.carrier == "battery storage"
    )
storages = pd.read_sql(
    query.statement,
    query.session.bind,
    index_col=None
)
storages
ClaraBuettner commented 8 months ago

@birgits and @nesnoj: I found this issue concerning the e-Mobility integration into pypsa-eur. Is that still up to date?

nesnoj commented 8 months ago

@birgits and @nesnoj: I found this issue concerning the e-Mobility integration into pypsa-eur. Is that still up to date?

Yes, I think so - eMob MIT has never been integrated into p-e-s for eGon100RE.