300984 Pavement Materials and Design School of Computing, Engineering and Mathematics Lab 2: Mechanistic design of flexible pavement 1. Aims 1.1 Understand the mechanistic procedures for designing a flexible pavement 1.2 Use of software CIRCLY to facilitate the design of flexible pavements 2. Materials and Equipment 2.1 CIRCLY v6.0 3. Introduction Mechanistic design of flexible pavements is covered in Austroads “Guide to Pavement Technology: Part 2: Pavement Structural Design”. This approach is based on small strain linear elastic analysis supplemented by empirical models defining the performance of different layers of the pavement structure. Today’s lab will require the use of CIRCLY to carry out the mechanistic design of flexible pavements. 4. Method This lab consists of two parts. 4.1. Part 1 (4 marks) Run CIRCLY for the 3 design cases given in Appendix K of Austroads “Pavement Technology Part 2: Pavement Structural Design” guide. These examples are explained in the “Appendix K Examples” file uploaded on vUWS. These cases are for: 1. Sprayed seal surfaced unbound granular pavement 2. Asphalt pavement containing a cemented material subbase 3. Full depth asphalt pavement 4.1.1. Part 1: Sprayed seal surfaced unbound granular pavement Step 1: Start CIRCLYv6.0 to open the interface shown in Fig 1: Step 2: Create a Jobname for your work by pressing the “New” icon on the menu. Enter the jobname. Generally speaking, you will work this program by progressing from icon on left to icon on right. Step 3: Click on “Layered System” under Job Details tree or the “Layers” icon. A “Layers” window will open on the right to display the existing cases of pavement layers (structure) stored in the database. A smaller auxiliary window displaying the pavement structure (layer number, layer material and layer thickness) of the case indicated by the pointer will also appear below the main window. You may create a new pavement structure by clicking on the “New” button at the right of the window. However, for Part 1, you will use existing example structures which are already in CIRCLY. Note that CIRCLY handles most of the input data using a relational database approach. This is designed to eliminate re-entry of data for design loads and material properties. The relational database approach gives maximum flexibility in data preparation. Figure 1 Step 4: Click on “DESA” under Job Details tree. Refer to the “Appendix K Examples” file and enter the design ESA for this example. Step 5: Click on “Traffic Multipliers” under Job Details tree. Enter the values of the traffic multipliers for the examples in Appendix K. The traffic multipliers are the damage index (SAR/ESA) values in Austroads guide. The damage index values are found on page 249 of the “Appendix K Examples” file. Step 6: Click on “Project Reliability” under Job Details tree. Enter the desired project reliability for this example. Step 7: By default the pointer in the main window and in the auxiliary window will point to the first row. Click on the “Austroads 2004 – Example 1 – Unbound Granular Pavement” case. In the auxiliary window, the pavement structure of this case will appear. Step 8: Click on the “Granular, E = 500MPa” in the subsidiary window. A “Material Properties” window will appear. You can select and change the material properties for the pavement layer from the “Material Properties” database. As new materials are being created (through the “Materials” icon), the properties are stored in the database to be used until deleted. Close the “Materials Properties” window as the correct material properties have already been selected for this example. Step 9: Click on “Materials” icon. The “Materials Properties” window will appear as the main window on the right. In the “Material Type” pull down menu, a selection of material type is available. You may add or delete material properties within a particular material type. Make sure the material properties are entered for the right material type. For this case, it may be noted that the granular material is from the “Unbound Granular (Austroads 2004 sub-layering)” material type. CIRCLY will therefore perform the sub-layering within the program if this material type is chosen. Since no new material is required to be added, proceed to the next step. Step 10: The layers, material properties and traffic design data for the “Sprayed seal surfaced unbound granular pavement” are now ready for analysis by CIRCLY. Click on the “Analyse” icon. CIRCLY will analyse the pavement layers and display the damage factor, CDF, corresponding to each pavement layer, where appropriate, in the right window. The damage factor in this case is the ratio of the design traffic to the allowable traffic in the pavement layer. Note the CDF value for the subgrade computed by CIRCLY and compare it with the value calculated from the example. This should be reported in the report. Step 11: Click on the “Print” icon and view the Job Summary file. At the end of the file, the critical strain computed by CIRCLY for the subgrade is reported. Compare and report the critical strain from CIRCLY and from the example published in Austroads. Save the Job Summary file and submit it as an attachment to your lab report. 4.1.2. Part 1: Asphalt pavement containing a cemented material subbase (pre-cracking) Step 1: Click on the “Layers” icon. Point to “Austroads 2004 – Example 2 – Asphalt Pavement containing Cemented Layer” by clicking on it. The pavement structure of this case will appear in the subsidiary window below. Step 2: Check the pavement structure data in the subsidiary window to make sure it corresponds to the data in the “Appendix K Examples” file. If necessary, amend the data to the original values. Step 3: Click on the “Analyse” icon to analyse this case. At the end of the analysis, CIRCLY will display the CDF for the pavement layers. Note the CDF values for the different damages in the pavement layers computed by CIRCLY and compare with the values calculated from the example. These should be reported in the report. Save the Job Summary file and submit it as an attachment to your lab report. Compare and report the critical strains from CIRCLY and from the example published in Austroads. Step 4: Check if the pavement structure is unacceptable because one or more of the CDF values is equal or greater than 1 (this will be highlighted in red). If a pavement is unacceptable, you may use CIRCLY to re-design the thickness of any pavement layer by pointing to any layer and ticking the “Design thickness of layer highlighted below” box in the “Analyse” window. Click “Analyse” for CIRCLY to re-evaluate the design thickness and produce a thickness value that is acceptable. 4.1.3. Part 1: Asphalt pavement containing a cemented material subbase (post-tcracking) Step 1: Click on the “Layers” icon. Point to “Austroads 2004 – Example 2 – Asphalt Pavement containing Cemented Layer” by clicking on it. If the pavement structure for this case has been amended, return the structure data to the original values. Step 2: Click on the “Layers” icon. Point to “Austroads 2004 – Example 2 – Post-cracked” case by clicking on it. The pavement structure of this case will appear in the subsidiary window below. Step 3: Check the pavement structure data in the subsidiary window to make sure it corresponds to the data in the “Appendix K Examples” file. If necessary, amend the data to the original values. Step 4: Click on the “Analyse” icon to analyse this case. At the end of the analysis, CIRCLY will display the CDF for the pavement layers. Note the CDF values for the different damages in the pavement layers computed by CIRCLY and compare with the values calculated from the example. These should be reported in the report. Save the Job Summary file and submit it as an attachment to your lab report. Compare and report the critical strains from CIRCLY and from the example published in Austroads. 4. 4.1.4. Part 1: Full depth asphalt pavement Step 1: Click on the “Layers” icon. Point to “Austroads 2004 – Example 3 – Full Depth Asphalt Pavement” by clicking on it. If the pavement structure for this case has been amended, return the structure data to the original values. Step 3: Check the pavement structure data in the subsidiary window to make sure it corresponds to the data in the “Appendix K Examples” file. If necessary, amend the data to the original values. Step 4: Click on the “Analyse” icon to analyse this case. At the end of the analysis, CIRCLY will display the CDF for the pavement layers. Note the CDF values for the different damages in the pavement layers computed by CIRCLY and compare with the values calculated from the example. These should be reported in the report. Save the Job Summary file and submit it as an attachment to your lab report. Compare and report the critical strains from CIRCLY and from the example published in Austroads. 4.2. Part 2 (6 marks) In Part 2, use CIRCLY to design a flexible asphalt pavement containing a cemented material subbase for Pacific Highway near Brunswick Heads heading north. The following information is given:  design traffic is a x 107 HVAG over 30 year period  subgrade design CBR = b%  Asphalt modulus size 14 mm mix = 2200 MPa  Asphalt modulus size 20 mm mix = 2500 MPa  Desired project reliability = c% WIM characteristics of the traffic at Pacific Highway near Brunswick Heads towards north may be obtained from Table D1 of Austroads guide, and part of the table is given below for easy reference. The only requirement is that the asphalt thickness must be at least 175 mm. Make appropriate assumptions regarding the properties of the other materials of the pavement. The values of a, b, c are assigned by practical group as shown in Table 1. In case of doubt, please seek advice of the demonstrator. Table 1: Practical group and assignment of a,b,c values Practical Group a b c Pr-01 Thursday 13:00 KW-Y.2.41 2 8 97.5 Pr-02 Thursday 11:00 KW-Y.2.41 3 4 95 Pr-03 Friday 9:00 KW-Y.2.42 4 5 90 Pr-04 Friday 13:00 KW-XB.1.02 5 4 85 Pr-05 Friday 11:00 KW-Y.2.41 4 8 80 Pr-06 Thursday 15:00 KW-Y.2.41 3 6 85 Pr-07 Tuesday 9:00 KW-Y.2.42 2 5 95 Pr-08 Thursday 9:00 KW-Y.2.41 5 5 97.5 Pr-09 Tuesday 15:00 KW-Y.2.42 4 5 90 Submit your written report online on vUWS through the submission box created for your group. Address all bold statements highlighted in red in your report. Include CIRCLY input file for Part 2 as an attachment.

