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

Feature/emission constraint #39

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open

Conversation

yechenyan
Copy link
Collaborator

@yechenyan yechenyan commented Sep 9, 2024

This new function, process_emission_constraint_inputs(processes_raw), aims to refine the handling of emission constraint data. Below is the detailed workflow and expected transformation:

The input(processes_raw) to the function is a pandas DataFrame as shown below:

process input output
battery storage electricity electricity
energy transformation unit ch4 co2, [electricity, heat]
co2, [electricity, heat] onshore electricity
x2x_other_dac_ht_1 sec_elec, sec_heat_high emi_co2_neg_air_dacc
x2x_other_dac_lt_1 sec_elec, sec_heat_low emi_co2_neg_air_dacc
ind_other_ind_boiler_coal_0 pri_coal iip_heat_high, emi_co2_f_ind, emi_ch4_f_ind, emi_n2o_f_ind
ind_constraint_co2eq

The return value of the function is a pandas DataFrame, which update the last row as below:

process input output
ind_constraint_co2eq emi_co2_neg_air_dacc, emi_co2_f_ind, emi_ch4_f_ind, emi_n2o_f_ind

Processing Steps:

  1. If there's a row in the table where the process is ind_constraintco_2eq, then execute the subsequent steps.

  2. Take all the values in the output column that start with emi, remove duplicates, and place them into the input field of the row where the process is ind_constraintco_2eq.

Beside, implement necessary test cases to verify the function's effectiveness and accuracy.

@yechenyan yechenyan changed the title Feature/emmission constrant Feature/emission constraint Sep 9, 2024
Copy link
Contributor

@SabineHaas SabineHaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @yechenyan! looks good to me!
I won't merge, as I am not sure whether it will be part of this adapter or another repo.
However, I have used the function to get all the inputs for the emission constraint, which was very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants