Assignment Chef icon Assignment Chef

Browse assignments

Assignment catalog

33,401 assignments available

[SOLVED] Cpsc453 assignment 2 graphics pipeline

You are to write a program that displays and interactively manipulates a wire-frame box that you should construct with vertices at the 8 unit points (±1, ±1, ±1). You are to provide a set of coordinate axes (a modelling gnomon) that you should construct with three lines, drawn from (0, 0, 0) to (0.5, 0, 0), (0, 0.5, 0) and (0, 0, 0.5) respectively. This gnomon will represent the local modelling coordinates of the box, and it must be subjected to every modelling, viewing and projection transformation applied to the box, except scaling. You are also to draw a separate set of axes for the world coordinates, which are the same size (coordinates) as the modelling gnomon, but are alinged with the world coordinate axes instead of the modelling axes. The world gnomon should be at (0, 0, 0). You should subject this world gnomon only to the viewing and projection transformations. Note that the gnomon are merely graphical representations of the coordinate axes; for the coordinate axes themselves you should use orthonormal bases. You are to apply modelling transformations to the box (rotations, translations, and scales) and viewing transformations to the eyepoint (rotations and translations). Transformations will be menu-selected and will be applied according to mouse interactions. Specifically, x motion of the mouse will be used as a controller to the amount of each transformation, and the mouse buttons will be used to select the axis of the transformation, and a menu will be used as the choice device to determine the major modes of the program’s execution. You will need to maintain four distinct coordinate systems in this assignment. Three of these coordinate systems are 3D and one is 2D: the box (“model”) coordinates (3D), the eye point (“view”) 1 coordinates (3D), the universal (“world”) coordinates (3D) and the display (“screen”) 2D normalized device coordinates (which arise from the perspective projection of the eye’s view onto the eye’s x − y plane). The modelling transformations apply with respect to the model coordinates (ie. a model mode rotation about the x axis will rotate the box around its current x axis, not the world’s x axis). The viewing transformations apply with respect to the view coordinates (ie. a view mode rotation about the x axis will appear to swing the objects of the view up or down on the screen, since the eye’s x appears parallel to the screen’s horizontal axis). None of the modelling transformations will change the world coordinates (ie. the world gnomon never changes its location, though of course it may drift out of our view as a result fo the viewing transformations). You are to form all the matrices yourself and accumulate all matrix products in software. You will also do the perspective projection yourself, including the division to convert from 3D homogeneous coordinates to 2D Cartesian coordiantes. This means that you will have to do a 3D near-plane line/plane clip in the viewing coordinate system to avoid dividing by zero or having line segments “wrap around.” The Interface As with the previous assignments, this is implemented in C++ with Qt. We have provided some code for you that sets up a window and draws an example set of lines for you. You will need to add the parts that do all the 3D transformations, projections, etc. Note that algebra.h, algebra.cpp contains custom in-house class implementations of Point2D, Point3D, Vector3D, Matrix4x4 and Colour. You are to use (and if needed expand) these classes rather than their Qt implementations, to demonstrate your understanding of the transformation matrices. Additionally, for drawing, you will not be using VAOs, VBOs, or any other OpenGL commands. Instead you will use the set colour and draw line commands for any drawing. Examples of use are found in Renderer::paintGL. We suggest you add a few matrices to the Renderer – which ones you add and what each means is up to you. At the very least, you will need a modelling matrix and a viewing matrix. You should implement the stub functions already found in Renderer and perhaps add some more of your own. You will also want to implement the missing matrix functions in a2.h and a2.cpp and use these in your Renderer. Drawing Lines In draw.cpp, we provide the following C++ routines to draw lines and set colours in an OpenGL window: 2 • draw init(int width, int height) – call this before drawing any line segments. It will clear the screen and set everything up for drawing. • draw line(const Point2D& p, const Point2D& q) – draw a line segment. p and q are in window coordinates. • set colour(const Colour& col) – set the colour of subsequent calls to draw line. • draw complete() – call this after you are done drawing line segments. These routines use OpenGL. Your assignment should not contain any further OpenGL calls. Further, you should not modify draw.cpp. You should call these routines from renderer.cpp with the GL widget active. There is already example code in renderer.cpp that does this for you. Top Level Interaction The menubar will support (at least) two menus: the File and Mode menus. The File menu will have to selections: Reset (keyboard shortcut A), which will restore the original state of all transforms and perspective parameters, and set the viewport to its initial state; and the Quit (keyboard shortcut Q) which will terminate the program. The Quit menu item and shortcut are already implemented in the provided code; be sure not to break it. The Mode menu selections will be used to determine what effect mouse dragging on the viewing area will have on the transformations. The Mode menu will consist of a list of radiobuttons which select among the viewing and modelling modes, and a viewport mode. There should be an onscreen indication of what mode is currently active (eg. a status bar). In any View and Model interaction modes, transformations are initiated with the cursor in the 3D viewing area, up on a button down event. Relative motion of the cursor is tracked and the transformations are continuously updated until a button up event is received. The current interactive mode should be presented in a status bar somewhere on the display widget. If multiple mouse buttons are held down simultaneously, all relevant parameters should be updated in parallel. For rotation, you may apply the rotations in a fixed order, as opposed to composing multiple infintesimal rotations. However, this ONLY applies to the case where multiple mouse buttons are held down; in general you will want to be able to compose an arbitrary sequence of transformations. These interaction modes are a bare minimum, and form a poor 3D user interface. We’ll look at better ways to create an interface for 3D rotation in Assignment 3. 3 View Interaction Modes The following view interaction modes should be supported: • Rotate (keyboard shortcut O): Use x-motion of the mouse to: – LMB: Rotate sight vector about eye’s x (horizontal) axis. – MMB: Rotate sight vector about eye’s y (vertical) axis. – RMB: Rotate sight vector about eye’s z (straight) axis. • Translate (keyboard shortcut N): Use x-motion of the mouse to: – LMB: Translate eyepoint along eye’s x axis. – MMB: Translate eyepoint along eye’s y axis. – RMB: Translate eyepoint along eye’s z axis. • Perspective (keyboard shortcut P): Use x-motion of the mouse to: – LMB: Change the FOV over the range of 5 to 160 degrees. – MMB: Translate the near plane along z. – RMB: Translate the far plane along z. A good default value for FOV (Field of View) is 30 degrees. Model Interaction Modes The following model interaction modes should be supported: • Rotate (keyboard shortcut R): Use x-motion of the mouse to: – LMB: Rotate box about its local x axis. – MMB: Rotate box about its local y axis. – RMB: Rotate box about its local z axis. • Translate (keyboard shortcut T): Use x-motion of the mouse to: – LMB: Translate box along its local x axis. – MMB: Translate box along its local y axis. – RMB: Translate box along its local z axis. • Scale (keyboard shortcut S): Use x-motion of the mouse to: 4 – LMB: Scale box along its local x axis. – MMB: Scale box along its local y axis. – RMB: Scale box along its local z axis. The initial interaction mode should be model-rotate, and this mode should be restored on a reset. The amount of translation, rotation or scaling will be determined by the relative change in the cursor’s x value referenced to the value read at the time the mouse button was last moved. Make sure your program doesn’t get confused if more than one butto is pressed at the same itme; all the motion events should be processed simultaneously, as specified above, although individual “incremental” transformations can be compused in a fixed order. You should use appropriate scaling factors to map the relative mouse motions to reasonable changes in the model and viewing transformations. For example, you might map the width of the window to a rotation of 180 or 360 degrees. Do not limit the accumulation of rotations and translations; ie. there should be no restriction on the cumulative amount of rotation or translation applied to an object, or to the number of sequential transformations. Viewport Mode The viewport mode allows the user to change the viewport. Assume you have a square window into the world, and that this window is mapped to the (possibly non-square) viewport. The window-toviewport mapping has been described in lecture and in the optional course textbook; if the aspect ratio of the viewort doesn’t match the aspect ratio of the window (ie. the viewport is not square), then the objects appearing in the viewport will be stretched. Further, when you change the viewport, you will see the same objects in the new viewport (possibly scaled and stretched) that you saw in the old viewport. You should draw the outline of the viewport so we can tell where it is. In the viewport mode, the left mouse button is used to draw a new viewport. The left mouse button down event sets on corner, while the left mouse button up event sets the other corner. You should be able to draw a viewport by specifying the corners in any order. If a mouse up position is outside the window, clamp the edges of the viewort to the visible part of the window. The initial viewport should fill 90% of the full window size, with a 5% margin arond the top, buttom, left and right edges. This is important so we can verify that your viewoprt clipping works correctly – if you do not do this, you may lose marks in two places. The user should be able to set the viewport to any portion of the window, including sizes larger than the original size. Note also that the viewport is to be reset to the initial size when the reset option is selected from the File 5 menu. The keyboard shortcut for viewort mode should be V. Projective Transformation You will need to implement a projective transformation. This will make the cube look threedimensional, with the perspective foreshortening distinguishing front and back. You may use a projective transformation matrix if you wishs. However, note that for this assignment there is no need to transform the z-coordinate. You can use the mappings x/z and y/z, although note that some additional scaling will be necessary to account for the field of view. Orthographic View If you cannot get your projective transformation matrix working, you may implement an orthographic view (no perspective) instead. However, you will not get full marks. You may also want to implement an orthographic view first, and do your projective transformations last. Line Clipping You will need to clip your lines to the viewing volume. There are several ways to clip, any of which will suffice for this assignment. Note, however that you must clip to the near plane before completing the perspective projection, or you will get odd behaviour and coredumps. You may find it easiest to clip to the remaining sides of the viewing volume after you complete the projection (since you will be clipping to a cube), but you may clip at any point in your program. Note that we will be testing clipping against all sides of the view volume. Donated Code You have been provided with the following files: • main.cpp – The main point of entry into the application. • draw.cpp, draw.h – The drawing routines. • window.cpp, window.h – The application window, to which you may add widgets. • renderer.cpp, renderer.h – A widget that will display your rendering. This is where the core part of your code will go. • algebra.cpp, algebra.h – Routines for geometry, points, etc. • a2.cpp, a2.h – Matrix routines you should implement and use. 6 To compile and run the provided program, execute: qmake -project QT+=widgets qmake make ./a2 The provided code creates the UI for your simple box drawing program. As a test, it draws four lines, cross through the center of the screen, and in the top left corner. You need to modify this code to draw your visible viewport, render a box and the two gnomons, and perform the requested transformations and clipping. A suggested to-do list, in an order that will help you is as follows: • Draw the outline of the default visible viewport. • Consider an orthographic projection and define the coordinates necessary for drawing a box. Transform each 3D line segment into your 2D screen coordinates. You may wish to create a helper function that takes an arbitrary line segment, and draws it on the 2D screen. If this goes well, work directly with a perspective projection, otherwise leave it till later. • Extend your viewport to support resizing, and implement clipping. • Incorporate model transformations. Then incorporate view transformations. Make sure to leave sufficient time to debug the composition of matrices as you generate your final MVP transformation. • Wrap up the necessary UI controls and if not already done, perspective projection including near/far/FOV controls. You may wish to create helper methods, helper classes or use data structures such as queues or stacks, depending on your design. C++ standard template library offers stacks, queues and other collection mechanisms which may be used. Bonus (20 Marks) The core of this assignment is fundamentally a decent amount of work. However, if you have time, and the creative inclination, there are a lot of ways this simple graphics pipeline can be made much more interesting. You are encouraged to experiment with the code to implement these sorts of changes, as long as you have already met the assignment’s basic objects. The maximum additional marks from bonuses is 20. It is at the discretion of the TA to determine coolness factors in awarding bonus points. • A fancy way of drawing the viewport. (up to 5 marks) 7 • Additional geometric shapes; 3 marks per shape. (up to 10 marks) • Support for OBJ file loading. (5 marks) • Support and GUI support for adding, transforming and removing multiple 3D shapes on the screen. (10 marks) • Support face drawing (rasterization), including hidden surface and z-buffer algorithms. (10 marks) If you make an amazing modification (an actual feature, not an unintended bug…), document it in your README and it will be considered and graded at the discretion of the TA for a maximum of 10 marks. If you make extensive changes, additionally offer a “compatibility mode” by default. You should support at least the user interface required by the assignment. You can activate your extensions either with a special command line argument or a menu item. Document this in your README file. Non-functional Requirements (20 Marks) Documentation 1. You must provide a README file. A sample one has already been provided. 2. Your README file should contain: (a) Your name and UCID. (b) Short description of algorithms you implemented to complete the program. This includes how you set up the view volume clips and what you called the function that implements these clips. (c) A brief description of the data-structures you used to implement the assignment. This includes what matrices you chose to store in the renderer.cpp and their purpose. 3. You must provide at least one screenshot of your assignment demonstrating its capabilities. Additional screenshots are necessary to demonstrate any implemented bonuses. Screenshots should be named ‘firstname.lastname a2 #.png’ where # is 1-n for n screenshot images. Source Code 1. All your source code must be written in C/C++ and properly commented. All graphics rendering must be done using OpenGL. All event handling and windowing must be performed via Qt. Your source code must compile on the lab machines in MS 239 without any special modifications. Your source code must be clear and well commented. 8 2. You will lose marks for inefficient and slow implementations. 3. You may reuse source code: (a) which has been provided by the instructor for use in the course, (b) which has been written by you which implements basic data structures, such as linked lists or arrays, (c) which you have received permission from the instructor or one of the TAs of CPSC 453 prior to handing-in your assignment, 4. Any instances of code reuse by you for this assignment must be explicitly mentioned within the README file. Failure to do so will result in a zero in the assignment. Please read the University of Calgary regulations regarding plagiarism http://www.ucalgary.ca/ honesty/plagiarism. Functional Requirements (80 Marks Total) Transformations (30 Marks) 1. Model transformations performed with respect to the box’s local origin. (8) 2. Model’s gnomon undergoes all transformations except scaling. (4) 3. Viewing transformations work as specified. (8) 4. Rotation, translation and scale can occur in any order, at any time, with no restrictions on model or view transformation ordering. Regardless of the sequence, the box never distorts so that edges fail to meet at right angles (in 3D). (10) Viewing and Clipping (30 Marks) 1. Perspective transformation correctly implemented. (8) 2. Viewport mapping works as specified. Defaults to a centered square with 90% maximum size. (8) 3. Lines are clipped to the near and far planes. (7) 4. Lines are clipped to the sides of the viewing volume. (7) 9 UI Interaction (20 Marks) The user should be able to: 1. Access pull down menus for controls as specified. (5) 2. On-screen feedback for current mode as specified. (5) 3. Mouse controls for model, view and viewport as specified. (5) 4. Perform transformations smoothly while mouse is moving. Pressing two buttons simultaneously results in two transformations performed together. (5) Lost Marks Possible areas for losing marks: • Lines drawn outside the viewport region. • Gnomon does not follow box model. • Gnomon size scales. • Unable to see box and gnomons on application start up. • Poor choice of mapping from mouse x values to transformations (eg. cause excessively rapid or excessively slow transformations). Ideally the motion follows the mouse movement. • Poor cumulation of transformations. eg. As the mouse moves uniformly across the screen, the box translates faster and faster. • Application redraw slows down over time, as more transformations are applied. • Draw updating is not live with mouse movements. Demo You are required to give an approximately 5 minute live demo to your TA. Failure to show up at the presentation will result in a zero in the assignment. You will need to schedule your demo with your TA – they will have details about how your tutorial section demos will run. 10

$25.00 View

[SOLVED] Cpsc453 assignment 1 introduction to opengl

