Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I ONLY WANT ANSWER FOR QUESTION NO. 3-5 FULLY WITH CODE AND COMMENTS INCLUDED . INSTRUCTIONS FOR Q.3 ARE INCLUDED . AND Q.1 AND 2
I ONLY WANT ANSWER FOR QUESTION NO. 3-5 FULLY WITH CODE AND COMMENTS INCLUDED .
INSTRUCTIONS FOR Q.3 ARE INCLUDED .
AND Q.1 AND 2 IS BEEN ANSWERED ALREADY SO PLEASE DONT ATTEMPT THEM
I WANT ANSWER ASAP ,
PLEASE HELP ME OUT WITH THIS I AM STUCK .
Example of mcp and smp:
period | mcp | smp |
2001-11-22 0:00 | 4000.01 | 1475 |
2001-11-22 1:00 | 2483.57 | 1475 |
2001-11-22 2:00 | 1999.97 | 1500 |
2001-11-22 3:00 | 1999.98 | 1500 |
KUPST cost calculation for each wind farm in Turkey KUPST is the cost of a power plant p that incurs when its generation deviates from its production plan. It is calculated hourly. Each hour in a month is called period denoted by t. In this homework, you will calculate the KUPST for each wind farm in Turkey during November 2022 such that tT where T={2022 11-01 00:00, 2022-11-01 01:00,,2022113023:00} and pP={ ADA-2 RES, ADARES RES(YGT), ..., ADAPAZARI RES } kudup Production plan for each period is called kudup, we store kudup values for each wind farm p in kudup.csv file which you can find in hw2.zip. In kudup.csv, the first column is "period" and the other columns show production plan (kudup) of wind farms in Turkey. To illustrate, For period = '2022-11-01 00:00' kudup value for wind farm 'ADA-2 RES' is 2.07. We can reprsent this in mathmematical notation as kudupp,t=2.07 for p=ADA2 RES and t=2022110100:00 generation Power generation values for each wind farm p is stored in generation.csv file which you can find in hw2.zip. In generation.csv, the first column is 'period' and the other columns show generation values of wind farms in Turkey for each period. To illustrate, For period = '2022-11-01 00:00' generation value for wind farm 'ADA-2 RES' is 0.8. We can reprsent this in mathmematical notation as generation g p,t=0.8 for p=ADA2 RES and t=2022110100:00. mcp and smp MCP and SMP are two different price values that have an impact on KUPST. MCP and SMP values in each period is stored in mcp_smp.csv file, which you can find in hw2.zip. In mop_smp.csv the first column shows period, the second column shows MCP and the third column shows SMP. KUPST calculation In order to calculate KUPST, you need to calculate the absolute deviation between generation and kudup for wind farm p in period t, i.e., deviationp,t=Generationp,tKUDUPp,tpP,tT Absolute deviation that is above 10% of the KUDUP incures kupst cost for that wind farm p in period t, i.e., kupsmp,t={deviationp,tKUDUPp,t0.10ifdeviationnp,t>KUDUPp,t0.1o.w. and KUPST for wind farm p at period t is calculated as follows: kupstp,t=kupsmp,tmax(MCPt,SMPt)0.03forallpP,tT, where max shows the maximum value of MCP and SMP in period t. Unit KUPST Unit KUPST is a metric that shows the performance of the wind farm. The smallest unit kupst value a wind farm p has, the better it performs in terms of kupst. Unit kupst is calculated as follows: unitkupstp=tTgenerationp,ttTkupstp,t generation, respectively. M \#\# WRITE YOUR CODE here for question 1 mcp_smp =pd.read_csv ( "mcp_smp.csv") kudup = pd.read_csv ("kudup.csv") generation =pd.read_csv ("generation.csv") Quesiton 2: Convert 'period' column into datetime64 dtype and afterwards set 'period' as index for mcp_smp, kudup and generation. M \#\# WRITE YOUR CODE here for question 2 mcp_smp['period'] = mcp_smp['period'].astype('datetime64[ns]') mcp_smp.set_index("period", drop=True, append=False) kudup['period'] = kudup['period'] . astype('datetime64[ns [') kudup.set_index("period", drop=True, append=False) generation['period'] = generation['period'] .astype ( datetime64[ns]') generation.set_index("period", drop=True, append=False) Question 3: Check whether mcp_smp, kudup and generation covers all periods in T. If a period t is missing in at least one these dataframes (i.e., mcp_smp, kudup, and generation), drop the period t from the dataframe(s) that has t. M \#\# WRITE YOUR CODE here for question 3 ""*" Instructions: -. transformer the indexes into lists and subtracted from each other -. Generation - kudup - Generation - mcp_smp -. Kudup - mcp_SMP - This will let you know what time is missing -. Then you just delete that row manually old = set(kudup.index.values) new = set (generation.index.values) new_index = new_-old d) print (data) Question 4: Use previous DataFrames that have the same periods, drop the columns of generation for the wind farms where the total generation during November is 0 . Make sure kudup and generation have the same column names after dropping. D \#\# WRITE YOUR CODE here for question 4. Quesiton 5: Use previous DataFrames that have the same periods and the same column names and calculate deviation det p,t for all p Plants, tT. Store the data inside a new DataFrame called deviation. Note that; - Devation for a plant p in period t equals to the absolute value of the difference between power generation and KUDUP for that plant p in period t. - Tis the new set of periods after we drop the missing periods
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started