300984 Pavement Materials and Design
School of Computing, Engineering and Mathematics
Lab 2: Mechanistic design of flexible pavement
1. Aims
1.1 Understand the mechanistic procedures for designing a flexible pavement
1.2 Use of software CIRCLY to facilitate the design of flexible pavements
2. Materials and Equipment
2.1 CIRCLY v6.0
3. Introduction
Mechanistic design of flexible pavements is covered in Austroads “Guide to Pavement Technology: Part 2: Pavement Structural Design”. This approach is based on small strain linear elastic analysis supplemented by empirical models defining the performance of different layers of the pavement structure. Today’s lab will require the use of CIRCLY to carry out the mechanistic design of flexible pavements.
4. Method
This lab consists of two parts.
4.1. Part 1 (4 marks)
Run CIRCLY for the 3 design cases given in Appendix K of Austroads “Pavement Technology Part 2: Pavement Structural Design” guide. These examples are explained in the “Appendix K Examples” file uploaded on vUWS. These cases are for:
1. Sprayed seal surfaced unbound granular pavement
2. Asphalt pavement containing a cemented material subbase
3. Full depth asphalt pavement
4.1.1. Part 1: Sprayed seal surfaced unbound granular pavement
Step 1: Start CIRCLYv6.0 to open the interface shown in Fig 1:
Step 2: Create a Jobname for your work by pressing the “New” icon on the menu. Enter the jobname. Generally speaking, you will work this program by progressing from icon on left to icon on right.
Step 3: Click on “Layered System” under Job Details tree or the “Layers” icon. A “Layers” window will open on the right to display the existing cases of pavement layers (structure) stored in the database. A smaller auxiliary window displaying the pavement structure (layer number, layer material and layer thickness) of the case indicated by the pointer will also appear below the main window.
You may create a new pavement structure by clicking on the “New” button at the right of the window. However, for Part 1, you will use existing example structures which are already in CIRCLY.
Note that CIRCLY handles most of the input data using a relational database approach. This is designed to eliminate re-entry of data for design loads and material properties. The relational database approach gives maximum flexibility in data preparation.
Figure 1
Step 4: Click on “DESA” under Job Details tree. Refer to the “Appendix K Examples” file and enter the design ESA for this example.
Step 5: Click on “Traffic Multipliers” under Job Details tree. Enter the values of the traffic multipliers for the examples in Appendix K. The traffic multipliers are the damage index (SAR/ESA) values in Austroads guide. The damage index values are found on page 249 of the “Appendix K Examples” file.
Step 6: Click on “Project Reliability” under Job Details tree. Enter the desired project reliability for this example.
Step 7: By default the pointer in the main window and in the auxiliary window will point to the first row. Click on the “Austroads 2004 – Example 1 – Unbound Granular Pavement” case. In the auxiliary window, the pavement structure of this case will appear.
Step 8: Click on the “Granular, E = 500MPa” in the subsidiary window. A “Material Properties” window will appear. You can select and change the material properties for the pavement layer from the “Material Properties” database. As new materials are being created (through the “Materials” icon), the properties are stored in the database to be used until deleted.
Close the “Materials Properties” window as the correct material properties have already been selected for this example.
Step 9: Click on “Materials” icon. The “Materials Properties” window will appear as the main window on the right. In the “Material Type” pull down menu, a selection of material type is available. You may add or delete material properties within a particular material type. Make sure the material properties are entered for the right material type.
For this case, it may be noted that the granular material is from the “Unbound Granular (Austroads 2004 sub-layering)” material type. CIRCLY will therefore perform the sub-layering within the program if this material type is chosen.
Since no new material is required to be added, proceed to the next step.
Step 10: The layers, material properties and traffic design data for the “Sprayed seal surfaced unbound granular pavement” are now ready for analysis by CIRCLY. Click on the “Analyse” icon.
CIRCLY will analyse the pavement layers and display the damage factor, CDF, corresponding to each pavement layer, where appropriate, in the right window. The damage factor in this case is the ratio of the design traffic to the allowable traffic in the pavement layer.
Note the CDF value for the subgrade computed by CIRCLY and compare it with the value calculated from the example. This should be reported in the report.
Step 11: Click on the “Print” icon and view the Job Summary file. At the end of the file, the critical strain computed by CIRCLY for the subgrade is reported. Compare and report the critical strain from CIRCLY and from the example published in Austroads. Save the Job Summary file and submit it as an attachment to your lab report.
4.1.2. Part 1: Asphalt pavement containing a cemented material subbase (pre-cracking)
Step 1: Click on the “Layers” icon. Point to “Austroads 2004 – Example 2 – Asphalt Pavement containing Cemented Layer” by clicking on it. The pavement structure of this case will appear in the subsidiary window below.
Step 2: Check the pavement structure data in the subsidiary window to make sure it corresponds to the data in the “Appendix K Examples” file. If necessary, amend the data to the original values.
Step 3: Click on the “Analyse” icon to analyse this case. At the end of the analysis, CIRCLY will display the CDF for the pavement layers.
Note the CDF values for the different damages in the pavement layers computed by CIRCLY and compare with the values calculated from the example. These should be reported in the report.
Save the Job Summary file and submit it as an attachment to your lab report. Compare and report the critical strains from CIRCLY and from the example published in Austroads.
Step 4: Check if the pavement structure is unacceptable because one or more of the CDF values is equal or greater than 1 (this will be highlighted in red). If a pavement is unacceptable, you may use CIRCLY to re-design the thickness of any pavement layer by pointing to any layer and ticking the “Design thickness of layer highlighted below” box in the “Analyse” window.
Click “Analyse” for CIRCLY to re-evaluate the design thickness and produce a thickness value that is acceptable.
4.1.3. Part 1: Asphalt pavement containing a cemented material subbase (post-tcracking)
Step 1: Click on the “Layers” icon. Point to “Austroads 2004 – Example 2 – Asphalt Pavement containing Cemented Layer” by clicking on it. If the pavement structure for this case has been amended, return the structure data to the original values.
Step 2: Click on the “Layers” icon. Point to “Austroads 2004 – Example 2 – Post-cracked” case by clicking on it. The pavement structure of this case will appear in the subsidiary window below.
Step 3: Check the pavement structure data in the subsidiary window to make sure it corresponds to the data in the “Appendix K Examples” file. If necessary, amend the data to the original values.
Step 4: Click on the “Analyse” icon to analyse this case. At the end of the analysis, CIRCLY will display the CDF for the pavement layers.
Note the CDF values for the different damages in the pavement layers computed by CIRCLY and compare with the values calculated from the example. These should be reported in the report.
Save the Job Summary file and submit it as an attachment to your lab report. Compare and report the critical strains from CIRCLY and from the example published in Austroads.
4. 4.1.4. Part 1: Full depth asphalt pavement
Step 1: Click on the “Layers” icon. Point to “Austroads 2004 – Example 3 – Full Depth Asphalt Pavement” by clicking on it. If the pavement structure for this case has been amended, return the structure data to the original values.
Step 3: Check the pavement structure data in the subsidiary window to make sure it corresponds to the data in the “Appendix K Examples” file. If necessary, amend the data to the original values.
Step 4: Click on the “Analyse” icon to analyse this case. At the end of the analysis, CIRCLY will display the CDF for the pavement layers.
Note the CDF values for the different damages in the pavement layers computed by CIRCLY and compare with the values calculated from the example. These should be reported in the report.
Save the Job Summary file and submit it as an attachment to your lab report. Compare and report the critical strains from CIRCLY and from the example published in Austroads.
4.2. Part 2 (6 marks)
In Part 2, use CIRCLY to design a flexible asphalt pavement containing a cemented material subbase for Pacific Highway near Brunswick Heads heading north. The following information is given:
 design traffic is a x 107 HVAG over 30 year period
 subgrade design CBR = b%
 Asphalt modulus size 14 mm mix = 2200 MPa
 Asphalt modulus size 20 mm mix = 2500 MPa
 Desired project reliability = c%
WIM characteristics of the traffic at Pacific Highway near Brunswick Heads towards north may be obtained from Table D1 of Austroads guide, and part of the table is given below for easy reference. The only requirement is that the asphalt thickness must be at least 175 mm. Make appropriate assumptions regarding the properties of the other materials of the pavement.
The values of a, b, c are assigned by practical group as shown in Table 1. In case of doubt, please seek advice of the demonstrator.
Table 1: Practical group and assignment of a,b,c values
Practical Group
a
b
c
Pr-01 Thursday 13:00 KW-Y.2.41
2
8
97.5
Pr-02 Thursday 11:00 KW-Y.2.41
3
4
95
Pr-03 Friday 9:00 KW-Y.2.42
4
5
90
Pr-04 Friday 13:00 KW-XB.1.02
5
4
85
Pr-05 Friday 11:00 KW-Y.2.41
4
8
80
Pr-06 Thursday 15:00 KW-Y.2.41
3
6
85
Pr-07 Tuesday 9:00 KW-Y.2.42
2
5
95
Pr-08 Thursday 9:00 KW-Y.2.41
5
5
97.5
Pr-09 Tuesday 15:00 KW-Y.2.42
4
5
90
Submit your written report online on vUWS through the submission box created for your group. Address all bold statements highlighted in red in your report. Include CIRCLY input file for Part 2 as an attachment.

Read More