This assignment will practise working with graphics APIs (OpenGL, Qt, GLSL) to build a graphics application. The assignment will be written in C++ using the Qt GUI toolkit. In this assignment you will be working with simple OpenGL commands for drawing, using matrices for transformations and supporting basic GUI for interaction. The application is a game, where the user controls falling block formations to create solid lines within the well of game play. When a line is completed it is removed from the game. When blocks reach the top of the well, the game is over. This assignment is adapted, with permission, from Assignment 1 of CS488 – Introduction to Computer Graphics at the University of Waterloo. Game Play The game takes place in a U-shaped well of unit cubes enclosing a grid of width 10 and height 20, in which the block formations can fall. The blocks occupy discrete positions in the grid (ie. they don’t fall smoothly, but jump from position to position). Block formations start within a four unit tall region at the top of the well. Every time a predetermined interval elapses, the current formation falls one unit. The value of 500ms is a good novice interval; 100ms is more challenging. At any time, the current piece can be moved to the left or right, rotated clockwise or counter-clockwise, and dropped the rest of the way down the well. When the piece can fall no further, it stops and any rows in the well that are completely filled are 1 removed from the game. The game ends when a block cannot clear the starting region. You should have at least three different speeds at which the block formations fall. Interface The user interface will be written in Qt, a cross-platform application and UI framework used in industry by C++ developers. You will need to implement the follwing functionality. The letters in ”()” indicate the keyboard short cut; remember – both upper and lower case should work for the keyboard shortcut. • A File menu with the following menu items: – New Game (N): Start a new game. – Reset (R): Reset the view of the game. – Quit (Q): Exit the program. (This one is already implemented – do not break it!) • A Draw menu, with the following menu items: – Wireframe (W): Draw the game in wireframe mode. – Face (F): Fill in the faces of the game. Each different piece shape should have its own uniform colour. – Multicoloured (M): Similar to Face mode, but each cube has six faces of different colours (ie. no two faces should have the same colour). Funky colours and combinations are encouraged. The Draw menu should use radio buttons to indicate which state is selected. • A Game menu, with the following menu items: – Pause (P): Pause the game. – Speed Up (Page Up): Increase the speed of the game play. – Slow Down (Page Down): Decrease the speed of the game play. – Auto-Increase (A): Slowly and automatically increase the speed of the game play. A QTimer may be helpful with setting up game play timing. • Mouse Movements: – Mouse operations are initiated by pressing the appropriate mouse button and terminated by releasing that button. Only motion in the horizontal direction should be used. 2 – The left mouse button should rotate the game around the X-axis. – The middle mouse button should rotate the game around the Y-axis. – The right mouse button should rotate the game around the Z-axis. – When the shift key is pressed, use of any mouse button will uniformly scale the game – both the board and the pieces. When the mouse moves to the left, the game should become smaller. When the mouse moves to the right, the game should become larger. The maximum and minimum scales should be restricted to a reasonable range. You will need to make reasonable decisions about how much to scale or rotate for every pixel’s worth of mouse motion. For example, if the mouse isn’t moving, there should be no scaling or rotation. You are also required to implement a feature known as “persistance” or “gravity.” If, while rotating, the mouse is moving at the time that the button is released, the rotation should continue on its own. This decision should be made at the time of the release; after that it should persist independently of mouse movement, until the next button press. • Keyboard Input: – The left arrow key should move the currently falling piece one space to the left. – The right arrow key should move the currently falling piece one space to the right. – The up arrow key should move the currently falling piece counter-clockwise. – The down arrow key should move the currently falling piece clockwise. – The space bar should ‘drop’ the piece, sending it as far down into the well as it will go. Much of these actions are already implemented within the provided game code (game.h, game.cpp), however you will need to construct the appropriate GUI and OpenGL for handling and displaying this functionality. Qt, OpenGL and C++ Qt provides a great deal of GUI management, and has recently expanded to offer more support for OpenGL-style commands. For the assignment, you are to use the OpenGL commands directly where possible. If needed, using Qt to assist with shader loading is permissible. Use of the QMatrix4x4 Qt class, and other such classes is permitted. When building your data buffers to send to the provided shader (ie. vertices, per-vertex colours and per-vertex normals), use Vertex Buffer Objects and Vertex Array Objects. This is a more efficient display style. For more information, see the Qt documentation: http://doc.qt.io/qt-5/. 3 Walk Through The provided source code is a good starting ground for building your application. This includes: • main.cpp – The main entry point for the program. • renderer.cpp, renderer.h – The OpenGL widget, where all of the OpenGL-related code should go. • window.cpp, window.h – The application window. Most of the GUI-related code (menus, etc.) should go here. • game.cpp, game.h – A game engine that implements the core of the falling blocks game. Should not need to be modified. • per-fragment-phong.vs.glsl – Vertex shader used to determine the position of every vertex. Should not need to be modified. • per-fragment-phong.fs.glsl – Fragment shader used to determine the colour of each pixel. Should not need to be modified. To compile and run the start program, execute: qmake -project QT+=widgets qmake make ./a1 The provided code creates a user interface with an OpenGL window. As a test, it draws triangles where the corners of your game (not including the well) should appear. The camera is setup so that the triangles appear centered and correctly sized. You need to modify this code to render the current state of the game and respond to user interface events. A suggested to-do list, in an order that will help you is as follows: • Write a function to draw a unit cube using OpenGL. You can write a single cube to a Vertex Buffer Object (VBO). You would then create a Matrix4x4 model matrix for each cube and use the matrix functions to translate, rotate and scale this model. You will need to have a buffer of per-vertex unit-length normals to pass to the shader as well. These may be hard-coded for this assignment alone. • In your render function, draw a U-shaped border for the well, out of the cubes. • Implement face rendering and wireframe rendering. 4 • Implement rotation and scaling. You should be able to see the effect on the well. • Add code to draw the current contents of the game. Each piece type should be drawn a different colour – the colour is up to you. Note: The colour is sent off to the shader similar to the vertices. • Hook up a simple timer (using the QTimer class) that calls the game’s tick method, and re-renders. You should be able to see pieces falling. • Implement the rest of the controls for game play and the remaining user interface. Bonus (20 Marks) There are lots of ways this simple application could be modified to enhance playability and attractiveness. You are encouraged to experiment with the code to implement these sorts of changes, as long as you have already met the assignment’s basic objects. The maximum additional marks from bonuses is 20. • A scoring mechanism. (5 marks) • Head-to-head networked play. (10 marks) • Modified cubes for pieces. The blocks look much better if individual cubes have their edges slightly beveled. (5 marks) • Animations for certain events. For example, having the board spin around when you lose. (5 marks) • Additional light and lighting – requires shader modification. (10 marks) If you make an amazing modification (an actual feature, not an unintended bug…), document it in your README and it will be considered and graded at the discretion of the TA. If you make extensive changes to the game, additionally offer a “compatibility mode” by default. You should support at least the user interface required by the assignment. You can activate your extensions either with a special command line argument or a menu item. Document this in your README file. Non-functional Requirements (20 Marks) Documentation 1. You must provide a README file. A sample one has already been provided. 5 2. Your README file should contain: (a) Your name and UCID. (b) Short description of algorithms you implemented to complete the program. (c) A brief description of the data-structures you used to implement the assignment. Source Code 1. All your source code must be written in C/C++ and properly commented. All graphics rendering must be done using OpenGL. All event handling and windowing must be performed via Qt. Your source code must compile on the lab machines in MS 239 without any special modifications. Your source code must be clear and well commented. 2. You will lose marks for inefficient and slow implementations. 3. You may reuse source code: (a) which has been provided by the instructor for use in the course, (b) which has been written by you which implements basic data structures, such as linked lists or arrays, (c) which you have received permission from the instructor or one of the TAs of CPSC 453 prior to handing-in your assignment, 4. Any instances of code reuse by you for this assignment must be explicitly mentioned within the README file. Failure to do so will result in a zero in the assignment. Please read the University of Calgary regulations regarding plagiarism http://www.ucalgary.ca/ honesty/plagiarism. Functional Requirements (80 Marks Total) Display (25 Marks) 1. Support wireframe mode. (10) 2. Support face colour mode. (10) 3. Support multicoloured face mode. (5) 6 Game Play (25 Marks) The user should be able to: 1. Increase the speed of the game play (5) 2. Decrease the speed of the game play (5) 3. Work with the user interface as specified (menus, mouse interactions, etc). (10) 4. Play with the game as described under “Game Play.” (5) Transformations (30 Marks) 1. The game can be rotated. (10) 2. The game can be scaled. (10) 3. Persistence works for rotation. (10) Lost Marks Possible areas for losing marks: • Polygon vertices should be specified in counter-clockwise order (otherwise you may not see the face if you have backface culling on). • Persistent rotation shouldn’t start because of mouse movements for scaling. • Persistent rotation shouldn’t start, get faster, nor slow down on its own. • Normals should all point outside the cubes. • Radio button should be initialized correctly. • Persistence should only happen when the user releases the mouse button while the mouse is moving. • Not allowing the user to use two buttons at the same time. • Allowing negative scaling. • Jerky persistence. • Rotation and scaling should be continous, which means should start from where it was left last time and not resetting. • Uncontrollable rotation, scaling etc. e.g. Game rotates constantly, rotates a bit and resets right away, etc. 7 Demo You are required to give an approximately 5 minute live demo to your TA. Failure to show up at the presentation will result in a zero in the assignment. You will need to schedule your demo with your TA – they will have details about how your tutorial section demos will run.

$25.00 View

[SOLVED] CSCI 4211Python

