Assignment - 2The Electrical Power Generation problem that his assignment is based on is explainedherePlease read the problem description in the notebook and answer the following questions.Note: The...

1 answer below »

Assignment - 2


The Electrical Power Generation problem that his assignment is based on is explainedhere


Please read the problem description in the notebook and answer the following questions.


Note: The conditions provided in the questions are for each question and do not carry over between questions.


#Toinstallgurobipyuncommentfollowingcommandthisworksoncolab,#otherwisefollowtheinstruction%pipinstallgurobipyimportpandasaspdimportgurobipyasgpfromgurobipyimportGRBimportmatplotlib.pyplotaspltimportnumpyasnp


Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting gurobipy Downloading gurobipy-9.5.2-cp37-cp37m-manylinux2014_x86_64.whl (11.5 MB) K |████████████████████████████████| 11.5 MB 26.5 MB/s ?25hInstalling collected packages: gurobipy Successfully installed gurobipy-9.5.2


Question-1: Assumptions:



  • Modify the number of generators that are assumed to be on at the first period to zero for all generators. Compare the results and explain them.

  • Modify the number of generators that are assumed to be on at the first period to 12 for type 0, 2 for type 1, and zero for type 2. Compare the results with the zero number and five number of all types of generators.


Question-2: Reliability trade-offs


In the original formulation the selected generators must be able to cope with a %15 excess in demand. The requirements are changed and the demands have to be satisfied by 15, 25, 5, 40, and 10 percent more than the predicted demand for each period, respectively. Solve the optimization problem with these new requirements and plot the demand vs time and the max_power of the running generators.


Then, assume there is a real_demand that is a Guassian random variable that has a mean value equal to the previously given demand and a standard deviation of 1500. Plot the real demand vs time after taking one sample from the Gaussian distribution for each time period and also plot the max_power of running generators on the same plot.


Question-3: More constraints:


Solve the questions with the following additional constraints:


If X number of generators type-1 are on, at least X/3 number of generators Type-2 must be on; and at least 4 generators of any type at each period of time have to be started up.


Question-4: Gradual changes in demands


What if the demands change gradually every hour with the following models: Linearly in period 1 from 1500 to 3000, exponentially in period 2 from 3000 to 2000, again exponentially in period 3, from 2000 to 4500 then linearly in period 4 from 4500 to 2000 and finally a sudden drop at the end of period 5 from 2000 to 1500


First, plot the time vs demand chart. Then, solve the optimization problem with the new demands reported and determine all the optimum times the generators of different types have to be turned on and shut down. Plot the chart for time vs the number of generators of each type.


#LINEARdefline(x,A):return(A[3]-A[2])/(A[1]-A[0])*(x-A[0])+A[2]#PERIOD2defexp_1(x):return6750*np.exp(-0.1352*x)#PERIOD3defexp_2(x):return592.5926*np.exp(0.1352*x)


#discritizationto30mind=0.5time=np.arange(0,24,d)period_hours=[6,3,6,3,6]start_time=[0,6,9,15,18,0]start_point=[1500,3000,2000,4500,2000]j=0tp=0y=[]fortintime:ift==tp:j+=1tp=start_time[j]ifj==1:y.append(line(t,[start_time[0],start_time[1],start_point[0],start_point[1]]))ifj==2:y.append(exp_1(t))ifj==3:y.append(exp_2(t))ifj==4:y.append(line(t,[start_time[3],start_time[4],start_point[3],start_point[4]]))ifj==5orj==0:y.append(2000)plt.plot(time,y)


[]


i7DPtjmkbiUiQ2jp3QOEAP9xwmcgIq8Ck2kpo1sCPAC8DSwABtFSpvsyY0zAnuhs5zOYTMvQjgHygBvbjG8HFBE5DVgOrAOareZf0TKu75jvwdEEZNJXSil1ZIE4vKOUUqodmvSVUspBNOkrpZSDaNJXSikH0aSvlFIOoklfKaUcRJO+Uko5yP8HwORpLVRbVasAAAAASUVORK5CYII=
Answered 1 days AfterNov 14, 2022

Answer To: Assignment - 2The Electrical Power Generation problem that his assignment is based on is...

Sathishkumar answered on Nov 15 2022
38 Votes
Document2
This assignment requires you to develop an application using TypeScript for Part 1 and
Angular for Part 2 to demonstrate your knowledge of the TypeScript language and Angular

framework. Your apps should be standalone apps without server contact for data. The app
will not save data after the browser window is closed, but you will need to maintain a
JavaScript structure (e.g. JavaScript object, Class, Interface) so that changes made remain
while the browser window is open. Part 2 can be an expansion of Part 1 though you can
start again from scratch if you wish. It is recommended that you save your Part 1 before you
start modifying it for Part 2. For lesser marks, you can divide your assignment into several
smaller HTML pages to demonstrate the different aspects without having everything
working together. This is not the preferred method.

Part 1 – Basic TypeScript App (18 marks)
The aim is to develop a simple TypeScript app for a medical clinic to maintain a small
database of patient information while the browser window is open. You can initialise your
app with hard-coded data or start with an empty data structure. Types are important in your
code; however, there is no need to type everything, and the general applicability of typing is
as you have seen in Module 2 of the unit. For example, there is no need to define
a function type in a function definition as TypeScript, and the reader can easily deduce the
type from the function definition. You will have to type parameters and return values,
though. Marks may be deducted for too few type definitions, i.e. writing JavaScript instead
of TypeScript.
The Patient data has the following fields:
• Patient ID *
• First name *
• Last name *
• Date of birth *
• Gender (“Female”, “Male”, “Unspecified”) *
• Primary insurance (“Medicare”, “Private Health...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here