The assignment has to pass through Turnitin. No copying materials Q# 1 (350WORDS) Describe how crowdsourcing might be used to develop creative elements for a campaign to reduce texting and driving. Q# 2 (3 page) Submit Assignment: Promotion Written Assignments in this course will build on each other. For example, the written assignment in Week 3 builds on the written assignment in Week 2. It is important to read the feedback provided along with your grade on each assignment. Paying attention to the feedback and incorporating suggested changes into the next assignment will help you develop a strong marketing plan and insure a better grade. Write a 3 page paper that covers the following points: 1. Describe the key messages you want your campaign to communicate to target audiences. 2. Explain who will serve as messengers for your campaign. Be sure to consider both who will deliver the messages and who could be a perceived sponsor. 3. Describe the creative strategies you will use including logos, taglines, copy (text), visuals, colors, scripts, actors, settings, or sounds. These creative strategies need to align with the communication channels that you choose to use. 4. Explain what communication channels you will use to reach the target audience. Use APA format for both the layout of the paper and the references you use. Use reference from credible sources to support the points you are making. It will be helpful to use the words in bold from the list of assignment requirements as headings in your paper to make sure you’ve covered all of the requirements. Note that the maximum number of pages listed for the assignment not including the title page or list of references will be read.

The assignment has to pass through Turnitin. No copying materials

Q# 1 (350WORDS)

Describe how crowdsourcing might be used to develop creative elements for a campaign to reduce texting and driving.

Q# 2 (3 page)

Submit Assignment: Promotion

Written Assignments in this course will build on each other. For example, the written assignment in Week 3 builds on the written assignment in Week 2. It is important to read the feedback provided along with your grade on each assignment. Paying attention to the feedback and incorporating suggested changes into the next assignment will help you develop a strong marketing plan and insure a better grade.

Write a 3 page paper that covers the following points:

1. Describe the key messages you want your campaign to communicate to target audiences.

2. Explain who will serve as messengers for your campaign. Be sure to consider both who will deliver the messages and who could be a perceived sponsor.

3. Describe the creative strategies you will use including logos, taglines, copy (text), visuals, colors, scripts, actors, settings, or sounds. These creative strategies need to align with the communication channels that you choose to use.

4. Explain what communication channels you will use to reach the target audience.

Use APA format for both the layout of the paper and the references you use. Use reference from credible sources to support the points you are making. It will be helpful to use the words in bold from the list of assignment requirements as headings in your paper to make sure you’ve covered all of the requirements.

Note that the maximum number of pages listed for the assignment not including the title page or list of references will be read.

Read More

Undergraduate Econometrics: Problem Set 4 Due: October 9th at 12:00 pm 0. Book Problems 3.4, 3.12, 3.13 (i,ii), 4.5, 4.10, 4.11 1. Playing with OVB In this le we learn about omitted variable bias through a simulation exercise. The le ovbSimulation.R which is attached with this assignment contains code that simulates the impact of running a single variable regression when U and X are correlated. In particular, it beings with the following regression equation: Y = 0 + 1X + U and allows for XU > 0. The code itself generates an estimate of ^ in 100 simulated datasets and stores the results in a data frame called betaData. This data frame contains two variables: BETAHAT and BIAS DUMMY. The rst variable is an estimated ^ from some sample and the second variable is a 0/1 variable for whether this variable is drawn from a biased or unbiased sample. a) Show that E(UjX) = 0 implies that E(UX) = 0. Then, explain why this means that OLS does not work if XU 6= 0. Hint: Use the law of total expectations on E(UXjX). b) At the bottom of the code is some space labeled Student Analysis. Here, ll in code to cal- culate the mean of the ^ estimates in each of the biased and unbiased samples. Also ll in the code to plot the overlapping densities. Both of these are commands from previous assignments. Hint: Your code should look something like: remember that to index a subset of data we can do betaData$BETAHAT[betaData$BIAS DUMMY==?] What goes in \?” c) At the top of the code is a variable which governs the correlation between X and U. First, set = 0 and run the code. Report the estimated means in the biased and unbiased samples. The true value of = 2. Perform a two-sided t-test for each sample on whether or not ^ is statistically dierent from 2. As a reminder, to do a t-test, rst calculate the mean and the standard deviation, then construct the t-statistic. You should report two separate t-statistics for this exercise (one for each of the 0/1 groups). d) Now set = :55. Plot the distribution of ^ by group. Then repeat (c) for the biased group. Is ^ now statistically signicantly dierent from 2? 1 e) Repeat (d) for = :01. Relative to the sampling variation in ^ , does the bias seem too important here? (No rigorous answer). f) Increase the sample size to N = 500 and rerun the code for = :5. What happens to the variance of ^ in both when samples are biased and not? What does this exercise suggest about the usefulness of having a large sample size when your estimator is biased? ??g) Optional problem for those interested in exploring computation. Increase the number of sam- ples to 500 (this is the S variable in the code). Fix the number of observations to 100 and let = :25. In this case, calculate the fraction of the time that you would estimate ^ to be statistically signicantly indistinguishable from 2 despite the bias. Hint: You will rst need to calculate the upper and lower bound on ^ at which you would not reject the null hypothesis with = 2 and the 2 ^ as calculated in the sample. 2. Do Doctors Aect Drinking? In this problem we will exploit the drinkData.Rdata dataset. This data is taken from \The Eect Of Physician Advice On Alcohol Consumption: Count Regres- sion With An Endogenous Treatment Eect, “by Donald S. Kenkel and Joseph V. Terza (Journal of Applied Econometrics, 16: 165-184 (2001)). The goal of this paper was to understand if doctors could impact people’s drinking activity. The authors do some sophisticated work to try and deal with concerns about causality. We will not replicate their methods. Instead, we will ignore issues related to omitted variable bias and focus on the tools of multiple regressions. There is a complete description of the dataset at the back of this problem set. a) First let us get a feel for the dataset. The variable DRINKS is the number of drinks an individual has had and the variable ADVISE is a 0/1 variable for whether a person’s doctor has told them to drink less. Report the mean number of drinks per person in each group. Similarly, calculate the mean education and income by group. Finally, what fraction of individuals in each group are between 30 and 40 and how many are between 40 and 50. Do a t-test for a dierence in group means of income and education. Do they appear to be dierent? b) What is a possible source of omitted variable bias in a regression of DRINKS on ADVISE? You may think about the variables above or something else. Remember: omitted variable bias has two ingredients. c) Regress DRINKS on ADVISE and do a one-sided signicance test on ADVISE. What is the sign 2 of ADVISE? Why do you think this might be the case? d) Now run the same regression but including income, education and all the age dummies as controls. Report the results (by hand). What happens to the coecient on advise? e) Do an F-test to determine if age does not matter for drinking habits. f) Create a variable called EVERDRINK that is a 0/1 variable for DRINKS being positive. Regress this on all age variables. Do an F-test to determine if the choice of whether to drink at all depends on age. 3 Variable Description DRINKS Total drinks over a two week period ADVISE Dummy variable for whether the individual has been told to drink less by a doctor. EDITINC Monthly income ($1000) AGE30 30 <age 40 AGE40 40 <age 50 AGE50 50 <age 60 AGE60 60 <age 70 AGEGT70 70 < age EDUC Years of schooling BLACK Black OTHER Non-white, non-black MARRIED Married WIDOW Widowed DIVSEP Divorced or separated EMPLOYED Employed UNEMPLOY Unemployed NORTHE Northeast MIDWEST Midwest SOUTH South MEDICARE Insurance through Medicare MEDICAID Insurance through Medicaid CHAMPUS Military insurance HLTHINS Health insurance REGMED Reg. source of care DRI See same doctor MAIORLIM Limits on major daily activ. SOMELIM Limits on some daily activ. HVDIAB Have diabetes HHRTCOND Have heart condition HADSTROKE Had stroke 4