CSCI 4211: Introduction to Computer NetworksSpring 2025PROGRAMMING PROJECT 2: Reliable Data TransferDue: Phase 1 - Mar 18th, Phase 2 - Mar 28th, 2024 at 11:59 p.m.Notes:● The description of this project is a bit long to provide you with as many details aspossible to help you get through it. Please spend some time reading it all theway through and make sure you have a full understanding of it before you startprogramming.● The use of generative AI is strictly prohibited for this project.1. Overview...................................................................................................................... 22. Project Details............................................................................................................. 32.1 Phase Overview.................................................................................................... 32.2 Phase 1: The Stop-and-Wait Protocol................................................................... 32.2.1 Finite State Machines................................................................................... 32.2.2 High-Level Description.................................................................................. 52.2.3 Helpful Hints..................................................................................................62.2.4 Expected Output........................................................................................... 72.2.4.1 Zero Loss and Corruption Probabilities................................................ 72.2.4.2 Non-Zero Loss and/or Corruption Probabilities.................................... 72.3 Phase 2: The Go-Back-N Protocol........................................................................ 92.3.1 Finite State Machines................................................................................... 92.3.2 High-Level Description................................................................................ 102.3.3 Helpful Hints................................................................................................122.3.4 Expected Output......................................................................................... 132.3.4.1 Zero Loss and Corruption Probabilities.............................................. 132.3.4.2 Non-Zero Loss and/or Corruption Probabilities.................................. 142.3.5 Extra Credit................................................................................................. 152.3.5.1 Part 1: Buffered Application Layer Messages [10 points]...................152.3.5.2 Part 2: Buffered Out-Of-Order Packets [5 points]............................... 162.4 Provided Starter Files.......................................................................................... 162.4.1 Skeleton Code............................................................................................ 162.4.2 Software Interfaces..................................................................................... 172.4.3 The Simulated Network Environment......................................................... 192.5 Testing and Evaluation........................................................................................ 2012.5.1 Stop-and-Wait............................................................................................. 212.5.2 Go-Back-N.................................................................................................. 213. Additional Help......................................................................................................... 223.1 Helpful Resources............................................................................................... 223.2 General Advice.................................................................................................... 224. Submission Information...........................................................................................234.1 Grade Breakdown............................................................................................... 234.2 General Grading Criteria..................................................................................... 234.2.1 Program Specifications / Correctness.........................................................234.2.2 Readability.................................................................................................. 234.2.3 Documentation............................................................................................ 244.2.4 Code Efficiency........................................................................................... 244.2.5 Assignment Specifications.......................................................................... 254.3 Gradescope Autograder Details.......................................................................... 254.4 What To Submit................................................................................................... 254.4.1 Phase 1....................................................................................................... 264.4.2 Phase 2....................................................................................................... 264.5 Common Error Checks........................................................................................ 261. OverviewThe goal of this project is to help you get familiar with reliable data transfer (RDT)protocols. You will implement rdt3.0 (Alternating-Bit-Protocol or Stop-and-Wait) andGo-Back-N, which were discussed in the lectures and textbook.In this project, you will write the sending and receiving transport-level code forimplementing an RDT protocol. This project should be fun since your implementationwill differ very little from what would be required in a real-world situation.Since you probably don’t have standalone machines (with an OS that you can modify),your code will have to be executed in a simulated hardware/software environment.However, the programming interface provided to your routines, i.e., the code that wouldcall your entities from above and below, is very close to what is done in an actual UNIXenvironment. Indeed, the software interfaces described in this project are much morerealistic than the infinite loop Senders and Receivers that many texts describe. Thestarting/stopping of timers is also simulated, and timer-interrupts will cause yourtimer-handling routine to execute.22. Project Details2.1 Phase OverviewThe project is divided into two phases, with a deadline and deliverable for each phase.Here is the overview of each phase:2.2 Phase 1: The Stop-and-Wait Protocol2.2.1 Finite State MachinesYour starting point to implement each protocol is understanding the relevant finite statemachines (FSMs) for the Sender and the Receiver. Each FSM explains:1. The possible states each Sender/Receiver can have [what is written inside eachcircle]2. The events that can happen at each state [conditions written above the horizontalline]3. The actions taken in response to each event [actions written below the horizontal line]Since the Stop-and-Wait finite state machines have multiple states, you need to use avariable to indicate the current state and update it when a transition in the FSM is made.Also, ensure that your code handles each event and takes the appropriatecorresponding actions.3Refer to the lectures and/or Section 3.4.1 of the textbook for a detailed explanation ofthe FSMs for Stop-and-Wait (rdt3.0). The receiver side of rdt3.0 is the same as rdt2.2.Figure 3.15: Stop-and-Wait rdt3.0 Sender.Figure 3.14: Stop-and-Wait rdt2.2 Receiver (and rdt3.0 as well).42.2.2 High-Level DescriptionImplement the following routines in the source code and any other helper functions youdesign to support the RDT from the Sender to the Receiver (only one direction) with asimulated lossy and noisy channel. These are the routines you are required toimplement:● Sender (SNW_Sender.py):○ The initialization of the Sender includes its initial sequence number, states,etc. Feel free to define any other relevant variables that you think arenecessary.The state can be WAIT_LAYER5 or WAIT_ACK:■ WAIT_LAYER5: The Sender waits for a message from theapplication layer (layer 5). The Sender can only send new packetswhen it’s in this state. This is the same as the "Wait for call from above" states in the Sender FSM.■ WAIT_ACK: The Sender waits for an ACK from the Receiver. Whenthe Sender is in this state, it can’t send a new packet even if itreceives a new message from the application layer. This is thesame as the "Wait for ACK" states in the Sender FSM.The sequence number is either 0 or 1, and it alternates based on thesequence number used in the last packet sent.○ S_output(message), where message is an instance of type msg andcontains data to be sent to the Receiver: This routine will be calledwhenever the Sender’s application layer has a message to send. It is thejob of your protocol implementation to ensure that the data in thismessage is delivered in order and correctly to the Receiver’s applicationlayer.○ S_input(packet), where packet is an instance of type packet: This routinewill be called whenever a (possibly corrupted) ACK packet sent by theReceiver (i.e., as a result of the to_layer_three() function being called bythe Receiver) arrives at the Sender. This is the same as the "Wait for call from below" states in the Receiver FSM.5○ S_handle_timer(): This routine will be called when the Sender’s timerexpires (thus generating a timer interrupt). You should use this routine tocontrol the retransmission of packets. See the provided description ofstart_timer() and stop_timer() below in Section 2.4.2 to understandhow the timer should be started and stopped.○ S_lost_packet(): This routine will be called by the simulator when a datapacket that was sent by the Sender was lost in the network. You mustupdate the appropriate counter (see Section 2.5) and can add printstatements in this function for debugging purposes.● Receiver (SNW_Receiver.py):○ The initialization of the Receiver includes the first expected sequencenumber, states, etc. Feel free to define any other relevant variables thatyou think are necessary.○ R_input(packet), where packet is an instance of type packet: This routinewill be called whenever a (possibly corrupted) data packet sent by theSender (i.e., as a result of the to_layer_three() function being called bythe Sender) arrives at the Receiver.○ R_lost_packet(): This routine will be called by the simulator when anACK packet that was sent by the Receiver was lost in the network. Youmust update the appropriate counter (see Section 2.5) and can add printstatements in this function for debugging purposes.2.2.3 Helpful Hints● How to handle timers:○ The Sender only needs one timer and will start and stop it when needed.Once the Sender sends any data packet, it will start the timer. When thetimer expires, the Sender will retransmit the last unacknowledged packetand start a new timer. The Receiver does not need to handle any timer, itjust needs to acknowledge the recently received correct data.○ You do not need to stop the timer when you are in S_handle_timer(), asit has already expired and been removed from the event list with the call ofS_handle_timer().62.2.4 Expected OutputAll of the following output was generated by sending 5 messages (i.e., nsimmax = 5).2.2.4.1 Zero Loss and Corruption ProbabilitiesIn the general test case without loss or corruption in the network, your output (excludingthe statistics section) should look like the following example. The output shows that allof the messages are received correctly.2.2.4.2 Non-Zero Loss and/or Corruption ProbabilitiesWhen the loss and/or corruption probabilities are set to a non-zero value, your outputshould show corrupted and/or lost packets, packets with wrong sequence oracknowledgement numbers, timeouts, etc. An example of such output (excluding thestatistics section) is shown below. The output shows that all of the messages areeventually received correctly.Note: Do not expect your output to be identical due to the non-deterministic behavior ofthe simulation when it’s configured with non-zero loss and corruption probabilities.782.3 Phase 2: The Go-Back-N Protocol2.3.1 Finite State MachinesFSM details for Go-Back-N are in Section 3.4.3 of the textbook. You can also use thisinteractive animation as a reference.Figure 3.20: Extended FSM description for the Go-Back-N Sender.Figure 3.21: Extended FSM description for the Go-Back-N Receiver.92.3.2 High-Level DescriptionImplement the following routines in the source code and any other helper functions youdesign to support the RDT from the Sender to the Receiver (only one direction) with asimulated lossy and noisy channel. These are the routines you are required toimplement:● Sender (GBN_Sender.py):○ The initialization of the Sender includes its initial sequence number, states,etc. Feel free to define any other relevant variables that you think arenecessary. The Sender must implement a window/buffer to hold packetsthat are in transit and specify its size (e.g., a size of 8).As you know from Lecture 10, you need to choose the maximumsequence number properly based on the relationship between the windowsize and the sequence number. This is necessary to avoid any confusionby the Receiver when determining whether the received packet is eithernew or a duplicate. Hence, if you have a window of size N, then the set ofpossible sequence numbers should have N + 1 values and rotate between1, 2, ..., N, N + 1, and then restart again from 1.○ S_output(message), where message is an instance of type msg andcontains data to be sent to the Receiver: This routine will be calledwhenever the Sender’s application layer has a message to send. It is thejob of your protocol implementations to ensure that the data in thismessage is delivered in order and correctly to the Receiver’s applicationlayer.This routine will sometimes be called when there are outstanding,unacknowledged messages in the network -- implying that you must buffermultiple messages in the Sender. Also, sometimes your Sender will becalled, but it won’t be able to send the new message because the newmessage falls outside of the window. Since the Sender’s buffer has amaximum number of slots available, which can be equal to the windowsize (e.g., 8), the Sender will simply drop this new message should all 8slots be in use at one point waiting for their ACK. In the “real world,” ofcourse, one would have to develop a more elegant solution to the finitebuffer problem!10Note: You are REQUIRED to implement a window/buffer. If you do notimplement it, then the behavior will be identical to Stop-and-Wait, and youwill lose points. The Sender should only be able to send new packets upto the window size and move the window up when it receives an ACK toallow space for sending more packets. For example, if the Sender has awindow size of 8, and it has sent 6 packets that are still unacknowledged,then it can afford to send 2 new packets. However, if its window is FULL,then it can’t send new packets, and its subsequent actions will depend onyour implementation. If you decide not to implement the extra credit partabout buffering new messages (see Section 2.3.5.1), then simply drop thenew message.○ S_input(packet), where packet is an instance of type packet: This routinewill be called whenever a (possibly corrupted) ACK packet sent by theReceiver (i.e., as a result of the to_layer_three() function being called bythe Receiver) arrives at the Sender.○ S_handle_timer(): This routine will be called when the Sender’s timerexpires (thus generating a timer interrupt). You should use this routine tocontrol the retransmission of packets. See the provided description ofstart_timer() and stop_timer() below in Section 2.4.2 to understandhow the timer should be started and stopped.You do not need a timer for each packet in the window, only one timer isenough. However, there may be many outstanding, unacknowledgedpackets in the network, so you'll have to think about how to use this singletimer effectively (see Section 2.3.3).● S_lost_packet(): This routine will be called by the simulator when a datapacket that was sent by the Sender was lost in the network. You mustupdate the appropriate counter (see Section 2.5) and can add printstatements in this function for debugging purposes.● Receiver (GBN_Receiver.py):○ The initialization of the Receiver includes the first expected sequencenumber, states, etc. Feel free to define any other relevant variables thatyou think are necessary.11○ R_input(packet), where packet is an instance of type packet: This routinewill be called whenever a (possibly corrupted) data packet sent by theSender (i.e., as a result of the to_layer_three() function being called bythe Sender) arrives at the Receiver.○ R_lost_packet(): This routine will be called by the simulator when anACK packet that was sent by the Receiver was lost in the network. Youmust update the appropriate counter (see Section 2.5) and can add printstatements in this function for debugging purposes.2.3.3 Helpful Hints● How to handle timers:○ The Sender in Figure 3.20 from the textbook uses only a single timer,which can be thought of as a timer for the oldest transmitted but not yetacknowledged packet. If an ACK is received and there are still additionaltransmitted but not yet acknowledged packets, then the timer should berestarted. If there are no outstanding, unacknowledged packets afterward,then the timer is just stopped. The basic reason behind this is that if theACKs are being delivered, then the Sender will restart the timer for thecurrent packets still in the window until their ACK arrives withoutretransmitting them. They will only be retransmitted when the timerexpires.● Circular buffer: A circular_buffer class has been provided to support thebuffer requirements for the Go-Back-N Sender.● Cumulative ACK:○ What to do with out-of-order packets is up to your implementation. Thesimulator will not change the order of the packets, but when the Sendersends some packets through the network up to N (window size), some ofthem could be corrupted or lost, and later ones could arrive without anyissues.○ If the Receiver does not buffer the out-of-order packets, then it will wait forall packets to be retransmitted. If the Receiver buffers the correctlyreceived packets, then after the retransmission of the corrupted and lostpackets, it can use a cumulative ACK to acknowledge the ones it alreadyhas stored in its buffer. The Sender won’t need to resend them with thismechanism in place (see Section 2.3.5.2 about extra credit).122.3.4 Expected OutputAll of the following output was generated by sending 5 messages (i.e., nsimmax = 5).The output for the Go-Back-N protocol should look similar in format to Stop-and-Wait’soutput, but not identical. The main difference between the two is that the output forGo-Back-N’s Sender includes information about the sliding window’s base value (thesecond value in the parentheses).2.3.4.1 Zero Loss and Corruption ProbabilitiesIn the general test case without loss or corruption in the network, your output (excludingthe statistics section) should look like the following example. The output shows that allof the messages are received correctly.Sender-side values: (state, send_base, seqnum)132.3.4.2 Non-Zero Loss and/or Corruption ProbabilitiesWhen the loss and/or corruption probabilities are set to a non-zero value, your outputshould show corrupted and/or lost packets, packets with wrong sequence oracknowledgment numbers, timeouts, etc. An example of such output (excluding thestatistics section) is shown below. The output shows that all of the messages areeventually received correctly.Note: Do not expect your output to be identical due to the non-deterministic behavior ofthe simulation when it’s configured with non-zero loss and corruption probabilities.Sender-side values: (state, send_base, seqnum)142.3.5 Extra CreditThere are two different parts that you can implement to earn additional points. You donot have to implement both of them.Note: You need to add an Extra Credit section in your Phase 2 report to discuss whichparts you implemented and how they work. Your code needs to be working to receivethe extra credit points. Also, include your answers to the proposed questions for eachpart in this report section.2.3.5.1 Part 1: Buffered Application Layer Messages [10 points]In the default scenario, if the window is not full, then a new packet is created and sent,and variables are appropriately updated. If the window is full, then the Sender simplydrops the data. The application layer would have to try again later.For the bonus implementation, the Sender would instead buffer this data (but notimmediately send it and assign it a sequence number) until the window is no longer full.Later, the Sender can send the buffered data when there are available sequencenumbers to use (i.e., when the Sender receives an ACK from the Receiver for theunacknowledged data currently in the window). Ensure that the Sender doesn’t havemore outstanding and unacknowledged data packets than the window size at any giventime.Question: What are at least two advantages of using this buffer?Note: For this part, the buffer and window size are two different things, as shown in thediagram below. For example, the buffer size can be 50, and the window size is 8. Thesend_base can point to the current packet in the buffer, say position 30, the sequencenumbers can be from 1 - 9, and the next place the Sender will store the next packet willbe send_base + nextseqnum. Then, when the Sender reaches the end of the buffer atposition 50, it can restart the buffer and fill packets at the beginning position of 1.152.3.5.2 Part 2: Buffered Out-Of-Order Packets [5 points]Implement a Receiver buffer to handle out-of-order packets. Remember that whenthere is a timeout, the Sender will resend all packets in the current window; some ofthem could have been corrupted, lost, or delivered correctly but out of order (i.e., nothaving the next expected sequence number). The default behavior for the Receiver is todrop these packets and wait for the Sender to resend them along with the ones thatwere corrupted or lost. So the bonus part is to implement a buffer to store thesecorrectly received packets at the Receiver (even if they’re out of order) until theexpected packets before them arrive, and the Receiver can then use a cumulative ACK(see Section 2.3.3) to acknowledge all of the packets that it has correctly received. Forexample, suppose that the packet with sequence number 8 was lost, the packet withsequence number 9 was corrupted, and the Receiver correctly received a packet withsequence number 10. The Receiver can buffer the packet with sequence number 10,and after it correctly receives packets 8 and 9, it can send a cumulative ACK for packet10 and deliver packets 8, 9, and 10 to the application layer. Include in your Phase 2report a screenshot with and without this part implemented to show the difference inoverall behavior.Question: What are the advantages of using a buffer at the Receiver’s side? Is thisrelated to any other mechanism we have studied in Chapter 3? If yes, then which one?2.4 Provided Starter Files2.4.1 Skeleton CodeYou are provided with starter code files that are written in Python. The provided Senderand Receiver code files (SNW_Sender.py, SNW_Receiver.py, GBN_Sender.py, andGBN_Receiver.py) are skeletons that you will need to complete according to theinstructions in the above sections. Also, the skeleton code files include TODOcomments for what you need to do and where. Remember that the TODO commentsare purposefully not a complete step-by-step guide that you should blindly follow andthat you will need to think on your own about what else the Sender and Receiver mayneed to do. If a piece of code doesn’t have a TODO comment, then it should not bemodified at all. Also, don’t forget to use the included FSMs as a guide. All of the otherprovided code files are complete and don’t require any changes to be made except for afew in the simulator (simulator.py) when testing your code (see Section 2.5).You can run the code for each phase by executing its corresponding main file, which ismainSNW.py for Phase 1 and mainGBN.py for Phase 2.16Note: If you wish to complete the project in Java, then you need to contact theinstructors or TAs and receive explicit permission from them. Just know that if youchoose to use Java, then you will need to implement all of the code completely fromscratch. In addition, we highly recommend that you choose to implement the project inPython because the Gradescope autograder will only function for Python submissions.2.4.2 Software InterfacesThe procedures described in Sections 2.2.2 and 2.3.2 are the ones that you areREQUIRED to write. The following routines are provided for you and should be calledby your routines:● start_timer(calling_entity, increment), where calling_entity, for all thefollowing functions, is either the character "S" to represent the Sender or "R" torepresent the Receiver, and increment is a float value indicating the amount oftime that will pass before the timer interrupts. The timer should only be started (orstopped) by Sender-side routines that use the value of self.estimated_rttdefined in the Sender’s class to indicate the round trip time (RTT) between theSender and the Receiver. If this function is called when a timer is alreadyrunning, then it will stop the previous timer and start a new one. Thestart_timer() method is implemented in the event_list class.Example function call: evl.start_timer(self.entity, self.estimated_rtt)● stop_timer(): You should call this function to stop the current timer. It isimplemented in the event_list class.Example function call: evl.stop_timer()● to_layer_three(calling_entity, packet), where packet is an instance ofpacket: Calling this routine will cause the packet to be sent into the network,destined for the other entity. It is implemented in the simulator class.Example function call: to_layer_three(self.entity, packet)● to_layer_five(calling_entity, message), where message is an instance of msg:With unidirectional data transfer, you should only be calling this function in theReceiver’s code with calling_entity equal to "R". This routine will cause themessage to be passed up to layer 5. It is implemented in the simulator class.Example function call: to_layer_five(self.entity, packet.payload.data)17● get_checksum(): This function computes the checksum of a packet’s currentcontents and can be used to verify the checksum stored within the packet. It isimplemented in the packet class.Example function call:if (received_packet.checksum == received_packet.get_checksum())● send_ack(calling_entity, acknowledgment_number), where theacknowledgment_number is an integer: With unidirectional data transfer, youshould only be calling this function in the Receiver’s code with calling_entityequal to "R". This function can be used to send an explicit ACK (correctacknowledgment number) or implicit NACK (acknowledgment number for the lastcorrectly received packet) from the calling entity to the other entity. It isimplemented in the packet class.Example function call: send_ack(self.entity, 0)● Update functions: Multiple fully implemented update functions are provided in theSender and Receiver code files and should be used throughout your code toeasily update key variables.● S_/R_print_state_transition(transition_event), where transition_event isone of the possible transition events based on the FSMs: Relevant informationabout a state transition will be printed to the terminal. Immediately after theSender or Receiver does a state transition (i.e., by following an arrow) andupdates key variables according to the corresponding FSM, this function shouldalways be called.Example function calls:● S_print_state_transition(self.correct_ACK)● R_print_state_transition(self.corrupt_data)● S_print_circular_buffer(): This function is only implemented in the Go-Back-NSender because a circular buffer is not used in Stop-and-Wait. This functionprints out the size of the circular buffer and the sequence numbers of thecurrently buffered packets in a readable format, which will be useful fordebugging. Call this function at your discretion.182.4.3 The Simulated Network EnvironmentA call to the to_layer_three() procedure sends a packet into the network. Yourprocedures S_input() and R_input() are called when a packet is to be delivered fromthe network to your transport layer protocol. The network is capable of corrupting andlosing packets. It will not reorder packets. Before you run the simulation, you will needto specify the following values regarding the simulated network environment in thesimulator class:● Number of messages to simulate (nsimmax): The given emulator (and yourroutines) will stop as soon as this number of messages has been passed downfrom layer 5, regardless of whether or not all of the messages have beencorrectly received at the Receiver. Thus, you don’t need to worry aboutundelivered or unacknowledged messages still in your Sender when thesimulation stops.● Loss (lossprob): You will update this value to specify a packet loss probability. Avalue of 0.1 would mean that one in ten packets (on average) is lost. Thisincludes data and ACK packets. ● Corruption (corruptprob): You will update this value to specify a packetcorruption probability. A value of 0.2 would mean that one in five packets (onaverage) is corrupted. Note that the contents of the payload and sequencenumber fields can be corrupted. This includes data and ACK packets.Note: If the values of lossprob and/or corruptprob are very high (i.e., at least 0.8),then your simulation may get stuck in an infinite loop. This will occur because almostevery packet will be lost or corrupted, which will cause many retransmitted packets thatwill also be lost or corrupted, and so on. If this happens, then stop the simulation,increase Lambda or decrease the probabilities, and restart the simulation.● The average time between messages from the Sender’s layer 5 (Lambda): Youcan set this value to any non-zero, positive value. Note that the smaller the valueyou choose, the faster packets arrive at the Sender’s RDT Protocol from layer 5.You should choose a value large enough for the average time betweenmessages so that the Sender is not called while it still has an outstanding,unacknowledged message it is trying to send to the Receiver. We suggest thatyou choose a value of 1,000. More values will be suggested in Section 2.5.192.5 Testing and Evaluation● To test your code, you need to update the values of the nsimmax, lossprob,corruptprob, and Lambda varia

$25.00 View

[SOLVED] IT for Success of Everyday Life and Work

IT for Success of Everyday Life and Work Office Project This project contains four tasks, which should be completed using Microsoft Excel, Microsoft Word, and Microsoft PowerPoint. We have covered MS Excel, Word, and PowerPoint in class. The project can be done individually or in a group of 2 students. You can only form. your group within your section! The due date is 11:59pm, March 29th. Late submission will NOT be accepted. Attention: •      Plagiarism will lead to zero mark. Plagiarism includes copying anything from online or anyone alive or dead. The information presented by different students must be quite different from one another. Students whose work being copied by other students will also receive zero mark. •      All your text should be written in English. Please follow the UIC policy. Chinese version means Zero. •      Double check to make sure you have handed in the correct files and can be opened properly, otherwise you will get zero. •    REMEMBER always submit your project at least one hour earlier than the due date. •    For those who choose to do this project in a group, please submit by one student only. If two students submit different files, only one version would be graded randomly. •     Compress  all  three  files  “********+********.xlsx”  ,  “********+********.docx”, “********+********.pptx” (******* should be replaced by your and your partner’s student ID ) into a file named “Project _Section####_********+********”(#### is your section ID and ******* is your student ID), and then submit the zip file onto iSpace. Tasks: Part I: (Microsoft Excel) Suppose you are employed in a company that aligns with your field of expertise. After six months of work, you are preparing a report for your boss to provide valuable suggestion on a specific topic based on the data you have collected. To develop the content for the report, follow the steps outlined below: 1.   Set up tables Considering your major and relevant business scenario, design the necessary data items and values. You can refer to the example.xlsx file, in which we have created using the assumption of a Human Resources officer. If you choose to use the example provided by us, the full mark will be 90% (Please check the Rubrics to see how it will be graded.) If you choose to use the example provided by us, ensure that you adhere to the instructions outlined in the "Instruction" sheet. You may also modify the data items to suit your specific field or areas of interest. Always consider that the data and values entered should be sensible and meaningful. Extreme or irrelevant values should be avoided, as the ultimate goal is to draw valuable conclusions from the data analysis. 2.    Calculate meaningful data Utilize the collected data and Excel functions to derive significant metrics and indicators. These calculations will provide insights and support the conclusions drawn in your report. Utilize at least three basic functions (for example, average, max, count, min, sum, if etc.) and at least five advanced functions (or example, sumif, vlookup, nested if etc.) to calculate the required data. Review the Sheet2 of example.xlsx to determine what kind of data can be calculated to support your ideas when providing valuable suggestions to your boss. 3.   Create charts To visually represent the calculated data from the tables in example.xlsx Sheet2, extract the important columns and generate relevant charts. Refer to the Sheet3, in our example, as shown in the bar chart and the pie chart, you can conclude that managers in Shanghai have shown the best performance. By representing the calculated data through charts and graphs, you can enhance comprehension and facilitate effective communication of your findings to your boss. Note: If you choose to use the example provided by us, please make sure your charts are different from the charts we provided, otherwise you will get 0 marks for this part. 4.   Create a slicing and pivot table to visualize the data dynamically. Refer to “data visualization” topic in weekly topic 3, add a slicing and a pivot table to the “PivotTable” sheet (Refer to the PivotTable sheet in our example.xlsx). The slicing and the pivot table should be able to show data dynamically according to different city or category. If you work on your own topic, it doesn’t have to be city, just make it reasonable. Note: If you choose to use the example provided by us, please make sure your pivot table is different from the pivot tables we provided, otherwise you will get 0 marks for this part. Please ensure that your spreadsheet meets the following requirements: Requirements: Your spreadsheet should include: •      Basic functions (Functions mentioned in the topic “Excel Basic” in weekly topic 2 such as sum, average, max, min, etc.), at least 3 functions. •      Advanced functions (Functions mentioned in the topic “Excel Advanced” in weekly topic 3 such as vlookup, sumif, countif, datedif, etc.), at least 5 functions. •      Charts (pie, column, line, etc.), at least 1 chart. •      Pivot tables with slicing, at least 1 pivot table with slicing. (Refer to “data visualization” in weekly topic 3) •      Save the Excel document with the name "********+********.xlsx" (replace "*******" with your and your partner’s student ID). Part II: (Microsoft Word) Use Microsoft Word to write a report based on the spreadsheet file you have created in Part I. The report should at least include several paragraphs as follows: 1. Introduction:  Begin  with  explaining  the  purpose  and  rationale  behind  collecting  the specific data items. Elaborate on how these data contribute to overall goals of the project or analysis (why you collect these data.) 2. Data processing: Describe the methods to process the collected data. Discuss any data cleaning activities, transformations, or calculations performed to derive meaningful insights. 3. Findings: Present the key findings and observations resulting from the data analysis. Use clear and concise language to communicate the significant trends, patterns, or correlations discovered in the data. 4. Conclusions and Recommendations: Explain the implications of the findings and their relevance to the project objectives. Provide actionable recommendations or suggestions to your boss based on the conclusions drawn from the data analysis. In addition to the content requirements, adhere to the following formatting guidelines to ensure a well-structured and visually appealing report. The content will be not judged, but all the detailed technique involved in Word file will be graded: •   Use different colors and font sizes. •   The document must be between four and seven pages, including the table of contents. •   Utilize the built-in Table of Contents feature in Microsoft Word to generate a table of contents. •   Using Heading Styles in the Home tab creates three main sections, each containing two or more subsections, providing a clear organizational structure for your table of contents. •   Include a bibliography formatted in IEEE (2006) style. at the end ofthe report. Make sure to include at least one citation within the document. •   Incorporate at least one picture in the report with a caption below it. •   Include at least one table in the report with a caption below it. •   Ensure cross-references to tables and pictures are provided within the document. •   Utilize bullet points to enhance readability and effectively present information. •   Insert a hyperlink to an external website to provide additional context or resources related to the report's content. •    Set the header in the center with "IT Section_####_Project" (replace "####" with your section number). •   Place the student ID in the left side of the footer, and the page number on the right side of the footer. •   Save the Word document with the name "********+********.docx" (replace "*******" with your and your partner’s student ID). Part III: (Microsoft PowerPoint) You will present your ideas/suggestions in a company conference. Use what you have from part I and part II to create a PPT file for your presentation. You may generate the original PPT file from the  Word  document  you  have  from  Part  II.  Your  PPT  slides  should  meet  the  following requirements: •   At least 5 slides, excluding the title slide. •   No more than 10 slides, excluding the title slide. •    Select a design theme that suits your preferences •   Use different colors, font sizes, and formatting techniques to emphasize the main points and make the content visually appealing •   Utilize bullet points and sub-bullet points with correct indentation to organize information and enhance readability. •   Incorporate at least one relevant image that supports or illustrates key concepts in your presentation. Ensure that the image is high-quality and properly credited, if necessary. •   Include at least one table to present data or comparative information in a clear and structured manner. •   Use at least one animation effect to enhance the presentation and draw attention to specific elements or points. Be cautious not to overuse animations, as it can distract the audience. •   Apply at least one transition effects to smoothly transition between slides and maintain the flow of the presentation. Choose transitions that are appropriate for the content and maintain professionalism. •   Use the slide master function to insert the UIC logo, provided in the project zip file, into all slides except the title slide. This helps maintain consistency and branding throughout  the presentation. •    Save the PowerPoint file with the name "********+********.pptx" (replace "*******" with your and your partner’s student ID).

$25.00 View

[SOLVED] MATH 10 LEC A

MATH 10 LEC A Project Instructions Introduction For the final project, you will share a Deepnote project analyzing a dataset of your choice. Logistics The following are requirements to receive a passing score on the course project. Due date: Wednesday, March 19th 2025, 11:59pm California time. This is an individual project (not a group project). Use the Project Template available on Canvas-->Final Project. Using the Share button at the top right on Deepnote, enable public sharing, and enable Comment privileges. Then submit the created link on Canvas. The primary focus of the project must be on something involving data, and primarily using one or more datasets that weren’t covered in Math 10. You can use datasets that are built in to a Python library like Seaborn or scikit-learn, or you can upload the dataset to Deepnote yourself, such as a dataset that you downloaded from Kaggle, that you got from openml.org, or that you got from UC Irvine’s own Machine Learning Repository. (Warning. Deepnote does not allow datasets larger than 100mb to be uploaded.) The project should clearly build on the Math 10 material. If you’re an expert in Python material that was not covered in Math 10, you are of course welcome to use that, but the project should use the topics of Math 10 in an essential way (see the rubric below). Answer the questions at the top of the Deepnote template. Here are examples of student projects from Spring 2023, taught by Professor Christopher Davis, and examples of student projects Summer 2023, taught by Dr.Yasmeen Baki Anything that is taken from another source (either the idea for the project or a piece of code, even if you edit that code) should be explicitly referenced with a link. (For example, you could write, “The configuration of this Altair chart was adapted from [link].”). Rubric The course project is worth 20% of the course grade, and we will grade the project out of 40 total points. 1. (Clarity, 12 points) Is the project clear and well-organized? Does it use good coding style? Is the code Pythonic (for example, avoiding unnecessary for loops) and DRY (avoiding unnecessary repetition)? Does it explore one or more clearly described datasets, and is it clear where those datasets came from? Use text and markdown throughout the project to help the reader understand what is going on. Is the reasoning clear? (It’s fine if you have negative results like, “so there is no clear connection between these variables”. In fact, I prefer those sorts of results as opposed to unbelievable claims.) Give your project a relevant title (like “Species of penguins” rather than “Math 10 project”). 2. (Machine Learning, 10 points) Does the project explore the data using a variety of tools from scikit-learn? Does the project refer to essential aspects of data analysis, such as over-fi#ng, or the importance of a test set, or feature engineering, or the difference between classification and regression? 3. (pandas, 6 points) Does the project make essential use of pandas to explore the data? Using pandas to read and store the data is not sufficient. It should also be used either to clean the data, or to analyze the data, or for performing feature engineering. 4. (Altair, 6 points) Does the project include a variety of interesting charts, made using Altair? Do we learn something about the data from these charts? 5. (Extra, 6 points) Does the project include material that was not covered in Math 10? (This could include different libraries, different machine learning algorithms, or deeper use of the libraries we covered in Math 10. Here are a few possible topics: K-nearest neighbors, K-means clustering, Neural Networks, Kaggles, Big-data, different python libraries, etc, but you’re very encouraged to choose your own.) Advice Here is some general advice about the project. Don’t repeat the same technique multiple times unless it’s really essential. For example, having one interesting chart and a different less interesting chart is better than having the same interesting chart made for two different datasets. (Of course, if you can find a DRY way to make many related charts, then that’s great.) Don’t spend too much time searching for the perfect dataset or the perfect idea. Having a great dataset is less important for the project than exploring the dataset in an interesting way. Keep your statements reasonable. It’s perfectly fine to conclude something like, “Therefore, we did not find a connection between A and B.” What I most want from your project is to see what you’ve learned in Math 10. If you were already an expert on Python before the class and you write a project based on different material, that probably won’t get a good grade, even if it’s very advanced. Include many markdown cells (possibly very short, just one sentence) explaining what you are doing. (These are different from Python comments.) If you want to use bold text in your markdown cell, surround the text by two stars **like this**. Be sure you’re doing this in a markdown cell, as opposed to in a Python comment after a # symbol. I already wrote it above but it’s worth repea!ng. Please err on the side of referencing everything. If your project is based on an idea you saw somewhere else, that’s totally fine, but include a clear link in your project to the original source. If your project is based on a tutorial, then it will be primarily graded based on what you’ve added to the tutorial. For example, do you make it clear that you understand what’s happening in the tutorial? Frequently asked ques!ons. Is there a length requirement? There is no specific length requirement, but as a rough estimate, spending approximately 12 productive hours on the project would be a good amount. (The word “productive” is important. Time spent browsing tutorials or datasets is not productive in this sense if you don’t end up using that material.) What should I focus on? The primary content should be from one or more of the Math 10 tools (pandas, Altair, scikit-learn). If you like pandas much more than Altair, for example, then it’s okay to go more in-depth in the use of pandas, and less in-depth in the use of Altair, but you still need to include both. Do I need to get original research results? No! If you explore the data in an interes!ng way, but can’t find any interes!ng conclusions, that’s fine. In fact, I prefer that to making claims that the data does not support. What if a lot of my work was done cleaning the data, but it does not appear in the project? Include those cleaning steps in the project! (If the work was done outside of Python, like in Excel, then that portion will not count.) Can I use a different plotting library? You need to use Altair for the Altair portion of the rubric. You can definitely use a different library (like Seaborn, Plotly, or deeper aspects of Matplotlib) for the extra part of the rubric. What if I’m worried my project is too short? It’s fine to switch to a different topic halfway through your project. If you finish what you originally planned and want to start something different, that’s fine, even if it uses a different dataset. This isn’t like a history paper where you should have a coherent focus from start to end. Can you look at my project early? I’m happy to give a quick first impression and let you know if I have any immediate sugges!ons. (I won’t have !me to read it thoroughly un!l the final submission.) How can I use an Excel file instead of a CSV file? Just open the file in Excel (or Google Sheets), save it as a comma-separated csv file there, and then upload that csv file.

$25.00 View

[SOLVED] Homework 3 - CS 2204 - Spring 2024