Undergraduate Econometrics: Problem Set 4
Due: October 9th at 12:00 pm
0. Book Problems 3.4, 3.12, 3.13 (i,ii), 4.5, 4.10, 4.11
1. Playing with OVB In this le we learn about omitted variable bias through a simulation
exercise. The le ovbSimulation.R which is attached with this assignment contains code that
simulates the impact of running a single variable regression when U and X are correlated. In
particular, it beings with the following regression equation:
Y = 0 + 1X + U
and allows for XU > 0. The code itself generates an estimate of ^ in 100 simulated datasets and
stores the results in a data frame called betaData. This data frame contains two variables: BETAHAT
and BIAS DUMMY. The rst variable is an estimated ^ from some sample and the second variable is
a 0/1 variable for whether this variable is drawn from a biased or unbiased sample.
a) Show that E(UjX) = 0 implies that E(UX) = 0. Then, explain why this means that OLS does
not work if XU 6= 0. Hint: Use the law of total expectations on E(UXjX).
b) At the bottom of the code is some space labeled Student Analysis. Here, ll in code to cal-
culate the mean of the ^ estimates in each of the biased and unbiased samples. Also ll in the
code to plot the overlapping densities. Both of these are commands from previous assignments.
Hint: Your code should look something like: remember that to index a subset of data we can do
betaData$BETAHAT[betaData$BIAS DUMMY==?] What goes in \?”
c) At the top of the code is a variable which governs the correlation between X and U. First,
set = 0 and run the code. Report the estimated means in the biased and unbiased samples. The
true value of = 2. Perform a two-sided t-test for each sample on whether or not ^ is statistically
dierent from 2. As a reminder, to do a t-test, rst calculate the mean and the standard deviation,
then construct the t-statistic. You should report two separate t-statistics for this exercise (one for
each of the 0/1 groups).
d) Now set = :55. Plot the distribution of ^ by group. Then repeat (c) for the biased group. Is
^ now statistically signicantly dierent from 2?
1
e) Repeat (d) for = :01. Relative to the sampling variation in ^ , does the bias seem too important
here? (No rigorous answer).
f) Increase the sample size to N = 500 and rerun the code for = :5. What happens to the
variance of ^ in both when samples are biased and not? What does this exercise suggest about the
usefulness of having a large sample size when your estimator is biased?
??g) Optional problem for those interested in exploring computation. Increase the number of sam-
ples to 500 (this is the S variable in the code). Fix the number of observations to 100 and let
= :25. In this case, calculate the fraction of the time that you would estimate ^ to be statistically
signicantly indistinguishable from 2 despite the bias. Hint: You will rst need to calculate the
upper and lower bound on ^ at which you would not reject the null hypothesis with = 2 and the
2
^
as calculated in the sample.
2. Do Doctors Aect Drinking? In this problem we will exploit the drinkData.Rdata dataset.
This data is taken from \The Eect Of Physician Advice On Alcohol Consumption: Count Regres-
sion With An Endogenous Treatment Eect, “by Donald S. Kenkel and Joseph V. Terza (Journal
of Applied Econometrics, 16: 165-184 (2001)). The goal of this paper was to understand if doctors
could impact people’s drinking activity. The authors do some sophisticated work to try and deal
with concerns about causality. We will not replicate their methods. Instead, we will ignore issues
related to omitted variable bias and focus on the tools of multiple regressions. There is a complete
description of the dataset at the back of this problem set.
a) First let us get a feel for the dataset. The variable DRINKS is the number of drinks an
individual has had and the variable ADVISE is a 0/1 variable for whether a person’s doctor has
told them to drink less. Report the mean number of drinks per person in each group. Similarly,
calculate the mean education and income by group. Finally, what fraction of individuals in each
group are between 30 and 40 and how many are between 40 and 50. Do a t-test for a dierence in
group means of income and education. Do they appear to be dierent?
b) What is a possible source of omitted variable bias in a regression of DRINKS on ADVISE?
You may think about the variables above or something else. Remember: omitted variable bias has
two ingredients.
c) Regress DRINKS on ADVISE and do a one-sided signicance test on ADVISE. What is the sign
2
of ADVISE? Why do you think this might be the case?
d) Now run the same regression but including income, education and all the age dummies as
controls. Report the results (by hand). What happens to the coecient on advise?
e) Do an F-test to determine if age does not matter for drinking habits.
f) Create a variable called EVERDRINK that is a 0/1 variable for DRINKS being positive.
Regress this on all age variables. Do an F-test to determine if the choice of whether to drink at all
depends on age.
3
Variable Description
DRINKS Total drinks over a two week period
ADVISE Dummy variable for whether the individual has been told to drink less by a doctor.
EDITINC Monthly income ($1000)
AGE30 30 <age 40
AGE40 40 <age 50
AGE50 50 <age 60
AGE60 60 <age 70
AGEGT70 70 < age
EDUC Years of schooling
BLACK Black
OTHER Non-white, non-black
MARRIED Married
WIDOW Widowed
DIVSEP Divorced or separated
EMPLOYED Employed
UNEMPLOY Unemployed
NORTHE Northeast
MIDWEST Midwest
SOUTH South
MEDICARE Insurance through Medicare
MEDICAID Insurance through Medicaid
CHAMPUS Military insurance
HLTHINS Health insurance
REGMED Reg. source of care
DRI See same doctor
MAIORLIM Limits on major daily activ.
SOMELIM Limits on some daily activ.
HVDIAB Have diabetes
HHRTCOND Have heart condition
HADSTROKE Had stroke
4

Read More