Homework 3 - CS 2204 - Spring 2024 1.   Given the following 2’s complement binary numbers, determine their decimal value. Show your working. a.   10001010 b.   01101101 c.    11110010 d.   10110101 2.   Given the following decimal numbers, determine their 12–bit binary value in 2’s complement. Show your working. a. –376 b.   983 c. –12 d. –1311 3.   Perform. the following operations involving n–bit 2’s complement numbers and indicate whether arithmetic overflow occurs. You can check your answers by converting to decimal sign magnitude form. Show your working. a.   1011 + 0101 b.   1001 – 0110 c.   001110 – 101001 d.   010100 – 010110 e.   11110000 + 00011111 4.  Design a circuit that converts 4–bit numbers from 2’s complement to signed magnitude binary. You may use MUXes, AND/OR/NOT’s, and 4–bit adders. An n-bit adder is defined with two n-bit inputs x[n-1:0] and y[n-1:0] and cin, and with outputs s[n-1:0] and cout. 5.  Design a circuit for the following: Given two 4–bit numbers x and y, count the number of bits that are different between x and y. 6.  Design a circuit to compute (x+y)%13 for two 4–bit unsigned inputs x and y. You may use MUXes, AND/OR/NOT’s, and 4– or 5–bit unsigned adders. 7.   (Extra Credit) Prove that given an n–bit binary number X = [Xn – 1, …, X0] in 2’s complement,

$25.00 View

[SOLVED] ENGY7002 Energy and Development Semester 1 2025

ENGY7002 Energy and Development, Semester 1, 2025 Group Project: Community Energy Proposal Weighting: 40% of your total mark. Assessment Criteria: See supporting marking rubric. Due Date: 24 March 2025, 4pm (Brisbane time) Your community: Student teams will develop a proposed energy solution for a remote Queensland community to transition away from diesel power generation to a renewable energy system as part of Ergon Energy’s Isolated Networks Strategy. Communities to choose from: •    Waiben, Thursday Island •     Mer, Murray Island •     Masig, Yorke Island •     Gununa, Mornington Island •     Palm Island •     Mapoon •     Doomadgee The report: Teams will prepare a report detailing their proposal, with the audience being key community stakeholders and Ergon Energy.  The report should include an assessment of appropriateness of your chosen energy solution, proposed business model and the wider community impacts. Your submission must use the frameworks and tools discussed in the intensive modules to consider the local context, develop an appropriate energy solution and detail the implementation strategy. Your report should include: •     Executive Summary (1 page). •     Introduction and context (1 page) •     Proposed energy solution (1 page) • Stakeholder identification and assessment: identification of key stakeholders to be engaged, their positions and their contact details; along with an assessment of their power and influence (2 pages) •    Assessment of community context (particularly relating to energy needs) using the: • Energy Service Cascade (2 pages) • Sustainable Livelihood Framework (2 pages) • Appropriate technology assessment: Demonstration of appropriateness of the proposed energy system using comparative analysis from developed criteria relevant to the community (2 pages). • Business Model: Proposed implementation articulated through the Business Model Canvas for the specific community context (2 pages) • Communications and Engagement Plan: Details of planned activities that would take place during the lifecycle of the proposed project pertaining to relevant stakeholders (2 pages) • Conclusions and recommendations (1 page) •     References (≥1 page) Division of responsibilities: For teams of 5 members, all 5 of the frameworks must be included in the submission - one per team member. For groups of 4, either the Energy Service Cascade or the Sustainable Livelihoods Cascade may be omitted. See the table below for clarification: Responsibility Team of 5 Team of 4 All team members Executive Summary Introduction and context. Proposed energy solution. Stakeholder identification and assessment. Conclusions and recommendations Executive Summary Introduction and context. Proposed energy solution. Stakeholder identification and assessment. Conclusions and recommendations Team member 1 Energy Service Cascade Energy Service Cascade OR Sustainable Livelihoods Framework Team member 2 Sustainable Livelihoods Framework Appropriate Technology Team member 3 Appropriate Technology Business Model Team member 4 Business Model Communications and Engagement Plan Team member 5 Communications and Engagement Plan The marking rubric is designed to assess both individual and group components. Individually, each group member must be responsible for use of one of the frameworks and marked accordingly. Additionally, a proportion of the mark is allocated to the group sections of the report and ability to write a coherent proposal. See the rubric for clarification of how marks will be awarded. A table indicating which team member completed which section of the report, must be included in the appendix. The appendix may also be used to include additional details to support the main body of report.

$25.00 View

[SOLVED] Comprehensive Exam MS in Biostatistics

Comprehensive Exam, MS in Biostatistics The dataset Osteoporosis.csv will be used for problems 1 and 2. These data come from a study of the demographic, lifestyle, and dietary factors with bone mineral density (BMD) and osteoporosis (Chaudhari et al., 2019, PMCID: PMC6556264). The study included 169 participants aged at least 50 years old, seen in hospitals of Kathmandu, Nepal. The participants were administered questionnaires, and had their bone density measured via dual-energy X-ray absorptiometry (DEXA scans) in three locations: lumbosacral spine, right femur, and left femur. The variables in the dataset are: age                age in years sex                 participants’ sex (male, female) occupation      participants’ occupation ethnicity          participants’ ethnicity (Brahmin chhetri, Janjati, Newar, other) bmi                 body mass index (BMI), in kg/m2 bmd                bone mineral density (BMD) T-score, in standard deviations, compared to healthy 25-35 year olds of same sex and ethnicity. Computed as the lowest T-score from the three DEXA scan locations (lumbosacral spine, right femur, left femur) diagnosis         osteoporosis (BMD ≤ −2.5), osteopenia (-2.5 < BMD ≤ −1), or normal (BMD > −1) op                   osteoporosis indicator (1 if BMD ≤ −2.5, 0 otherwise) smoking           smoking status (yes, no) alcohol             alcohol consumption (yes, no) exercise            daily exercise (yes, no) tea                   tea consumption (yes, no) calcium             estimated dietary daily calcium intake, in mg vitamind            estimated dietary daily vitamin D intake, in IU l.femur              BMD T-score measured in the left femur r.femur              BMD T-score measured in the right femur lumbosacral       BMD T-score measured in the lumbosacral region of the spine Please use appropriate plots, statistics and explanations in your answers below. 1. Problem 1: Osteoporosis Consider the relationship between the response bone mineral density (BMD) and the predictor BMI. (a) Describe the linear association between BMD and BMI quantitatively in a simple sentence. However, show that model diagnostics suggest that the association may not be linear throughout the BMI range. (b) A BMI ≥ 25 defines overweight. A careful analysis suggests that in this range, the benefit of BMI is greatly diminished. Fit a linear spline (broken-stick) model with a knot at BMI = 25. Is there statistical evidence for different BMI slopes when BMI < 25 and when BMI ≥ 25? (c) Fit the model BMD ∼ sex + age + sex × age. On a single plot show the relationship between BMD and age, separately for men and women. Use different colors for men and women in the plot. (d) What is the age slope for men? Include a 95% CI and p-value. Does BMD decline with age for men? (e) What is the age slope for women? Include a 95% CI and p-value. Does BMD decline with age for women? The BMD variable was computed as the minimum T-score of the DEXA scans at three locations for each individual (lumbosacral spine, left femur, right femur). The BMD from the individual locations are available in the dataset. (f) Are there any systematic differences in mean BMD between the three DEXA scan locations? Produce an appropriate graph. Demonstrate the pairwise differences statistically, if there are any. (g) Is a correction for multiple comparison appropriate in the context of this analysis comparing the BMD at the three DEXA scan locations? If so, does this affect your results? (h) Instead of calculating BMD as the minimum of the three DEXA measurements (analysis A), another approach is using the first principal component without centering (analysis B), while a third approach is using the average of the three measurements (analysis C). Compare these three BMD definitions graphically and quantitatively in terms of their values, the weights applied to the three individual scan locations, and interpretability. Do all three BMD definitions have the same units of measure? 2. Problem 2: Osteoporosis Please be sure you answer the questions which ask you to ’summarize’ or ’interpret’ or ’discuss briefly’- please demonstrate your ability to communicate what you have done and what it means!! Credit will be given for all reasonable answers, even if not exactly as intended. :) We use the data from the Osteoporosis study to conduct a brief study of the association of alcohol use with a diagnosis of osteoporosis. We consider the biological variables age, sex and BMI, because they are well-known to be strongly associated with osteoporosis (younger age has lower risk of osteoporosis, low BMI has higher risk of osteoporosis because of associated hormonal changes). We also consider the dietary factors calcium intake and vitamin D intake (low is bad) and the modifiable health behaviors alcohol consumption (presumably bad), exercise (presumably good), and smoking (presumably bad). The varables are listed below for your convenience. (a) First, we investigate the association of alcohol use with osteoporosis, without adjusting for any other variables. Write a short paragraph that summarizes the number of alcohol drinkers and non-alcohol drinkers in the study; the prevalence of osteoporosis among the drinkers and the non-drinkers; and gives the difference in risk of osteoporosis between alcohol drinkers and non-drinkers. Include confidence intervals where appropriate. Does this difference in risk demonstrate that alcohol consumption leads to a reduction in the risk of osteoporosis? (b) Next, we investigate multivariate models which study the joint effects of predictors on the risk of osteoporosis. Create appropriate factors as defined below, and set the reference level for all predictors to the presumed or known low-risk category. Please use categorical versions of the variables for all of Question 2. • Age60, an indicator for age 60 years or older • LowBMI, an indicator of BMI < 25 (i.e. not overweight) • LowCalc, an indicator of dietary calcium < 500 mg • LowD, an indicator of vitamin D intake < 600 iu Fit a model with only the known biological predictors of age (categorical version), sex, and BMI (cate-gorical version). (Main effects only- let’s keep it simple! :) ). Do these variables appear to be strongly associated with a diagnosis of osteoporosis, as expected? Explain briefly. (c) Now we investigate the association of alcohol use with osteoporosis, adjusting for potential confounding factors. We consider the known risk factors age, sex, and BMI, and the potential confounders of dietary calcium, dietary vitamin d, smoking, and exercise. Before you begin your analysis, describe your model selection strategy (Main effects only- keeping it simple! :) ). Tell me why you don’t recommend allowing alcohol to be considered for inclusion/exclusion as part of any variable selection algorithm. (d) Now, carry out your model selection strategy above. Call the result Model 1. Present Model 1 as a table of estimated coefficients on the odds ratio scale, with confidence intervals and p-values. Briefly summarize your results in a short paragraph. Be sure to report your main conclusion regarding alcohol use and risk of osteoporosis. (To keep the exam simple, do **NOT** present model diagnostics! In fact, the model fits pretty well.) (e) Next we explore whether Model 1 has enough information to usefully distinguish between high risk and low risk subjects, using the easily observed variables which are included in the model (age, sex, BMI, smoking, etc.). Use Model 1 to compute the estimated risk of osteoporosis, with appropriate confidence interval, for an hypothetical extremely high risk subject (e.g. an older woman smoker, non-drinker, with low BMI and low calcium) and for an hypothetical extremely low risk subject. Then compute the range and the quartiles of estimated risks for subjects actually observed in the data. Why do the hypothetical and the observed ranges differ? Do you think this model could potentially be useful in identifying people at high risk and at low risk of osteoporosis, for a similar population of patients ? Discuss briefly. (f) The association of alcohol use with lower osteoporosis risk may be surprising. However, in many obser-vational studies of health outcomes, moderate alcohol use is associated with better outcomes. On the one hand, in some settings (eg red wine and heart disease) some people argue that there is a real causal effect, and on the other hand we know that there are often systematic differences between drinkers and non-drinkers. This motivates us to conduct further analysis. Recalling a result from Problem 1, add the interaction of age and sex to Model 1, and call the result Model 2. Compare Model 1 and Model2. Does this analyses increase your confidence that the apparent protective effect of alcohol use is real? Why might this be considered an exploratory analysis, rather than the primary analysis in your study? Explain in a few sentences. (g) Briefly summarize your analysis, and discuss the extent to which these data provide evidence for a protective effect of drinking alcohol for osteoporosis prevention. Be clear, professional, and quantitative in your answer. Figure 1: Mean composite driving score over time, for each treatment arm (and 95% confidence intervals). 3. Problem 3: Driving Miss Mary Jane The file Driving.csv includes data from a double-blind, placebo-controlled parallel randomized clinical trial conducted at the UCSD Center for Medicinal Cannabis Research, aiming to determine effect of cannabis on driving performance. A total of N = 190 cannabis users were asked to smoke at least 4 puffs from a cigarette containing either placebo, low dose THC, or high dose THC, according to the randomly assigned treatment arm. The participants completed computer-based driving simulations pre-smoking (baseline, 0 minutes) and at 4 timepoints after smoking: 0.5 hours (h), 1.5h, 3.5h, and 4.5h. The outcome is composite driving score (CDS), measuring the driver’s overall performance, with higher values indicating worse performance. CDS is a standardized score with no units of measure. A score of 0 reflects average driving ability. The given dataset is in the long format. The variables in the dataset are: • pid: participant ID • treatment (3 levels): placebo, low THC, or high THC • THC : indicator of THC-containing treatment, 0 if placebo, 1 if low or high THC dose • time_min: time since smoking in minutes (0 is pre-smoking) • CDS: composite drive score • frequent_user : 0 if current cannabis use < 4 times/week, 1 if ≥ 4 times/week • age: participant’s age in years • education: participants’s years of education • gender : Male or Female • miles_past_year : estimated self-reported number of miles participant drove in past year (a) Add two additional time-related variables: occasion, a categorical version of the time variable; and an index variable that indexes the measurement time points in increasing order, from 1 (baseline), 2 (30 minutes), . . . , to 5 (270 minutes post-smoking). Produce a boxplot of CDS as a function of occasion. Is the response distribution approximately normal? Is there a data transformation that is obviously necessary? (b) Consider modeling the CDS as a function of time using a longitudinal general linear model. What is a good choice of covariance structure for this general linear model? Use the chosen covariance structure in subsequent modeling. (c) Choose an appropriate mean model for this randomized clinical trial: consider a response profile model (RPM), and parametric time models with either linear, quadratic, or cubic time effects. Discuss whether there is any advantage in this case in using a parametric model for time, instead of a response profile model. (d) Based on the RPM, test whether overall there are any differences in the response profiles of the three study arms. (e) The test at the previous question confirms what Figure 1 suggests: overall, there are significant differ-ences in the trajectories of the three groups. Follow-up this analysis by testing for pairwise differences in the CDS trajectories between the three treatment arms. Are the results consistent again with what Figure 1 suggests? For each comparison state the null hypothesis in terms of the vector of mean coefficients β. (f) Interestingly, in Figure 1 the low THC group has apparently worse driving scores than the high THC group. One hypothetical explanation is that the participants in the high THC group can feel the strong THC and do not smoke the entire cigarette. In any case, the previous analysis shows no significant difference in driving scores between the two THC groups. This suggests combining the two THC groups into a single group (see the variable THC in the dataset). Fit an appropriate response profile model for the trajectories of the two groups over time: THC and placebo, and show that these trajectories differ. (g) Following up on the previous question, estimate the causal effect of smoking THC on driving at each time point. Include 95% confidence intervals and p-values. (h) Are the effects of smoking THC on driving large? To put this in perspective, in a cross-sectional study a Cohen’s d effect size d = 0.5 is considered moderate, and d = 0.8 is considered large. Finally, summarize in a few sentences the study findings regarding the effects of smoking cannabis on driving abilities.

$25.00 View

[SOLVED] Practical Data Science with Assignment 1 Data Cleaning and Summarising