School of Information Technology and Electrical Engineering Semester Two, 2017 CSSE2310 / CSSE7231 – Assignment 4 Due: 11:10pm 27th October, 2017 Marks: 50 Weighting: 25% of your overall assignment mark (CSSE2310) Revision 4.2 Introduction In this assignment, you will write C99 programs (described below) to run and play the game from Assignment 3 using client server networking. This assignment will use pthreads not fork(). Your programs must not create any files on disk not mentioned in this specification or in command line arguments. Your assignment submission must comply with the C style guide (version 2.0.4) available on the course blackboard area. This is an individual assignment. You should feel free to discuss aspects of C programming and the assignment specification with fellow students. You should not actively help (or seek help from) other students with the actual coding of your assignment solution. It is cheating to look at another student’s code and it is cheating to allow your code to be seen or shared in printed or electronic form. You should note that all submitted code may be subject to automated checks for plagiarism and collusion. If we detect plagiarism or collusion, formal misconduct proceedings will be initiated against you. A likely penalty for a first offence would be a mark of 0 for the assignment. Don’t risk it! If you’re having trouble, seek help from a member of the teaching staff. Don’t be tempted to copy another student’s code. You should read and understand the statements on student misconduct in the course profile and on the school web-site: http://www.itee.uq.edu.au/itee-student-misconduct-including-plagiarism As with Assignment 1, we will use the subversion (svn) system to deal with assignment submissions. Do not commit any code to your repository unless it is your own work or it was given to you by teaching staff. If you have questions about this, please ask. You are permitted to use sample code supplied by teaching staff this year in this course. Code supplied for other courses or other offerings of this course is off limits — it may be deemed to be without academic merit and removed from your program before testing. The game The game being played is the same as with Assignment 3. The initial distribution of loot and players will be as specified in Assignment 3. Note that the communication protocol has had some changes. You will be provided with library code and associated headers to deal with game logic. Use of this library code is compulsory. Programs This assignment consists of the following programs: • train-job — The server program which players will connect to (takes the same coordination role that the hub had in Assignment 3). • train-scores — A client program which connects to the server and displays score table information. • train-mal — A client program which interacts with the user to determine which actions should be taken on each turn. 3422256-29492-35515391 Prepared for s4406318. Do not distribute. • train-jayne — A client which plays using the “spoiler” behaviour rules from Assignment 3. Invocation – train-job The server will require clients connecting to it to supply a pass-char. This character will be read from a file specified as a commandline parameter. The parameters to start the server are (in order): • keyfile — read the first character and use as the pass-char for player connections. • seed — seed for all games. • timeout — number of seconds to wait for a reconnect if a player disconnects early. If this is zero, then do not wait at all. • port — port to listen on. If this is given as ’-’, then let the OS choose a port. • additional ports — listen for clıent connections as well. For example: ./train-job mykey 55 2 – – Would have the server listen on two ports of the OS’s chosing. Invocation – train-scores • keyfile — read the first character and use it as the pass-char. • port — port to connect to. For example: ./train-score mykey 9001 Invocation – train-jayne/train-mal client keyfile port player_name game_name OR client keyfile port reconnect reconn_id • keyfile – file to read the pass-char from • port — port to connect to • player name — Name to be used to describe this player in text output (in messages, the letters used in Assignment 3 will still be used). • game name — Name of game to connect to • “reconnect” — If this parameter is supplied, the player should attempt to reconnect to a previous game. 3422256-29492-35515392 Prepared for s4406318. Do not distribute. • reconn id — an integer used to reconnect the player with the correct game. There is no restriction on multiple players connecting and using the same name (even in the same game). The game name parameter, will be used to place players in games. Names will take the form: %u-%u-%s Where the first value is the number of players in the game. The second value is the number of carriages in the game. The string can be any sequence of letters and numbers. When the server has filled a game with the required number of players, it will start that game. If additional players ask to join a game of the same name, a new game with the same parameters will be created. Score table behaviour The train-scores client will connect to the specified port, send %cscore\n where %c is the pass-char. It will then output whatever the server sends until the server disconnects. The server will maintain a score table and output it in lexicographic order by player name. This table is to be updated each time the server executes an action for any player in any game and when a game completes. For cases where the action requires additional information from a player, this means once the player has replied with acceptable information. Each row consists of the following information (comma separated). • player name • games won • total loot gathered (loot which is dropped later still counts) • total hits received • hits given • hits missed (ie long with no target). Player connection behaviour When a player connects, they should first send %cplay\n where %c is the pass-char. It will then wait for the server to reply with yes (in which case they continue) or no (in which case they disconnect). Next the player will send their player name and game name (single newline separated). Then wait for the servers approval (disconnect on no). When the game is full, the server will send game information to all players followed by a round message. The game information will contain the following: reconn_id width,player_count,your_id player0_name player0_loot,player0_hits player1_name player1_loot,player1_hits … carriage0_lower_loot,carriage0_upper_loot … Where 3422256-29492-35515393 Prepared for s4406318. Do not distribute. • reconn id is an integer used for possible reconnection to this game (if you have not implemented this functionality yet, this can be 1). • width, player count, your id same information as in Assignment 3. • the next block of rows describe the name and stats for each player • the remaining rows (one for each carriage) list the amount of loot on each level of the carriage. New messages This assignment adds two new messages to the normal flow: yes and no. As well as being used as a response to the the pass char and the names on connection, they are now also used in the execute phase. When a player sends a response to a server’s question, the server will respond with yes if the response is acceptable and with no. If no is sent, the client is expected to provide another response. (This will continue until the clıent provides an acceptable response). There are also two more end of game messages. disco%c — is sent to all (connected) players in a game if the game is being ended because a player disconnected (and did not reconnect). badmsg%c — is sent to all players in a game if the game is being ended because one of the players sent an illegal message. In this Assignment, only messages which are badly formatted qualify here. Non-existant players, moving off the edge etc can be dealt with via no. In both of these, the character indicates which player disconnected or sent the bad message. Reconnection If a single player in a game disconnects when input is still expected from them, the server will give them time to reconnect. Clients doing this will send: recon instead of play on the first line. If the server sends yes, then they will send their reconn id. If the ID is incorrect, the server will send no and will close the connection, otherwise it will send yes. The server will then send game information followed by: round or execute. Following this, the server will re-pose the question it expected an answer to. If the time limit is reached, the game is ended early with a gameover message. The winners will be determined based on the scores at the time. If a reconnection attempt is made while the server believes the player is still connected, the server should treat the attempt as an invalid reconn id. Server output When the server starts up and has succeeded in listening on the required ports, it should print the ports it is using (in commandline order) separated by newlines. The server will produce no other output to stdout. The server will produce the following messages to stderr (with associated exit statii). 3 422256-29492-35515394 Prepared for s4406318. Do not distribute. Condition stderr status Incorrect number of arguments Usage: train-job keyfile seed timeout port {port} 1 Can’t get valid pass-char Can’t get pass-char 2 Invalid seed (unsigned int) Bad seed 3 Invalid timeout (unsigned int) Bad timeout 4 Numerically invalid port Bad port 5 Couldn’t listen on port Failed listen 6 Output — players The following applies to both player types Both When the player recieves game information (and at the end of each round), will print a game summary to stdout: A: playername: $=?,h=? B: playername: $=?,h=? … Carriage 0: $=?,$=? Carriage 1: $=?,$=? … At the end of the game, output the winner(s): Winner(s): followed by a comma separated list of winners names (in lexicographic order). The following exit messages are sent to stderr. Condition stderr status Game over / Normal exit 0 incorrect number of args Incorrect number of args 1 Can’t get valid pass-char Bad get passchar 2 Can’t connect Connect failed 3 Can’t Authenticate Auth failed 4 Name or Game rejected Not allowed 5 Reconnect failed Bad reconnect 6 Server disconnected Server disconnect 7 Other client disconnected Client disconnected 8 Communication error (server sent you a bad message) Coms error 9 Communication error by other client Client coms error 10 3 422256-29492-35515395 Prepared for s4406318. Do not distribute. The exits above the blank line also apply to the scores client. Output — train-jayne This client will not produce any additional output. If this player has any of its moves rejected with no, it should treat that as a communication error. Output — train-mal Message Response ordered ? Ordered ? (Fill in with player name and h,v,s,l,$) hmove and vmove ? moved to X/Y (Fill in with player name) looted ? looted OR ? failed to loot short ? shorted ? OR ? missed long ? long ? OR ? missed driedout ? dried out For the following messages, display the prompt and wait for one of the permitted responses. Once a response is given, send the relevant reponse message to the server. If the server responds with no, then reprompt. For target and movement direction selection, even if the option is not legal, send it to the server and let the server reject it. Message Prompt Valid responses yourturn move: h,v,l,s,$ h? hmove: l,r (for left and right) s?/l? target: player letter Compilation Your code must compile (on a clean checkout) with the command: make Each individual file must compile with at least -Wall -pedantic -std=gnu99. You may of course use additional flags but you must not use them to try to disable or hide warnings. You must also not use pragmas to achieve the same goal. Your code must be compiled with the gcc compiler. If the make command does not produce one or more of the required programs, then those programs will not be marked. If none of the required programs are produced, then you will receive 0 marks for functionality. Any code without academic merit will be removed from your program before compilation is attempted [This will be done even if it prevents the code from compiling]. If your code produces warnings (as opposed to errors), then you will lose style marks (see later). Your solution must not invoke other programs. Your solution must not use non-standard or non-provided headers/libraries. 3422256-29492-35515396 Prepared for s4406318. Do not distribute. Submission Submission must be made electronically by committing using subversion. In order to mark your assignment, the markers will check out /trunk/ass4/ from your repository on source.eait.uq.edu.au 1. Code checked in to any other part of your repository will not be marked. The due date for this assignment is given on the front page of this specification. (Only the contents of the trunk/ass4 directory at the deadline will be marked). Test scripts will be provided to test the code on the trunk. Students are strongly advised to make use of this facility after committing. Note: Any .h or .c files in your trunk/ass4 directory will be marked for style even if they are not linked by the makefile. If you need help moving/removing files in svn, then ask. Consult the style guide for other restrictions. You must submit a Makefile or we will not be able to compile your assignment. Remember that your assignment will be marked electronically and strict adherance to the specification is critical. Marks Marks will be awarded for both functionality and style. Functionality (44 marks) Provided that your code compiles (see above), you will earn functionality marks based on the number of features your program correctly implements, as outlined below. Partial marks may be awarded for partially meeting the functionality requirements. Not all features are of equal difficulty. If your program does not allow a feature to be tested then you will receive 0 marks for that feature, even if you claim to have implemented it. For example, if your program can never open a file, we can not determine if your program would have loaded input from it. The markers will make no alterations to your code (other than to remove code without academic merit). Your programs should not crash or lock up/loop indefinitely. Your programs should not run for unreasonably long times. • For train-scores client – Argument checking (1 mark) – Correctly report score table (1 mark) • train-jayne – Argument checking (1 mark) – Correctly handle connection sequence (1 mark) – Play games (4 marks) • train-mal – Argument checking (1 mark) – Play games (5 marks) • train-job (server) – Argument checking (1 mark) 1That is, https://source.eait.uq.edu.au/svn/csse2310-$USER/trunk/ass3 3 422256-29492-35515397 Prepared for s4406318. Do not distribute. – Play single game (6 marks) – Play multiple games on single port (5 marks) – Play multiple games on multiple ports (4 marks) – Working scores support for the above (6 marks) • Restart support (clients and server) (4 marks) • No server memory leaks (4* marks) The marks for no server memory leaks will only be awarded if the submission has at least 3 marks in the “Play single game” catgeory and none of the leak tests fail. Style (6 marks) Style marks will be calculated as follows: Let A be the number of style violations detected by simpatico plus the number of build warnings. Let H be the number of style violations detected by human markers. Let F be the functionality mark for your assignment. • If A > 10, then your style mark will be zero and M will not be calculated. • Otherwise, let MA = 3 × 0.8A and MH = MA − 0.5 × H your style mark S will be MA + max{0,MH}. Your total mark for the assignment will be F + min{F, S}. Late Penalties Late penalties will apply as outlined in the course profile. Specification Updates It is possible that this specification contains errors or inconsistencies or missing information. It is possible that clarifications will be issued via the course website. Any such clarifications posted 5 days (120 hours) or more before the due date will form part of the assignment specification. If you find any inconsistencies or omissions, please notify the teaching staff. Test Data Test data and scripts for this assignment will be made available. (testa4.sh, reptesta4.sh) The idea is to help clarify some areas of the specification and to provide a basic sanity check of code which you have committed. They are not guaranteed to check all possible problems nor are they guaranteed to resemble the tests which will be used to mark your assignments. Testing that your assignment complies with this specification is still your responsibility. Notes and Addenda: 1. Start early. 2. Write simple programs to try out pthread and threadsafety functions. 3422256-29492-35515398 Prepared for s4406318. Do not distribute. 3. Be sure to test on moss. 4. You should not assume that system calls always succeed. 5. You are not permitted to use any of the following functions in this assignment. • system(), fork(), popen(), prctl(), setjmp() 6. You may not use any #pragma in this assignment. 7. No program should assume that any other will be well behaved. That is, if the server sends a valid message, you may believe it. However, if any component sends an invalid message, no other component should crash. 8. You will need to do something with SIGPIPE. 9. Valid messages contain no leading, trailing or embedded spaces. Messages must be exactly the correct length. 10. structs and enums are your friends use them. 11. All components detect the loss of other components by read failure. Write failures will be silently ignored. 12. valgrind may be helpful in checking memory leaks. 3422256-29492-35515399