Practical Data Science with Python Assignment 1: Data Cleaning and Summarising Due: 23:59 on the 13th  of April 2025 This assignment is worth 25% of your overall mark. Introduction In this assignment, you will examine a (set of) data file(s) and carry out the first steps of the data science process, including the cleaning and exploring of data. You will need to develop and implement appropriate steps, in Jupyter notebook (in the Anaconda version specified in the canvas announcement), to load a data file into memory, clean, process, and analyse it. This assignment is intended to give you practical experience with the typical first steps of the data science process. The “Practical Data Science” Canvas contains further announcements and a discussion board for this assignment. Please be sure to check these on a regular basis  – it is your responsibility to  stay  informed  with  regards  to  any  announcements  or  changes.  Login through https://rmit.instructure.com/. Where to Develop Your Code You are encouraged to develop and test your code in the following environments: Jupyter Notebook on Lab PCs.  (Or please use the Anaconda version as specified in the course announcement) Jupyter Notebook on Lab PCs On Lab Computer, you can find Jupyter Notebook via: Start → All Programs → Jupyter Notebook - Anaconda Then, •  Select New → Python 3 •  The new created ‘*.ipynd’ is created at the following location: – C:UserssXXXXXXX – where sXXXXXXX should be replaced with a string consisting of the letter “s” followed by your student number. Plagiarism RMIT University takes  plagiarism very  seriously. All  assignments will be  checked with plagiarism-detection software; any student found to have plagiarised will be subject to disciplinary action as described in the course guide. Plagiarism includes submitting code that is not your own or submitting text that is not your own. Allowing others to copy your work is also plagiarism. All plagiarism will be penalised; there are no exceptions and no excuses.  For  further  information,  please  see  the Academic Integrity information  at http://www1.rmit.edu.au/academicintegrity. Turnitin will be used for Plagiarism Review for this assignment in Canvas. General Requirements This section contains information about the general requirements that your assignment must meet. Please read all requirements carefully before you start. •  You must do the assignment in Jupiter Notebook that are available in Anaconda. •  Parts of this assignment will include a written report; this must be in PDF format. •  Please ensure that your submission follows the file naming rules specified in the tasks below. File names are case sensitive, i.e. if it is specified that the file name is gryphon, then that is exactly the file name you should submit; Gryphon, GRYPHON, griffin, and anything else but gryphon will be rejected. Task 1: Data Preparation (8 marks) Have  a  look  at  the  file  hotel_bookings_data.zip,  which  is  available  in  Canvas  under  the Assignments/Assignment  1  section  of  the  course  Canvas.  This  dataset  contains  booking information for a city hotel and a resort hotel, including details such as booking dates, length of stay, number of guests, and more. Being a careful data scientist, you know that it is vital to carefully check any available data before starting to analyse it. Your task is to prepare the provided data for analysis. You will start  by  loading  the  CSV  data  from  the  file  (using  appropriate  pandas  functions)  and checking whether the loaded data is equivalent tothe data inthe source CSV file. Next, apply the data cleaning techniques covered in the lectures to resolve issues/errors, including handling  missing  data,   eliminating  duplicates,  standardizing   formats,  and   addressing outliers. Hint: it is a good practice to check every column in the dataset for any potential data issues; however, it should be fine that you have identified and corrected data issues in 5 columns in the dataset. Once the data is cleaned, store the refined version as a CSV file, e.g. (file can be named as ‘cleaned version.csv’). Task 2: Data Exploration (10 marks) Q1: What insights can be gained from exploring booking trends over time, such as monthly trend of booking statistics (e.g., total bookings, cancellations, average lead time) in the year of 2016? Q2:  How do we describe and visualize the complex relationships between  bookings, seasons and years for data between 2015 and 2017? What can be learned from this analysis? Q3: What stories emerge when we analyze the distribution of bookings by geographic region (like top 5 countries), and how do these insights inform. our understanding of their customer behavior. and preferences (e.g., average length of stay and cancellation rates)? Note, each visualization (graph) should be complete and informative in itself and should be clear for readers to read and obtain information. Task 3: Report (7 marks) Write your report and save it in a file called report.pdf, and it must be in PDF format, and must be at most 6 (in single column format) pages (including figures and references) with a font size between 10 and 12 points. Penalties will apply if the report does not satisfy the requirement. Moreover, the quality of the report will be considered, e.g. clarity, grammar mistakes, the flow of the presentation. Remember to clearly cite any sources (including books, research papers, course notes, etc.) that you referred to while designing aspects of your programs. •  Create a heading called “Data Preparation” in your report. – Provide a brief explanation  of how you  addressed  the task.  For the  steps  of dealing with the potential issues/errors, please create a sub-section for each type of errors you dealt with (e.g. typos, extra whitespaces, sanity checks for impossible values, and missing values etc), and also explain and justify how you dealt with each kind of errors. •  Create a heading called “Data Exploration” in your report. – For   each    numbered   step    in    Task   2    above,   create    a    sub-section   with corresponding numbering. Please explain and justify how you explore the data as required properly. What to Submit, When, and How The assignment is due at 23:59 on the 13th of April 2025. Assignments submitted after this time will be subject to standard late submission penalties. You need to submit the following files: – Notebook   file   containing   your   python   commands   for   Task    1   and   Task, ‘assignment1.ipynb’. Please use the provided solution template to organise your solutions: assignment1 TEMPLATE.ipynb #  For  the  notebook  files,  please  make  sure  to  clean  them  and  remove  any unnecessary lines of code (cells). Follow these steps before submission: 1.  Main menu → Kernel → Restart & Run All 2.  Wait  till  you  see  the  output  displayed  properly.  You  should  see  all  the dataprinted and graphs displayed. – Your  report.pdf file: at most 6 (in single column format) pages  (including figures and references) with a font size between 10 and 12 points. Penalties will apply if the report does not satisfy the requirement. They must be submitted as ONE single zip file, named as your student number (for example, 1234567.zip if your student ID is s1234567). The zip file must be submitted in Canvas: Assignments/Assignment 1. Please do NOT submit other unnecessary files.      

$25.00 View

[SOLVED] COMP2123 Assignment 1 S1 2025

COMP2123 Assignment 1 S1 2025 Problem 1. (10 points) Given an array A consisting of n integers, we want to compute a matrix B where for any 0 → i < j < n we have B[i][j] = f([A[i], A[i + 1], ..., A[j ↑ 1]]) Consider the following algorithm for computing B: Algorithm 1 Range Function Computation 1: function RangeFunc(A) 2: B ← new n × n matrix 3: for i ← 0 to n – 1 do 4: for j ← i + 1 to n – 1 do 5: C ← make a copy of A[i : j] 6: B[i][j] ← f(C) 7: return B Assume that f(C) runs in Θ(log |C|) time. a) Using O-notation, upperbound the running time of RangeFunc. Explain your answer with a detailed line by line analysis. b) Using Ω-notation, lowerbound the running time of RangeFunc. Explain your answer. Problem 2. (25 points) We would like to design an augmented queue data structure. In addition to the usual enqueue and dequeue operations, you need to support the even-diff operation, which when run on a queue Q = returns Examples: • even-diff([1, 3, 50, 48]) returns 4, • even-diff([1, 3, 50, 48, 30]) returns 4, • even-diff([3, 50, 48, 30]) returns 65. We are to design an implementation of the methods enqueue, dequeue, and even-diff so that all operations run in O(1) time. You can assume that the data structure always starts from the empty queue. Your data structure should take O(n) space, where n is the number of ele-ments currently stored in the data structure. Your task is to: a) Design a data structure that supports the required operations in the re-quired time and space. b) Briefly argue the correctness of your data structure and operations. c) Analyse the running time of your operations and space of your data structure. Problem 3. (25 points) A skyline is defined by an array of n distinct integers A = [h0, h1, h2, h3, h4, ...., hn-1] representing the heights of buildings in a one-dimensional city, given in the or-der they appear from left to right. Suppose you are standing on the rooftop of one of these buildings. You want to determine the closest taller building to your left and the closest taller building to your right. The goal is to find an efficient algorithm to compute this for ALL n buildings. Specifically, for every building x ∈ [0, n – 1], compute the two closest indices i and j to x such that: i < x, j > x, A[i] > A[x] and A[j] > A[x]. Your algorithm should return two arrays of length n: L[0...n – 1] where L[x] denotes the index (i) of the nearest taller building to the left of building x (or None if no such building exists). R[0...n – 1] where R[x] denotes the index (j) of the nearest taller building to the right of building x (or None if no such building exists). Note: • A[*] denotes the element at index ⇐ in the array. • Indices start at 0. Examples: Input: A=[7,3,9,12,2,6,5,15] Output: L=[None, 0, None, None, 3, 3, 5, None] R=[2, 2, 3, 7, 5, 7, 7, None] Input: A=[6,2,4,1,10,7,8,11] Output: L=[None, 0, 0, 2, None, 4, 4, None] R=[4, 2, 4, 4, 7, 6, 7, None] Input: A=[10,3,2] Output: L=[None, 0, 1] R=[None, None, None] a) Design an algorithm to solve this problem in O(n) time. b) Prove your algorithm is correct. c) Analyse the running time of your algorithm.

$25.00 View

[SOLVED] MATS23502 Deformation Mechanisms Mechanical Testing Lab

MATS23502: Deformation Mechanisms: Mechanical Testing Lab The deformation mechanisms of “light” alloys Location: MECD teaching laboratories (meet at Core 3 meeting point, level 3) Staff Responsible for Lab: Prof. João Fonseca, Mr Stuart Morse, Mr Ken Gyves Demonstrators: Aims and objectives The aim of this lab is to explore the strengthening mechanisms of “light” alloys. It will involve bend testing 2 aluminium alloys with different thermal histories, and comparing the deformed microstructures of an aluminium and a magnesium alloy. The objectives are: -    to test a series of samples in bending with different heat treatments -    to analyse the bend test data to extract material properties -    to observe the changes in the microstructure caused by deformation -    to explain the experimental behaviour in terms of the deformation  and strengthening mechanisms operating in the alloys Learning outcomes Knowledge and understanding -    Review and reinforce the mechanics of the bending of beams -    Understand the effects of thermal history on the strength of aluminium alloys -    To understand the link between the deformation behaviour and the associated changes to the microstructure -    Learn about alloy designations Intellectual skills -    Develop improved logical reasoning, critical thinking, problem solving and ability in applied mathematics. Practical Skills -    Carrying out bend testing using a universal testing machine -    Obtain data produced by the mechanical testing machine and use  Python to analyse it -    Use optical microscopy to characterise deformed microstructures Transferable skills - General experimental skills including sample handling, machine operation and note taking - Independent learning and literature research skills - Working effectively in a group to carry out experiments - Using computing to analyse experimental data - Analysing results critically and reporting them in an appropriate and effective manner Introduction In this lab, you will use bend testing to explore the deformation and strengthening mechanism of 2 aluminium alloys: Al5754 and Al6111. The are both wrought alloys, which means they are deformed during production to produce the final product. The product you will be testing is automotive sheet, which is used to   make lightweight cars. Car manufacturers like Ford and Tesla in the USA, Jaguar Land Rover  in  the  UK  (see  Fig.  1),  and  Audi  in  Germany  all  exploit  the  high  specific properties of these alloys to reduce the weight of their vehicles, improving efficiency and reducing emissions.  By replacing steel with aluminium in the new Range Rover and Range Rover Sport, Jaguar Land Rover saved 400 kg in weight! Fig.1: Aluminium bodies in the Jaguar Land Rover assembly line. “Light” alloys get their name because of their high specific properties, i.e. the ratio of the property (Young’s modulus, or yield strength) and their density. The density of Al is 2.7 Mg m-3 , whereas it is 8.0 Mg m-3  for steel. Light alloys like Mg and Al also have low  melting  points,  which  makes  recycling  them  much  more  energy  efficient. However, steel is very strong, has very high stiffness and is easy to form, all of which make it very competitive with light alloys despite its higher density. It is also usually half the price. In order to compete with steel, light alloys have to use every trick in the book to increase their strength. In this lab we will explore these strengthening mechanisms using a combination of mechanical testing and optical microscopy. We will use the bend test as it is easier to perform. than tensile testing, and it is a better mimic of the forming operations during car making. Experiencing  the  actual  testing  and  microscopy  of  materials  is  one  of  the  main outcomes of this lab. Therefore, you must try to run the machines and microscopes yourself for at least one sample. You  should  use  last  semester’s  notes  on  plastic  bending  of  beams  to  help  you analyse your data. Some of this is also covered in the Jupyter notebook provided in Blackboard. General instructions and safety considerations You should start by assigning a role to each member of your team. A list of possible roles is: 1.  Measuring samples 2.  Transferring and loading samples 3.  Testing machine operator 4.  Note taker  (to  record  sample  dimensions  and  any  observations  during the tests) 5.  Sample labeller and test tracker (using the test matrix provided) The demonstrators will show you how to load and test the first samples and will assist with the straightening operations. Otherwise, you should run the tests yourselves, as a team, with the advice and support of the demonstrator. Please be careful. The sand is at the temperature of a hot oven at home. Use the tongues provided to handle hot samples. Equipment -    Instron machine -    Callipers -    Hot plate with a sand “bath” -    Thermocouple and reader -    Tongues -    Gloves -    Permanent marker Materials - Al 6111 annealed at 550˚C for 1 hour and water quenched - Al 5754 annealed at 550˚C for 1 hour and water quenched This heat treatment is called a “solution heat treatment”. It’s carried out just below the melting point of the alloy to dissolve all second phases and make sure all alloying elements are in solid solution. Experiments: Mechanical testing -Part 1: Bending of Al alloys In this experiment, you will measure the load and displacement during the bending of 2 different aluminium alloys and then during its reversal. You will need: -    2 samples of Al 5754 as provided -    2 samples of Al 6111 as provided Before you testing, measure  your  samples  and  label  them using  the  marker provided.  Before each of the tests, you should always reset the displacement value on the testing machine. However, you should never only reset the load value at the start of the test. Resetting it during testing could invalidate your results. -    Insert two  undeformed samples  (one of each alloy) in the sand and leave them there for 30 minutes. -    Use  the  mechanical  testing  machine  to  test  2  samples  of  each  alloy     (4 samples in total) in bending. Remember to add a sample name to the test in the computer. Deform all samples to a maximum deflection of about 5mm.  At the end of each test, remember to save your data. If you finish your testing before the 30 minutes are up, use this time to complete your notes and discuss the results so far. -    What are the dimensions of the bending jig (measure carefully)? -    How different are the results from the repeat tests in step 1? -    What might cause these differences? This critical analysis of your results will be important during your write up. - Part 2: The effects of annealing on the behaviour of Al alloys In this experiment you will explore the effect of deformation and annealing on the properties of the two aluminium alloys. You will use the samples that have been annealing in the sand bath. You will need: - Two undeformed samples (one of each Al alloy), heat-treated in the sand Remember to name the samples in the testing software before each test. Reset the displacement NOT the load. - take the 2 undeformed samples from the sand (one for each alloy) and cool them  down  to   room  temperature.  Test  them   in   bending  to   a  maximum deflection of 5 mm. Don't forget to save your data! Experiments: Optical microscopy of deformed samples In this experiment, you will use an optical microscope to examine cross sections of deformed samples. The demonstrators have prepared metallographic specimens for you. Please be mindful and do not to touch the polished surface as that will damage it and make it hard to image the microstructure. There should be 2 samples: -    Mg alloy (AZ31) deformed in bending -    Al alloy tested in bending Use the microscopes provided to record images of the deformed microstructures of these samples. -    Step 1: calibrate your microscope at the different magnifications -    Step 2: study the microstructure of the different samples noting how it changes with distance from the neutral axis -    Step  3:  Save  images  to  the  computer  provided  for  using  in the  report to illustrate your findings Data analysis and visualization You can analyse and plot the data using Python. A example notebook is provided to help  you  with  this  task.  Remember  to  label  all  axes,  including  units  where appropriate. Assessment and feedback: You should report your findings using the report template provided on Blackboard in PDF  format.  The  deadline  for  submission  of  your  lab  reports  is available on Blackboard. You should start working on your report as soon as possible, so you have time to analyse the data, do the required reading and ask questions. The usual late penalties apply. Important: You must attend the lab. If you don’t attend the lab*, you can write up the report but your mark will be deducted 50% of the marks. The assessment criteria are as follows: Content (75%) Each section of the report will be assessed as noted on the template. The template contains several suggestions for what to include and discuss in each section. Note that these are just suggestions; you should write the best report you can. Excellent reports are expected to go beyond what is already outlined. Presentation (25%) The  presentation  score  includes  structure,  style,  clarity,  spelling,  and  quality  of figures and equations. Feedback You will receive feedback in the form of a marked lab report 15 working days after the submission date * If you miss the lab due to unavoidable circumstances, like illness, you must apply for mitigation.