School of Information Technology and Electrical Engineering
Semester Two, 2017
CSSE2310 / CSSE7231 – Assignment 4
Due: 11:10pm 27th October, 2017
Marks: 50
Weighting: 25% of your overall assignment mark (CSSE2310)
Revision 4.2
Introduction
In this assignment, you will write C99 programs (described below) to run and play the game from Assignment 3
using client server networking. This assignment will use pthreads not fork().
Your programs must not create any files on disk not mentioned in this specification or in command line
arguments. Your assignment submission must comply with the C style guide (version 2.0.4) available on the
course blackboard area. This is an individual assignment. You should feel free to discuss aspects of C programming
and the assignment specification with fellow students. You should not actively help (or seek help
from) other students with the actual coding of your assignment solution. It is cheating to look at another
student’s code and it is cheating to allow your code to be seen or shared in printed or electronic form. You
should note that all submitted code may be subject to automated checks for plagiarism and collusion. If we
detect plagiarism or collusion, formal misconduct proceedings will be initiated against you. A likely penalty
for a first offence would be a mark of 0 for the assignment. Don’t risk it! If you’re having trouble, seek
help from a member of the teaching staff. Don’t be tempted to copy another student’s code. You should
read and understand the statements on student misconduct in the course profile and on the school web-site:
http://www.itee.uq.edu.au/itee-student-misconduct-including-plagiarism
As with Assignment 1, we will use the subversion (svn) system to deal with assignment submissions. Do not
commit any code to your repository unless it is your own work or it was given to you by teaching staff. If you
have questions about this, please ask.
You are permitted to use sample code supplied by teaching staff this year in this course. Code
supplied for other courses or other offerings of this course is off limits — it may be deemed to
be without academic merit and removed from your program before testing.
The game
The game being played is the same as with Assignment 3. The initial distribution of loot and players will be as
specified in Assignment 3. Note that the communication protocol has had some changes. You will be provided
with library code and associated headers to deal with game logic. Use of this library code is compulsory.
Programs
This assignment consists of the following programs:
• train-job — The server program which players will connect to (takes the same coordination role that the
hub had in Assignment 3).
• train-scores — A client program which connects to the server and displays score table information.
• train-mal — A client program which interacts with the user to determine which actions should be taken
on each turn.
3422256-29492-35515391
Prepared for s4406318. Do not distribute.
• train-jayne — A client which plays using the “spoiler” behaviour rules from Assignment 3.
Invocation – train-job
The server will require clients connecting to it to supply a pass-char. This character will be read from a file
specified as a commandline parameter.
The parameters to start the server are (in order):
• keyfile — read the first character and use as the pass-char for player connections.
• seed — seed for all games.
• timeout — number of seconds to wait for a reconnect if a player disconnects early. If this is zero, then do
not wait at all.
• port — port to listen on. If this is given as ’-’, then let the OS choose a port.
• additional ports — listen for clıent connections as well.
For example:
./train-job mykey 55 2 – –
Would have the server listen on two ports of the OS’s chosing.
Invocation – train-scores
• keyfile — read the first character and use it as the pass-char.
• port — port to connect to.
For example:
./train-score mykey 9001
Invocation – train-jayne/train-mal
client keyfile port player_name game_name
OR
client keyfile port reconnect reconn_id
• keyfile – file to read the pass-char from
• port — port to connect to
• player name — Name to be used to describe this player in text output (in messages, the letters used in
Assignment 3 will still be used).
• game name — Name of game to connect to
• “reconnect” — If this parameter is supplied, the player should attempt to reconnect to a previous game.
3422256-29492-35515392
Prepared for s4406318. Do not distribute.
• reconn id — an integer used to reconnect the player with the correct game.
There is no restriction on multiple players connecting and using the same name (even in the same game).
The game name parameter, will be used to place players in games. Names will take the form: %u-%u-%s
Where the first value is the number of players in the game. The second value is the number of carriages in the
game. The string can be any sequence of letters and numbers.
When the server has filled a game with the required number of players, it will start that game. If additional
players ask to join a game of the same name, a new game with the same parameters will be created.
Score table behaviour
The train-scores client will connect to the specified port, send %cscore\n where %c is the pass-char. It will
then output whatever the server sends until the server disconnects.
The server will maintain a score table and output it in lexicographic order by player name. This table is to
be updated each time the server executes an action for any player in any game and when a game completes.
For cases where the action requires additional information from a player, this means once the player has replied
with acceptable information. Each row consists of the following information (comma separated).
• player name
• games won
• total loot gathered (loot which is dropped later still counts)
• total hits received
• hits given
• hits missed (ie long with no target).
Player connection behaviour
When a player connects, they should first send %cplay\n where %c is the pass-char. It will then wait for the
server to reply with yes (in which case they continue) or no (in which case they disconnect).
Next the player will send their player name and game name (single newline separated). Then wait for the
servers approval (disconnect on no).
When the game is full, the server will send game information to all players followed by a round message.
The game information will contain the following:
reconn_id
width,player_count,your_id
player0_name
player0_loot,player0_hits
player1_name
player1_loot,player1_hits

carriage0_lower_loot,carriage0_upper_loot

Where
3422256-29492-35515393
Prepared for s4406318. Do not distribute.
• reconn id is an integer used for possible reconnection to this game (if you have not implemented this
functionality yet, this can be 1).
• width, player count, your id same information as in Assignment 3.
• the next block of rows describe the name and stats for each player
• the remaining rows (one for each carriage) list the amount of loot on each level of the carriage.
New messages
This assignment adds two new messages to the normal flow: yes and no. As well as being used as a response
to the the pass char and the names on connection, they are now also used in the execute phase. When a player
sends a response to a server’s question, the server will respond with yes if the response is acceptable and with
no. If no is sent, the client is expected to provide another response. (This will continue until the clıent provides
an acceptable response).
There are also two more end of game messages. disco%c — is sent to all (connected) players in a game if the
game is being ended because a player disconnected (and did not reconnect). badmsg%c — is sent to all players
in a game if the game is being ended because one of the players sent an illegal message. In this Assignment,
only messages which are badly formatted qualify here. Non-existant players, moving off the edge etc can be
dealt with via no. In both of these, the character indicates which player disconnected or sent the bad message.
Reconnection
If a single player in a game disconnects when input is still expected from them, the server will give them time to
reconnect. Clients doing this will send: recon instead of play on the first line. If the server sends yes, then they
will send their reconn id. If the ID is incorrect, the server will send no and will close the connection, otherwise
it will send yes. The server will then send game information followed by: round or execute. Following this,
the server will re-pose the question it expected an answer to.
If the time limit is reached, the game is ended early with a gameover message. The winners will be determined
based on the scores at the time.
If a reconnection attempt is made while the server believes the player is still connected, the server should
treat the attempt as an invalid reconn id.
Server output
When the server starts up and has succeeded in listening on the required ports, it should print the ports it is
using (in commandline order) separated by newlines. The server will produce no other output to stdout.
The server will produce the following messages to stderr (with associated exit statii).
3 422256-29492-35515394
Prepared for s4406318. Do not distribute.
Condition stderr status
Incorrect number of
arguments
Usage: train-job keyfile seed timeout port {port} 1
Can’t get valid
pass-char
Can’t get pass-char 2
Invalid seed
(unsigned int)
Bad seed 3
Invalid timeout
(unsigned int)
Bad timeout 4
Numerically invalid
port
Bad port 5
Couldn’t listen on
port
Failed listen 6
Output — players
The following applies to both player types
Both
When the player recieves game information (and at the end of each round), will print a game summary to
stdout:
A: playername: $=?,h=?
B: playername: $=?,h=?

Carriage 0: $=?,$=?
Carriage 1: $=?,$=?

At the end of the game, output the winner(s):
Winner(s):
followed by a comma separated list of winners names (in lexicographic order).
The following exit messages are sent to stderr.
Condition stderr status
Game over / Normal exit 0
incorrect number of args Incorrect number of args 1
Can’t get valid pass-char Bad get passchar 2
Can’t connect Connect failed 3
Can’t Authenticate Auth failed 4
Name or Game rejected Not allowed 5
Reconnect failed Bad reconnect 6
Server disconnected Server disconnect 7
Other client disconnected Client disconnected 8
Communication error (server
sent you a bad message)
Coms error 9
Communication error by other
client
Client coms error 10
3 422256-29492-35515395
Prepared for s4406318. Do not distribute.
The exits above the blank line also apply to the scores client.
Output — train-jayne
This client will not produce any additional output. If this player has any of its moves rejected with no, it should
treat that as a communication error.
Output — train-mal
Message Response
ordered ? Ordered ? (Fill in with player name
and h,v,s,l,$)
hmove and vmove ? moved to X/Y (Fill in with player
name)
looted ? looted OR ? failed to loot
short ? shorted ? OR ? missed
long ? long ? OR ? missed
driedout ? dried out
For the following messages, display the prompt and wait for one of the permitted responses. Once a response
is given, send the relevant reponse message to the server. If the server responds with no, then reprompt. For
target and movement direction selection, even if the option is not legal, send it to the server and let the server
reject it.
Message Prompt Valid responses
yourturn move: h,v,l,s,$
h? hmove: l,r (for left and right)
s?/l? target: player letter
Compilation
Your code must compile (on a clean checkout) with the command:
make
Each individual file must compile with at least -Wall -pedantic -std=gnu99. You may of course use
additional flags but you must not use them to try to disable or hide warnings. You must also not use pragmas
to achieve the same goal. Your code must be compiled with the gcc compiler.
If the make command does not produce one or more of the required programs, then those programs will not
be marked. If none of the required programs are produced, then you will receive 0 marks for functionality. Any
code without academic merit will be removed from your program before compilation is attempted [This will be
done even if it prevents the code from compiling]. If your code produces warnings (as opposed to errors), then
you will lose style marks (see later).
Your solution must not invoke other programs. Your solution must not use non-standard or non-provided
headers/libraries.
3422256-29492-35515396
Prepared for s4406318. Do not distribute.
Submission
Submission must be made electronically by committing using subversion. In order to mark your assignment,
the markers will check out /trunk/ass4/ from your repository on source.eait.uq.edu.au 1. Code checked
in to any other part of your repository will not be marked.
The due date for this assignment is given on the front page of this specification. (Only the contents of the
trunk/ass4 directory at the deadline will be marked).
Test scripts will be provided to test the code on the trunk. Students are strongly advised to make use of this
facility after committing.
Note: Any .h or .c files in your trunk/ass4 directory will be marked for style even if they are not linked
by the makefile. If you need help moving/removing files in svn, then ask. Consult the style guide for other
restrictions.
You must submit a Makefile or we will not be able to compile your assignment. Remember that your
assignment will be marked electronically and strict adherance to the specification is critical.
Marks
Marks will be awarded for both functionality and style.
Functionality (44 marks)
Provided that your code compiles (see above), you will earn functionality marks based on the number of features
your program correctly implements, as outlined below. Partial marks may be awarded for partially meeting the
functionality requirements. Not all features are of equal difficulty. If your program does not allow a feature to
be tested then you will receive 0 marks for that feature, even if you claim to have implemented it. For example,
if your program can never open a file, we can not determine if your program would have loaded input from it.
The markers will make no alterations to your code (other than to remove code without academic merit). Your
programs should not crash or lock up/loop indefinitely. Your programs should not run for unreasonably long
times.
• For train-scores client
– Argument checking (1 mark)
– Correctly report score table (1 mark)
• train-jayne
– Argument checking (1 mark)
– Correctly handle connection sequence (1 mark)
– Play games (4 marks)
• train-mal
– Argument checking (1 mark)
– Play games (5 marks)
• train-job (server)
– Argument checking (1 mark)
1That is, https://source.eait.uq.edu.au/svn/csse2310-$USER/trunk/ass3
3 422256-29492-35515397
Prepared for s4406318. Do not distribute.
– Play single game (6 marks)
– Play multiple games on single port (5 marks)
– Play multiple games on multiple ports (4 marks)
– Working scores support for the above (6 marks)
• Restart support (clients and server) (4 marks)
• No server memory leaks (4* marks)
The marks for no server memory leaks will only be awarded if the submission has at least 3 marks in the
“Play single game” catgeory and none of the leak tests fail.
Style (6 marks)
Style marks will be calculated as follows:
Let A be the number of style violations detected by simpatico plus the number of build warnings. Let H be the
number of style violations detected by human markers. Let F be the functionality mark for your assignment.
• If A > 10, then your style mark will be zero and M will not be calculated.
• Otherwise, let MA = 3 × 0.8A and MH = MA − 0.5 × H your style mark S will be MA + max{0,MH}.
Your total mark for the assignment will be F + min{F, S}.
Late Penalties
Late penalties will apply as outlined in the course profile.
Specification Updates
It is possible that this specification contains errors or inconsistencies or missing information. It is possible that
clarifications will be issued via the course website. Any such clarifications posted 5 days (120 hours) or more
before the due date will form part of the assignment specification. If you find any inconsistencies or omissions,
please notify the teaching staff.
Test Data
Test data and scripts for this assignment will be made available. (testa4.sh, reptesta4.sh) The idea is to help
clarify some areas of the specification and to provide a basic sanity check of code which you have committed.
They are not guaranteed to check all possible problems nor are they guaranteed to resemble the tests which will
be used to mark your assignments. Testing that your assignment complies with this specification is still your
responsibility.
Notes and Addenda:
1. Start early.
2. Write simple programs to try out pthread and threadsafety functions.
3422256-29492-35515398
Prepared for s4406318. Do not distribute.
3. Be sure to test on moss.
4. You should not assume that system calls always succeed.
5. You are not permitted to use any of the following functions in this assignment.
• system(), fork(), popen(), prctl(), setjmp()
6. You may not use any #pragma in this assignment.
7. No program should assume that any other will be well behaved. That is, if the server sends a valid
message, you may believe it. However, if any component sends an invalid message, no other component
should crash.
8. You will need to do something with SIGPIPE.
9. Valid messages contain no leading, trailing or embedded spaces. Messages must be exactly the correct
length.
10. structs and enums are your friends use them.
11. All components detect the loss of other components by read failure. Write failures will be silently ignored.
12. valgrind may be helpful in checking memory leaks.
3422256-29492-35515399