$25.00 View

[SOLVED] Introduction to Thermodynamics and Fluid MechanicsMatlab

Department if Mechanical Engineering Introduction to Thermodynamics and Fluid Mechanics Individual Coursework Release date: March 10th. Deadline: March 21st at 2pm This is the only piece of coursework for MECH0005.  You will need to read the information below and answer all the questions which cover both thermodynamics and fluid mechanics.  This coursework is worth 30% of your final grade. You need to explain your answers (using full sentences) and pay attention to the way they are presented, with proper descriptions and diagrams where appropriate. Please see the guidance and marking rubric at the end of this document for more information on this assessment and how you will be assessed. Your submission should be no longer than four pages.  NOTE: If your coursework is over 4 pages, any content that is on the additional pages will not be marked.  You should not copy out the questions again within your submitted answer.  We expect this assessment to take you approximately 8 hours.  Submissions in pdf format are to be made through the “Coursework submission portal” under the “Assessments” tab. This coursework is designed to help you apply the knowledge gained in MECH0005 to the design of a wind turbine - refrigeration set up.  In real-world engineering, system design is often subject to constraints, and not all parameters are known in advance. Unlike the purely analytical approach you have taken so far in MECH0005, this coursework will introduce you to handling and analyzing real data, which is a crucial skill in engineering practice.  Additionally, the strict page limit encourages you to prioritize and present key information concisely—an essential skill that will benefit you in your third-year project and beyond This coursework is an individual effort and any collaboration is not authorised.  If you don’t acknowledge the work or ideas of others, you could be penalised for Academic Misconduct. Figure 1: Photograph of a wind turbine and a medical refrigeration unit in a remote region. Background You are an engineer working for a medical centre in a remote location.  A key component of this medical centre are its refrigeration units which are essential for storing medicine at an appropriate temperature. To reduce the reliance of the medical centre on fossil fuels you have been tasked to ensure that a wind turbine will be able to provide a significant the electricity required to run the units. Useful information In this coursework you will be required to carry out calculations.  Below are the equations which are given explicitly however you will be expected to search the internet for variables which are not given explicitly. Wind turbine performance The power, P, extracted by a wind turbine is given by P = FD UT ,                                                                (1) where FD  is the drag on the wind turbine and the velocity of the fluid at the wind turbine UT  is given by                                                          (2) where ¯U is the average horizontal velocity between 0 < r < 7 m at x = 10 m. The available power for the refrigeration units is then given by Pavail  = Pηm ηg ,                                                           (3) where ηm  and ηg   are the mechanical and generator efficiencies respectively. Wind turbine parameters • Rotor diameter; D = 2 m •  Tower height; h = 5 m • Air density; ρ = 1.225 kg/m3 •  Upstream wind speed; U∞ = 12 m/s •  Mechanical efficiency; ηm  = 0.95 •  Generator efficiency; ηg  = 0.9 Refrigerator parameters and constraints • Refrigerant: Ammonia •  Condensor temperature range: 32oC to 40oC • Evaporator temperature range: -18 oC to -10 oC •  Compressor work rate:  1 kW • Evaporator cooling capacity: 4.44 kW Power generation with wind turbine For this wind turbine set up, the Reynolds Transport Theorem applied to momentum is (4) where F={Fx , Fy , Fz }, are the forces on the turbine (with the drag force, FD , acting along the positive x—axis and the lift forces acting along the y—axis and z—axis).  Note that the rotor is facing the incident wind head-on and the centre of the wind turbine (i.e. the hub) is the location of the origin with the positive x-direction coincident with the incident flow.  The force due to pressure is given by Fp  = {Fpx , Fpy , Fpz }. The time averaged velocity in the cross stream direction, r where r2  = y2  + z2 , is determined using an anemometer. At a location 10m upstream of the wind turbine the wind speed is uniform (U∞ ) while 10m down stream of the wind turbine the velocity is non-uniform and is given by the functions u = U∞ f(r)   for   0 < r < 7m, (5) and u = U∞ for   r > 7m                                                        (6) where r is measured from the centre of the wind turbine in the y — z plane.  The function f(r) is provided in the attached excel file with the two columns giving (i) radial location (r) and (ii) the function f(r).  Pressure can be assumed to be equal at the inlet and outlet section at which the velocity and pressure measurements were taken. Question 1 (a) Apply the methodology that was taught in the lectures for Reynolds Transport Theorem, to obtain an integral expression for the drag force on the wind turbine, in terms of the ρ , U∞ and f(r). State and justify any simplifications to equation (4). Any variables that are used must be backed up by references. [5 marks] (b) Plot the radial variation for the term ρu(u .n(ˆ)) at x = 10 m.  Copy and paste the Matlab code for this plot into your submission. [1 marks] (c) Use numerical integration of the function f(r) (using the Matlab function ’trapz’) and the profile in (b), to calculate the velocity ¯U, the drag force on the wind turbine, the power extracted by the wind turbine, the associated coefficient of performance and the available power (to run the refrigeration units).  Copy and paste the Matlab code for these calculations into your submission. [5 marks] (d) What phenomena, essential for rotating the wind turbine, is not explicitly considered in this analysis? How is this phenomena incorporated into the modelling? [2 marks] Note: marks will be lost if no Matlab code is given for (b,c). Question 2 (a)  Starting with the kinetic energy of the wind, produce an energy flow diagram which shows how energy is converted from one form to another in this wind turbine and refrigeration set up. [2 marks] (b)  Sketch the main components of a simple vapour compression cycle and plot the cycle on a T - s diagram. [1 mark] (c)  Briefly articulate the differences between the real cycle and the idealised cycle. [2 marks] (d)  Starting from the steady flow energy equation applied to the evaporator and the compressor, formulate two expressions for the mass flow rate in terms of the other parameters. [1 marks] (e)  By considering the refrigerator and parameter constraints on page 3 and starting with the matlab code provided, choose an appropriate evaporator and condensor temperature such that the mass flow rates in (d) match.  State the final refrigerant mass flow rate.  To score full marks in this question a figure showing the design space and accompanying calculations verifying your design choice are required. Copy and paste the Matlab code for this plot into your submission. [5 marks] (f)  Calculate  (i)  the  COP  of the ideal cycle  and  (ii)  the  COP  of a reversed  Carnot engine operating between the minimum and maximum temperatures of the idealised cycle. Comment on your findings. [2 marks] Note: marks will be lost if no Matlab code is given for (e). Sustainability considerations Wind energy is widely regarded as a key solution in the fight against climate change.  By har- nessing the power of the wind, turbines generate electricity without the direct emissions of carbon dioxide (CO2 ) associated with fossil fuel-based power generation.  As a result, wind power has seen significant global investment and is often promoted as a cornerstone of a sustainable energy future. However, while wind turbines produce clean energy during operation, their full environmental impact extends beyond just electricity generation. The manufacturing, transportation, installation, maintenance, and eventual decommissioning of wind turbines all require energy—much of which is still derived from fossil fuels. This raises an important question: how much CO2  is emitted over the entire life cycle of a wind turbine, and how does this compare to the emissions avoided by its operation? In this question, you will have to read through the journal paper ”Comprehensive life cycle assessment of large wind turbines in the US” by Ali Alsaleh and Melanie Sattler, which is available online and is included in the brief on Moodle. Question 3 For a wind turbine with a twenty year horizon calculate: (a) List the five stages of the wind turbine life cycle in increasing quantity of CO2  produced. (b)  Calculate the tonnes of CO2  emitted during a wind turbine’s life cycle. (c) Estimate the ratio of kg-CO2-eq/MWh for a wind turbine to a coal fired (with carbon capture and storage facilities) and a natural gas fired power plant. Comment on these results. (d)  Calculate the energy payback time and energy return ratio.  Give a brief comment on these results. [4 marks] Note:  marks will be  lost if calculations are not clearly explained/justified including any as- sumptions made. Guidance on completing this coursework 1.  This coursework falls under AI category 1. There should be no AI tools used for this course- work. 2.  Equations should be appropriately formatted.  Be careful of notation; vectors are bold and scalars are not. 3.  Solutions need to be explained in words (e.g. stating conservation laws or stating/justifying simplifications). Show all your working. Just the solution will get no marks. Please refer to the marking rubric under ‘technical analysis’. 4.  Always re-read your answers, look again at the question, and ask yourself whether you have answered the specific question that was asked. 5.  Hand drawn figures:  be clear to indicate control volumes (using dashed lines), control sur- faces, unit normal vectors, components in the cycle etc. Labels should be in good handwriting with a fontsize that is easily readable. 6.  Choose an appropriate and consistent method of referencing the scientific journals. 7.  Do not use Wikipedia.   Also, websites should not be used as they can be taken down or moved. Researchgate, Scopus, pubmed etc. are not journal references. 8. In technical reports there should be no use of ”I”, ”we”, ”us” etc. 9.  If you are taking a figure from the web, this needs to be referenced.  The figure also needs to be annotated by you, it is not good enough to just copy a figure into your coursework. 0-50 50-70 70-100 Technical analysis Figures  are too small and not  clearly  labelled.    Con- servation laws, performance metrics, simplifications and assumptions     not     stated and/or justified. Working and  supplied  code difficult to follow. Some parts of the figure unclear   with   some   labels missing.      Some   conserva- tion laws, performance met- rics, simplifications and as- sumptions not clearly stated and justified. Solution steps sometimes difficult to fol- low. Supplied code is at time difficult to follow. Figures  are clear and well labelled, highlighting all key features.   Conservation laws and performance met- rics  are  stated  when used. Simplifications and assump- tions are stated and justified when used. Solution steps are  easy  to  follow with  fi- nal solution given in units where appropriate. Sup- plied code is annotated and easy to follow.  Full parame- ter space of design variables is explored.

$25.00 View

[SOLVED] ME5654 Description of the Elasticity Project

ME5654 I. Description of the Elasticity Project Design and load a 2D rectangular bar with modulus E=2GPa, the Poisson’s ratio v=0.4. Task1 (40%). To perform numerical uni-axial tension test on a 2D rectangular bar made of the material given, by using any Finite Element (FE) software. Please choose plane stress and plane strain elements, respectively. Output engineering stress-strain curves on one plot. Also, output stress and  strain contours. Comparing the results from the plane stress and plane strain element models. Task2  (30%) Demonstrate the differences between plane stress and plane strain, using  the theory/criteria we learned in class together with the FE results. Task3  (30%). To design and load a structure in elastic range, output  the  stress  and  strain contours with an overall tensile or compression or shear strain of 2% (you choose the loading based on your interests) Groups:          1-3 students/group Components: (1) Topic slides and presentation 2 slides + ~5-minute presentation (including Q&A, demonstrating FE models, only model not the results) in Task 1, and your design idea in Task 3. (no models/results are needed, simply explaining what your design is and why you are interested in this design) (2) Oral presentation (~10 slides) ~15-mins, including Q&A Deadlines: • Topic presentation: slides due 8AM, 02/25 (Tu.) (30 points) • Oral Presentation: slides due 8AM, 03/18 (Tu.) (70 points) II.  Oral Presentation Guidelines 1.   General tips for presentations • Clearly state your topic. At the very beginning of your talk, remind the audience of the topic that you will present today. • Clearly organize your presentation. It should be obvious to the audience what you are going to present and the structure for the presentation.  You may wish to include a table of contents.  (Actually, the best talks have a clear structure but omit the table of contents slide from the presentation.) • Provide clear and informative visual aids. Please make sure the slides are easily readable, and are not overly cluttered with unnecessary colors, patterns, and graphics. • Don’t read your presentation. If you use slides, they should aid and not replace speech. Minimize the use of written words. • Provide a summary or conclusion at the end. Lead into the discussion by emphasizing the state of the science on this topic and some of your key discussion points. • Stick to the time allotted foryour presentation and discussion. • Be enthusiastic. Act like you believe that your topic is the most important issue ever. • Practice your presentation beforehand. This will familiarize you with the material, give you a sense of timing, improve the flow of your talk and your communication with your  audience, and help you get back on track when you get interrupted with a question. • Anticipate likely content questions and prepare a response in advance. • Be attentive and polite, and enthusiastically participate in the discussion. Don’t be afraid to say something wrong.  Try to be constructive when asking questions. III.Project Report Guidelines A report is required to describe the final project.  The goal of this report is to improve your scientific writing.  The content, presentation, and style. of the report should be similar to what you would submit to a journal or as your thesis.  As such, the report must be type-written and presented in an organized and neat manner. The report will include 3-5 figures with a length of ~5 pages (the main body, not including the references, table of content etc.). The report should be organized approximately as follows.  There is a bit of discretion in writing scientific papers, so you may decide to organize individual reports slightly differently.  However, please include the following components: Title: it summarizes the purpose of the exercise and reflects the factual content of the paper. A good title is straightforward and uses keywords that researchers in a particular field will recognize. Abstract: In a concise paragraph of approximately 100 to 200 words, summarize the goal of the  study, purpose, key result(s), and major discussion points. (The purpose of an abstract is to allow the reader to judge whether it would serve his or her purposes to read the entire report.) Introduction: The introduction defines the subject of the report. Outline the scientific purpose(s) or objective(s) for the research performed, and give the reader sufficient background to understand the rest ofthe report.  Briefly discuss why this issue is important.  Briefly summarize previous knowledge relevant to the study question. End the introduction with a sentence or two that summarize the overall scientific goal of the exercise, and your approach to investigate it. Methods/Design: Describe the method you used. Provide a description of your design, analytical and/or finite element model, list necessary equations, schematics, drawings etc. Please make the description in sufficient details that readers could repeat the research presented. Prediction Results: Summarize the data from the analysis without discussing their implications. Display your results in one or more table(s) and figure(s), and quantitatively describe important observed trends.  Organize the section based on type of data.  Provide confidence intervals/uncertainty for observations, and significance levels for conclusions. Conclusion and/or discussion: Summarize and consider implications of your main design. Discuss whether the data support the hypothesis and the expectations that were described in the introduction.  Explain conclusions that can be made from the results and the significance of these conclusions. Literature cited: List all sources that were cited in the text using a consistent format style.  The listing should be alphabetized by the last name of the first author, or as a numerical list. Supplementary materials (optional): Additional figures, analysis, results which support the main text.

$25.00 View

[SOLVED] CSCI 2122 Assignment 4