Read More

Focus of the Final Paper Due to varying business characteristics, the managerial accounting techniques applied in each business may differ. For example, a business in the start-up phase may rely heavily upon budgeting and capital investment techniques; whereas, a business in the mature/maintaining phase may rely heavily upon cost management and quality control. Ultimately, the techniques used by management should assist the business in achieving its short-term and long-term goals through effective decision-making. For your Final Paper, you will analyze the role of managerial accounting in two parts. Part I will provide a general overview of managerial accounting. Part II will provide examples of how managerial accounting theories and principles are applied in the business world. You may find it helpful to reflect upon your own professional experiences for examples. Part I (Three to four double-spaced pages) Present the following: Definition of managerial accounting Role of managerial accounting and the management accountant in a business or organization Ethical issues/concerns for the management accountant General description of at least three managerial accounting techniques available and their application within a business or organization Part II (Four to six double-spaced pages) Select at least three of the five topics identified below: Cost Management Techniques Costing Methods Capital Investment Decision Techniques Budgeting Quality Control For each topic selected present real world examples of the application of managerial accounting techniques within a business or organization. Examples may be gathered from your own professional experiences or from case studies obtained from credible sources (excluding textbook examples explored in previous weeks). Presentation of each example should include how a managerial accounting technique was applied in the business or organization’s decision-making model. Be sure to support your example with calculations when applicable. Writing the Final Paper The Final Paper: 1. Must be eight to ten double-spaced pages in length, and formatted according to APA style as outlined in the Ashford Writing Center. 2. Must include a title page with the following: a. Title of paper b. Student’s name c. Course name and number d. Instructor’s name e. Date submitted 3. Must begin with an introductory paragraph that has a succinct thesis statement. 4. Must address the topic of the paper with critical thought. 5. Must end with a conclusion that reaffirms your thesis. 6. Must use at least five scholarly sources. 7. Must document all sources in APA style, as outlined in the Ashford Writing Center. 8. Must include a separate reference page, formatted according to APA style as outlined in the Ashford Writing Center. Carefully review the Grading Rubric for the criteria that will be used to evaluate your assignment. BUS630 Grading Rubric Final Paper: Decision Making with Managerial Accounting Focus of the Final Paper Due to varying business characteristics, the managerial accounting techniques applied in each business may differ. For example, a business in the start-up phase may rely heavily upon budgeting and capital investment techniques; whereas, a business in the mature/maintaining phase may rely heavily upon cost management and quality control. Ultimately, the techniques used by management should assist the business in achieving its short-term and long-term goals through effective decision-making. For your Final Paper, you will analyze the role of managerial accounting in two parts. Part I will provide a general overview of managerial accounting. Part II will provide examples of how managerial accounting theories and principles are applied in the business world. You may find it helpful to reflect upon your own professional experiences for examples. Part I (Three to four double-spaced pages) Present the following: Definition of managerial accounting Role of managerial accounting and the management accountant in a business or organization Ethical issues/concerns for the management accountant General description of at least three managerial accounting techniques available and their application within a business or organization Part II (Five to six double-spaced pages) Select at least three of the five topics identified below: Cost Management Techniques Costing Methods Capital Investment Decision Techniques Budgeting Quality Control For each topic selected present real world examples of the application of managerial accounting techniques within a business or organization. Examples may be gathered from your own professional experiences or from case studies obtained from credible sources (excluding textbook examples explored in previous weeks). Presentation of each example should include how a managerial accounting technique was applied in the business or organization’s decision-making model. Be sure to support your example with calculations when applicable. Writing the Final Paper The Final Paper: 1. Must be eight to ten double-spaced pages in length, and formatted according to APA style as outlined in the Ashford Writing Center. 2. Must include a title page with the following: a. Title of paper b. Student’s name c. Course name and number d. Instructor’s name e. Date submitted 3. Must begin with an introductory paragraph that has a succinct thesis statement. 4. Must address the topic of the paper with critical thought. 5. Must end with a conclusion that reaffirms your thesis. 6. Must use at least five scholarly sources. 7. Must document all sources in APA style, as outlined in the Ashford Writing Center. 8. Must include a separate reference page, formatted according to APA style as outlined in the Ashford Writing Center. Grading Criteria Decision Making with Managerial Accounting 26 points Content Criteria Weight The Final Paper provides overview of managerial accounting The Final Paper identifies the use of three managerial accounting techniques. The Final Paper provides examples demonstrating understanding of managerial accounting techniques. Writing Skills The Final Paper demonstrates proper writing skills applied to provide well-written and organized information while maintaining consistent flow. The Final Paper meets length requirements (sufficient details). Research Criteria The paper has at least five scholarly resources from the Ashford Library or other external sources. Must include a cover page that includes: ­ Title of Paper ­ Student’s name ­ Course name and number ­ Instructor’s name Style Criteria ­ Date submitted The Final Paper is eight to ten double-spaced pages in length, and formatted according to APA style as outlined in the Ashford Writing Center. 2

Focus of the Final Paper
Due to varying business characteristics, the managerial accounting techniques applied in each business may differ. For example, a business in the start-up phase may rely heavily upon budgeting and capital investment techniques; whereas, a business in the mature/maintaining phase may rely heavily upon cost management and quality control. Ultimately, the techniques used by management should assist the business in achieving its short-term and long-term goals through effective decision-making.

For your Final Paper, you will analyze the role of managerial accounting in two parts. Part I will provide a general overview of managerial accounting. Part II will provide examples of how managerial accounting theories and principles are applied in the business world. You may find it helpful to reflect upon your own professional experiences for examples.


Part I (Three to four double-spaced pages)

Present the following:

Definition of managerial accounting
Role of managerial accounting and the management accountant in a business or organization
Ethical issues/concerns for the management accountant
General description of at least three managerial accounting techniques available and their application within a business or organization
Part II (Four to six double-spaced pages)

Select at least three of the five topics identified below:

Cost Management Techniques
Costing Methods
Capital Investment Decision Techniques
Budgeting
Quality Control
For each topic selected present real world examples of the application of managerial accounting techniques within a business or organization. Examples may be gathered from your own professional experiences or from case studies obtained from credible sources (excluding textbook examples explored in previous weeks). Presentation of each example should include how a managerial accounting technique was applied in the business or organization’s decision-making model. Be sure to support your example with calculations when applicable.



Writing the Final Paper
The Final Paper:

1. Must be eight to ten double-spaced pages in length, and formatted according to APA style as outlined in the Ashford Writing Center.
2. Must include a title page with the following:

a. Title of paper
b. Student’s name
c. Course name and number
d. Instructor’s name
e. Date submitted