CSCI 2122 Assignment 4 Due date:   11:59pm, Sunday, March 30, 2025, submitted via git Objectives The purpose of this assignment is to practice your coding in C, and to reinforce the concepts discussed in class on program representation. In this assignment you will implement a CPU simulator for a simple instruction set (much simpler than x86). This assignment is divided into several parts to make it simpler. In the first part, you will implement the memory part of the simulator and loader, which loads the code from a file into the simulated memory. In the second part, you will implement the fetch-decode-execute part of the CPU. Preparation: 1.    Complete Assignment 0 or ensure that the tools you would need to complete it are installed. 2.    Clone your assignment repository: https://git.cs.dal.ca/courses/2025-Winter/csci-2122/assignment-4/????.git

$25.00 View

[SOLVED] STA130 Winter 2025 An Introduction to Statistical Reasoning and Data Science

STA130 Winter 2025: An Introduction to Statistical Reasoning and Data Science Project Project Context Wellspring (https://wellspring.ca/) is a Canada-wide network of charities, offering programs and services, at no charge and without referral, to anyone, with any type of cancer, at any stage in their journey. For this project, you will be applying what you've learned in STA130 to help Wellspring gain insights into how the change in their registration system on March 4th, 2024 impacted the engagement of their members. They hoped that by simplifying their registration system, potential members would be more likely to register and that they would be more engaged in their programming.  Of course, there are lots of ways to think about what it means to be "more engaged", including how soon they attend their first event, how many events they attend in their first 1 or 2 months of registering, the proportion of events they miss (after signing up for these events) - all of these are interesting aspects of the question and it will be up to you which you choose to explore.  In addition to their primary interest above, they are also interested in better understanding what characteristics make members more or less likely to sign up for / attend programs, so that they can try to reach out to those who might not be making use of the available programming.  For both of these big aims, they're also interested in looking at various  subgroups of their membership to see if the effects are different. You will not be expected to address all the general questions above. You will choose a few of the above questions, refine them for specific variables of interest and/or subjects of interest to you and your group, and perform. a detailed, thoughtful statistical analysis to answer your question(s) of interest. Target audience · Wellspring employees have deep expertise in cancer support services and patient care, but   may not have formal statistics training. Your analysis should translate statistical concepts into practical insights they can use to enhance their programs and support more people affected by cancer. · Many staff members are focused on direct service delivery and may not regularly work with   data analysis. Statistical findings should be presented with clear, real-world implications that  connect directly to Wellspring's mission of providing free cancer support programs to anyone who needs them. · Staff at Wellspring care deeply about improving cancer support services and understanding   program impact, but may be pressed for time. Key findings should be highlighted upfront with supporting details available for those who want to dive deeper. Visual representations of data are particularly helpful, but make sure they are clear and stand alone. Learning objectives · Apply data-driven problem-solving skills by: 。 Formulating meaningful research questions to help a community organization 。Selecting appropriate statistical methods to investigate research questions 。Coding chosen statistical methods accurately, readably, and reproducibly · Develop professional communication skills by: 。Translating complex statistical concepts into clear, concise, jargon-free language 。Creating concise, visually engaging posters and slides that effectively communicate key insights 。 Delivering a 5-minute presentation that highlights the project's significance and potential impact 。 Reflecting on the strengths and limitations of chosen analytical approaches · Demonstrate ethical data practices by: 。 Ensuring responsible data interpretation that aligns with the community partner's context and mission 。Critically examining potential biases in data collection and analysis 。 Using a reproducible data analysis workflow using R and Quarto (qmd) · Engage in collaborative learning by: 。 Practicing teamwork and project management skills 。Sharing responsibilities and leveraging individual team members' strengths 。 Providing constructive peer feedback to each other over the course of the project 。 Learning new skills from your teammates and teaching them new skills

$25.00 View

[SOLVED] CISC/CMPE 223 Software Specifications Winter 2025 Assignment II

CISC/CMPE 223 (Software Specifications) Winter 2025 Assignment II Due Date: Friday, March 14, 2025, 11:59 PM Total Marks: 100 Instructions: 1. Theory Answers: Please submit all answers in one document (PDF file format) for the written answers. You can write/type the answers and submit the document. But please make sure that all pages are merged in order/sequentially (problem 1 to problem 5) in one PDF file. The name of the pdf file should be theoryAn-swer.pdf 2. For the programming question, you can choose C or C++ or Java or Python. No other language will be accepted. please make sure that enough comments are given to understand your code and also provide a read me file explaining how to run your code and how to provide the input for your program. 3. Each programming solution should be in a separate folder. Make the folder name as the question name. For example: program 5 should be in a folder named, q5. This folder will contain the ‘read me’ file related to the question 5 and the code. 4. Finally make the submission folder under your last name and assignment no. For example, if your last name is choudhury, the folder name should be choudhuryAs-signment1. This folder will have the theoryAnswer.pdf and all programming ques-tions folder. Now, compresss this final submission folder, say, choudhuryAssign-ment1.zip and submit it. 5. Please be careful when submitting your files. Any files submitted after the dead-line will not be considered, and grading will be done on the last submitted file within the deadline. Make sure that your submitted files contain your final an-swers and that they are not corrupted. No requests to modify or replace submitted answers after the deadline will be entertained. (210=20 )Let Σ=0, 1} be the collection ofstrings over Σ that contain at least one ‘0’in their second half.Formally, def1neB=uvuΣ ∈ *0 Σ |v|}  (PDA), MthatrecognizesB.Writedown your,M=(Q,Σ,Γ,δ,q,F)as aformal 6-tuple,with afullylabeled state diagram (transitiongraph weachtransition worksasthe transition function δ.(b)  Give a context-free grammar (CFG) that generates B. Problem 2 × marks {, and let c be a special symbol not in Σ.Def1ne the languageL=wcw | ∈ *,wherewdenotestherev ∪ {suchthateverystringhasexactlyonec,splitsthestring into two parts w and w feach other.(a)  Design a pushdown automaton  PDA 0 ), togetherwith an explanation ofhow the stack is usedand ho ates L.Problem 3(20 )Write aprogram (in C, C++,Java, or Python) thatwill simulate the PDAfromProb her the PDA accepts an input string or NOT. Note thatyou needto implement the stack and transitionfunctionby yourself.  Do n  whetheritbelongstolanguage L.2.You should explicitly handle the stack transition function tomanagestatechanges basedonthe input symbols an (20 )Let Σ =a,b} { RwΣ ∈ {, Riswreversed} l xa,b} nd rejects all otherstrings).Write down your TM as aformal7-tuple(Q, Σ,Γ,δ,q,q ) nof howthe tape is used and how each transitio (210=20 ) onofaTuringmachinewhichdecidesthe {w|  ()  0  1s}.(b)  Giveanimplementation-leveldescri er of2.

$25.00 View

[SOLVED] MATH307639764076 Mathematical Computing Semester 1 2025 Assignment 1Python

MATH3076,3976,4076: Mathematical Computing Semester 1, 2025 Assignment 1 Problem setting The Lennard-Jones potential provides a phenomenological description for the interaction between molecules. In standardized units, the potential energy V as a function of the distance r is written as Consider a particle with total energy E moving under the influence ofthe Lennard-Jones potential. The Kinetic energy K (r) = E − V (r) of the particle as a function of the position r can thus be written as Mathematically, and throughout this assignment, we consider K (r) defined for allr > 0. Physically, K (r) can be interpreted as the kinetic energy only when K (r)  ≥ 0 (because the kinetic energy is proportional to the square of the velocity).  We are interest in the minimum distance of the particle, obtained, for instance, when the particle heading towards collision stops.  We denote this minimum distance as r* .  This corresponds to the smallest root of K (r), i.e., r* is the smallest value of r for which K (r) = 0. Questions 1. Characterization of the problem (3 marks). (a)  Write a code in Python that numerically plots the function K (r) as a function of r for E = −0. 1. The region around K (r) = 0 should be clearly visible. (b)   Based on the plot produced in the previous item, how many different solutions of K (r) = 0 exist for E = −0. 1? (c)   Calculate the number of different solutions of K (r) = 0 as a function of E  ∈ R. Justify your answer analytically (i.e., not based on numerical computations). 2. Bisection method (7 marks).  We are intrested in computing r* using the bisection method initialized in the pair of points a, b with b > a.  You can write the answers to the questions below as a function of r* and other roots of K(r). (a)   For E = −0. 1, specify one pair (a, b) for which the bi-section converges to r = r* as the number of iterations n → ∞. Justify your answer. (b)   For all E  ∈ R, determine analytically all the possible regions of a, b  ∈ (0, ∞) × (a, ∞) for which the bisection method converges to r* or converges to a different root. (c)   Write a code in Python that implements the bi-section method.  Use your code in the case E = −0. 1 to estimate r ∗ (precision of at least 6 digits). Choose also one initial pair (a, b) that does not converge to r*. (d)   Using your code, compute the values ofK(rn) after n iterations of your bisection method for n ∈ [0, 100]. Do the values converge to zero? Explain why. (e)   Modify your code to obtain a more precise estimation of r*, i.e., a value of r* such that K(r*) is closer to zero. 3. Newton-Raphson method (7 marks).  We are interested in computing r* using the Newton- Raphson method initialized in r0 .   You can write the  answers to the questions below as a function of r* and other roots of K(r). (a)  Write the expression for the iterative procedure rn+1  = f (rn) obtained  applying the Newton-Raphson method to the problem of finding the roots of K(r), i.e., the solutions of K(r) = 0. (b)   For E = -0. 1, consider the following three possible outcomes of the Newton-Raphson methods: -   the method converges to r*. -   the method converges to a root different from r* -   the method does not converge or fail. Indicate one intial condition r0  which leads to each of the possible outcomes that takes place in this problem. Justify your answer. (c)   Let I(E) be the largest interval containing r* for which the Newton-Raphson method converges, i.e., r* ∈ I and for any r0  ∈ I we have rn  → r* as n  → ∞.  Compute I for E = -0. 1 and discuss what happens at the boundary of this interval. (d)   Write a code which implements the Newton-Raphson method and apply it to the case E = -0. 1. Use your code to (i)   estimate r* with a precision of at least 6 digits; (ii)   test what happens for different values r0 , including r0  ∈ I and r0 ∉ I. Include values of r0 that illustrate all possible behaviours of the method (i.e., not only cases which converge to r*). (e)   For E  = -0. 1,  are  there values r0   ∉ I(E) for which the Newton-Raphson method converges to r*?  Use your code to explore possible outcomes.  Explain your numerical observations. (f)   For E  = +0. 1,  are  there  values r0   ∉ I(E) for  which  the Newton-Raphson method converges to r*?  Use your code to explore possible outcomes.  Explain your numerical observations. 4. Evaluate the AI answer (3 marks).  Below you find the answer of Microsoft Co-pilot (based on the large language model GPT-4) to the request to compute the roots of K (r) in the case E = 0. 1. The two user inputs (requests) appears in the text within the blue boxes on the right. (a)   Which programming language has Copilot used to find the roots? Is the chosen library suitable for the requested problem? (b)   For each of the two reported roots, indicate whether they are a good approximation (up to the reported precision) of an actual root of the problem. (c)   Consider the six bullet points listed in the 3-point detailed explanation.  Identify the bullet points that are not correct (if any) and correct them.

$25.00 View

[SOLVED] MBIS601 Business Process Analysis

MBIS601 Business Process Analysis Due Date Friday March 21, 6pm Purpose This assignment will help you develop skills in business process modeling and redesign  using BPMN 2.0. You will select a common real-world process, analyze its current state, identify inefficiencies, and propose an improved process. The goal is to apply structured process thinking to everyday activities and improve process efficiency through redesign. Scenario Options Choose one of the following processes to analyze and redesign: 1. University/Public Library Book Borrowing Process – Document all steps involved in borrowing and returning a library book, identifying pain points and proposing a more efficient system. 2. Public Transport Ticket Purchase Process – Model the process of obtaining a Metrocard, planning routes, tracking, boarding, and reaching destinations using Christchurch transportation system 3. NZ Post Parcel Sending Process - Model and document the steps for preparing, weighing, paying for, and tracking parcel shipments at a NZ Post location.  To experience the process first-hand, ship a small parcel to yourself (or to a loved one). IMPORTANT: ● You must observe your chosen process in real life to document the "as-is" process. ●    Do not imagine or invent the current process - take time to watch how it actually works. ●   You don't need to interview people involved in your chosen process. But if you want to talk to them, that's fine too. ●   You need to document not only the “main” process, but also common variants and exceptions. Assignment Tasks For your chosen process, complete the following tasks: 1. Model the Current (As-Is) Process: -    Use Camunda Modeler to create a BPMN 2.0 diagram of how the process currently works. (see readings list on LEARN on how to access Camunda) -    Clearly define tasks, decision points, actors, events, objects, gateways, lanes & pools. -     Ensure the model is logically structured and accurately represents reality. 2. Analyze Process Inefficiencies: -     Identify at least three inefficiencies in the current process (e.g., delays, unnecessary steps, lack of automation, bottlenecks). -     Briefly explain why these inefficiencies occur and their impact on users. 3. Design an Improved (To-Be) Process: -     Propose an optimized version of the process using BPMN 2.0. -    Clearly indicate changes made to improve efficiency, reduce waste, or enhance user experience.  Indicate what business process redesign heuristics you have applied. -     Ensure the new process is feasible and practical (consider constraints such as technology, user adoption, and costs). 4. Write a Short Analysis Report (Max 500 words): - Introduction: Briefly describe the selected process. - Key Inefficiencies: Summarize the problems with the As-Is process. - Redesign Rationale: Explain how your To-Be process improves efficiency and addresses the identified inefficiencies. - Conclusion: Reflect on the potential real-world impact of your redesign. - IMPORTANT: use the Word template that is provided on LEARN. Deliverables & Submission Format Submit all deliverables via the LEARN assignment link by the due date. 1.  Two BPMN 2.0 models (As-Is and To-Be), created using Camunda, exported as PNG images. 2.  A 500-word analysis in a PDF document explaining the process changes and their impact. Important: use the provided Word template that is on LEARN. 3.  A PDF appendix containing the links & transcripts of your GenAI conversations (if applicable) - this appendix does not count toward your word count. Grading Criteria (Total: 10 Marks) Criteria Description Marks Correct BPMN Notation Proper use of BPMN 2.0 elements 3 Process Clarity & Logical Flow Clear and structured representation of both As-Is and To-Be processes 2 Identification of Inefficiencies At least three inefficiencies identified and well-explained 2 Feasibility & Innovation of Redesign The proposed To-Be process is both practical and significantly improved 2 Quality of Written Analysis Clear, concise, & professional analysis 1 Late Submissions Policy ● The assignment is worth 10 marks total. ● Submission past the due date & time loses 1 mark per day late. → a 6:30pm submission on Friday March 21 loses 1 mark ●    No work accepted after 3 days late.  A mark of 0 will be assigned. ● Flexibility Token Option: ○ You can use one token to get extra 48 hours (2 days) with no penalty. ○ With a token, the 3-day late period starts after your 48-hour extension ends. ○    Maximum submission time: 5 days after original deadline (with token but with late submission penalty of 1 mark per day). Tools & Resources In the readings list on LEARN you will find links to: -    Camunda Modeler (access instructions & tutorials) -     BPMN 2.0 Guidelines & Cheat Sheets -    Chapter 3 Essential Process Modelling in Dumas’ book (required reading Week 3) Notes -    This is an individual assignment. -    You do not need to interview or engage with external businesses. -     Focus on everyday processes that you can observe and analyze. -     Keep models and reports clear and concise.

$25.00 View