3. Must begin with an introductory paragraph that has a succinct thesis statement.
4. Must address the topic of the paper with critical thought.
5. Must end with a conclusion that reaffirms your thesis.
6. Must use at least five scholarly sources.
7. Must document all sources in APA style, as outlined in the Ashford Writing Center.
8. Must include a separate reference page, formatted according to APA style as outlined in the Ashford Writing Center.



Carefully review the Grading Rubric for the criteria that will be used to evaluate your assignment.

BUS630 Grading Rubric 
Final Paper: Decision Making with Managerial Accounting  
Focus of the Final Paper 
Due to varying business characteristics, the managerial accounting techniques applied in each business may differ.  For
example, a business in the start-up phase may rely heavily upon budgeting and capital investment techniques; whereas, a
business in the mature/maintaining phase may rely heavily upon cost management and quality control.  Ultimately, the
techniques used by management should assist the business in achieving its short-term and long-term goals through
effective decision-making. 
For your Final Paper, you will analyze the role of managerial accounting in two parts.  Part I will provide a general
overview of managerial accounting.  Part II will provide examples of how managerial accounting theories and principles
are applied in the business world.  You may find it helpful to reflect upon your own professional experiences for
examples.   
Part I (Three to four double-spaced pages)
Present the following: 
 
 Definition of managerial accounting
 Role of managerial accounting and the management accountant in a business or organization
 Ethical issues/concerns for the management accountant
 General description of at least three managerial accounting techniques available and their application within a 
business or organization

Part II (Five to six double-spaced pages)
Select at least three of the five topics identified below:
 
 Cost Management Techniques
 Costing Methods 
 Capital Investment Decision Techniques
 Budgeting 
 Quality Control 
For each topic selected present real world examples of the application of managerial accounting techniques within a
business or organization.  Examples may be gathered from your own professional experiences or from case studies
obtained from credible sources (excluding textbook examples explored in previous weeks).  Presentation of each example
should include how a managerial accounting technique was applied in the business or organization’s decision-making
model.  Be sure to support your example with calculations when applicable.    
Writing the Final Paper 
The Final Paper: 
1. Must be eight to ten double-spaced pages in length, and formatted according to APA style as outlined in the
Ashford Writing Center. 
2. Must include a title page with the following: 
a. Title of paper
b. Student’s name
c. Course name and number
d. Instructor’s name
e. Date submitted 
3. Must begin with an introductory paragraph that has a succinct thesis statement. 
4. Must address the topic of the paper with critical thought.
5. Must end with a conclusion that reaffirms your thesis.
6. Must use at least five scholarly sources.
7. Must document all sources in APA style, as outlined in the Ashford Writing Center.
8. Must include a separate reference page, formatted according to APA style as outlined in the Ashford Writing 
Center.
 
Grading Criteria 
 
Decision Making with Managerial Accounting 
26 points  
Content Criteria Weight 

The Final Paper provides overview of managerial accounting 

The Final Paper identifies the use of three managerial accounting techniques. 

The Final Paper provides examples demonstrating understanding of managerial accounting
techniques.  
Writing Skills
 

The Final Paper demonstrates proper writing skills applied to provide well-written and organized
information while maintaining consistent flow. 

The Final Paper meets length requirements (sufficient details). 
Research Criteria 
The paper has at least five scholarly resources from the Ashford Library or other external sources.
 
Must include a cover page that includes: 
­ Title of Paper 
­ Student’s name 
­ Course name and number 
­ Instructor’s name 
Style Criteria
 
­ Date submitted
The Final Paper is eight to ten double-spaced pages in length, and formatted according to APA
style as outlined in the Ashford Writing Center. 

 
2

Read More

Procedure 1.In a three to four page paper, personalize your ethical experiences over the past eight modules. Review your Ethical Lens Inventory from Assignment 1.2, and briefly review each of your experiences in the ethics game cases. Answer the following questions: ?Compare the results of the Ethical Lens Inventory you took in Assignment 1.2 with your experiences in the game cases. Which lens(es) are the most effective for you as you conduct ethical problem solving? Why? ?How do you think you can embody the virtue of integrity (Kant/Rights), greatest good (Mill/Results), justice (Rawls/Relationship) and courage (MacIntyre/Virtue) into your profession, given your experiences with the lenses? ?What types of ethical challenges do you face at work? ?How do you think you can use the ethical lenses in your own professional environment? ?For what do you wish to be known at the end of your professional life? How do you want people to think about you?

Procedure
1.In a three to four page paper, personalize your ethical experiences over the past eight modules. Review your Ethical Lens Inventory from Assignment 1.2, and briefly review each of your experiences in the ethics game cases. Answer the following questions: ?Compare the results of the Ethical Lens Inventory you took in Assignment 1.2 with your experiences in the game cases. Which lens(es) are the most effective for you as you conduct ethical problem solving? Why?
?How do you think you can embody the virtue of integrity (Kant/Rights), greatest good (Mill/Results), justice (Rawls/Relationship) and courage (MacIntyre/Virtue) into your profession, given your experiences with the lenses?
?What types of ethical challenges do you face at work?
?How do you think you can use the ethical lenses in your own professional environment?
?For what do you wish to be known at the end of your professional life? How do you want people to think about you?

Read More

Write a business editorial that presents your position on a topic of interest. Paper should be written using APA style and include, at minimum, the following: A clear statement of the issue A thorough discussion of each of the premises Credible, supporting evidence for each of the premises Response to each of the counterarguments, including evidence A strong, logical connection between the premises and the conclusion Thorough research and documentation Writing that presents a compelling argument At least 5 different citations, Approximately 3

Write a business editorial that presents your position on a topic of interest. Paper should be written using APA style and include, at minimum, the following:

A clear statement of the issue
A thorough discussion of each of the premises
Credible, supporting evidence for each of the premises
Response to each of the counterarguments, including evidence
A strong, logical connection between the premises and the conclusion
Thorough research and documentation
Writing that presents a compelling argument
At least 5 different citations,
Approximately 3

Read More

You are the regional manager for a rapidly growing retail building supply company, somewhat like Lowes. You have been given the responsibility for expanding the company into at least one new geographic area in the next twelve months. You have three specific areas to consider. They are all highly populated areas with target markets suitable for your products. One factor is that there are several formidable competitors in all of the areas. Write an essay, not less than one page, on how you would use the “Rational Decision Making Model” as a basis for selecting the site “most likely to succeed”. Include how “common decision making errors and biases” might affect your decisions.

 You are the regional manager for a rapidly growing retail building supply company, somewhat like Lowes. You have been given the responsibility for expanding the company into at least one new geographic area in the next twelve months. You have three specific areas to consider. They are all highly populated areas with target markets suitable for your products. One factor is that there are several formidable competitors in all of the areas.
Write an essay, not less than one page, on how you would use the “Rational Decision Making Model” as a basis for selecting the site “most likely to succeed”. Include how "common decision making errors and biases" might affect your decisions.

Read More

“Corporate Social Responsibility (CSR) and Global Citizenship” Please respond to the following: • You are the author of a popular CSR article. For this week’s discussion post, discuss the main reasons why Apple is or is not a socially responsible organization. List at least two examples of Apple’s actions that support your position. “Business Ethics and Ethical Reasoning” Please respond to the following: • Think back to a time when you had a supervisor or coworker who you believe made an unethical decision or exhibited unethical behavior. List at least two reasons why you think people are tempted to act unethically. Describe the most effective safe guards that you believe an organization can put into place to prevent unethical behavior within the organization.

“Corporate Social Responsibility (CSR) and Global Citizenship” Please respond to the following: • You are the author of a popular CSR article. For this week’s discussion post, discuss the main reasons why Apple is or is not a socially responsible organization. List at least two examples of Apple’s actions that support your position.

“Business Ethics and Ethical Reasoning” Please respond to the following: • Think back to a time when you had a supervisor or coworker who you believe made an unethical decision or exhibited unethical behavior. List at least two reasons why you think people are tempted to act unethically. Describe the most effective safe guards that you believe an organization can put into place to prevent unethical behavior within the organization.

Read More

A manufacturer of computer chips has a computer hardware company as its largest customer. The computer hardware company requires all of its chips to meet specifications of 1.2 cm. The vice-president of manufacturing, concerned about a possible loss of sales, assigns his production manager the task of ensuring that chips are produced to meet the specification of 1.2 cm. Based on the production run from last month, a 95% confidence interval was computed for the mean length of a computer chip resulting in: 95% confidence interval: (0.9 cm, 1.1 cm) 1. What are the elements that the production manager should consider in determining his company’s ability to produce chips that meet specifications? 2. Do the chips produced meet the desired specifications? 3. What reasons should the production manager provide to the vice-president to justify that the production team is meeting specifications? 4. How will this decision impact the chip manufacturer’s sales and net profit?

A manufacturer of computer chips has a computer hardware company as its largest customer. The computer hardware company requires all of its chips to meet specifications of 1.2 cm. The vice-president of manufacturing, concerned about a possible loss of sales, assigns his production manager the task of ensuring that chips are produced to meet the specification of 1.2 cm.
Based on the production run from last month, a 95% confidence interval was computed for the mean length of a computer chip resulting in:
95% confidence interval: (0.9 cm, 1.1 cm)

1. What are the elements that the production manager should consider in determining his company’s ability to produce chips that meet specifications?

2. Do the chips produced meet the desired specifications?

3. What reasons should the production manager provide to the vice-president to justify that the production team is meeting specifications?

4. How will this decision impact the chip manufacturer’s sales and net profit?

Read More