提交所有组成员应已在Codegrade中打开分配,否则您将无法提交!注意:如果您未注册群在Codegrade的2-3名学生中您需要使用Canvas上提供的Java模板来调整te文件
在“作业1”包中。不要更改包结构或删除模板中Main文件的内容,因为此输出在Codegrade中进行评估。在Codegrade中,提交包含您的解决方案PDFAssignment2.pdf和以下.java文件:•MainStudentRoom.java•主电梯.java•电梯政策1State.java
•电梯政策2State.java•电梯政策3State.java•Utils.java自动测试将编译并运行您的代码。您可以签入CodeGrade这些测试是否通过。这并不意味着你的解决方案是正确的仅意味着您的代码可以被编译。如果AutoTest失败,您可以看到Codegrade上的错误消息以解决该问题。 Assignment 2: Non-Homogeneous Poisson Process
1.Poisson ProcessSimulation
FEB22013(X)Deadline: 17:00 January 31, 2023This assignment is made in the same groups as Assignment 1. To upload thesubmission all group members should have opened the assignment in Codegrade,otherwise you are not able to submit! Note: If you are not signed-up to a groupof 2-3 students on Codegrade, you are not able to submit your assignment!You are expectd to use the Java template provided on Canvas an adjust te filesin the ssignment 1package. Do not change the package structure or removethe contents of the Main files in the template, as this output is evaluated in Codegrade. In Codegrade, submit both a PDF containing your solutions with thenameAssignment2.pdf and the following .javafiles:MainStudentRoom.javaMainElevators.javaElevatorPolicy1State.javaElevatorPolicy2State.javaElevatorPolicy3State.javaUtils.java
2.An AutoTest will
compile and run your code. You can check inCodeGradewhether these tests passed. This does not mean that your solutions are correct, itsolely means that your code could be compiled. If the AutoTest failed, you can seethe error message on Codegrade to resolve it.We do not accept hand written solutions. Any hand written part of your assignment (this includes parts that are written on a tablet) are not graded.Each group is expected to work individually, and to hand in their own work.Violations will be reported to the ExamAdministration.1Question 1 Student Room SearchYou are looking for a room via Stadswonen. You replied to many advertisementsand now received invitations to visit m of these rooms. When you visit the room,you immediately have to decide whether you want that room or not, before viewingthe other rooms. A well known strategy for this problem is to visit the first r roomswithout taking any of them, and to then take the first room that exceeds the bestrooms out of the first r rooms. Since you really want to have a room in Rotterdam,you do always take the last room you visit, regardless of itsquality.Assume there exists a preference ranking of all m rooms that you are allowed tovisit, i.e., there are no two rooms that you like equally well. Let the nicest roomhave rank 1 and the worst room have rank m.a. Give the pseudocode of a Monte Carlo Algorithm to determine the probabilitythat you end-up with the nicest room if you use the above described strategy.b. Give the pseudocode of a Monte Carlo Algorithm to determine the expectedrank of the room that you end-up with if you use the above described strategy.c. Implement the above described Monte Carlo Algorithms. If you can visitm = 12 rooms, what level of r would you use if you want to maximise theprobability of obtaining the nicest room, and what level of r would you use ifyou want to minimise the expected rank of the room? Provide the output ina table.2Question 2 Office ElevatorsAn investor of a tall office building with 2 elevators wants to analyse the effect ofdifferent elevator policies on the average time waiting for an elevator, the averagenumber of employees waiting for an elevator, and the average time spend in anelevator. He is specifically interested in this during the morning peak, which laststfor one hour, when employees arrive at the office. He is considering the followingthree policies:1. Both elevators visit all floors2. One elevator visits the odd numbered floors and the other elevator visits theeven numbered floors.3. One elevator visit the bottom half of the building (floors 1-6) and the otherelevator visit the remaining, top part, of the building (floors 7-12).To compare the two policies, you are asked to implement a simulation and providethe company with an advice for their elevator policy. You can make use of thefollowing assumptions:
During the morning peak, employees arrive at the ground floor and take theelevator to the floor that contains their office. There are no employees thattake the elevator from another floor than the ground floor.Employees arrive according to a non-homogeneous Poisson process with rate100 + 50 cThe offices of the employees are evenly spread over all floors and all employeestake the elevator.For policy 1, when both elevators are at the ground floor and have capacity,employees choose an elevator at random.For policy 1 and 2, when an elevator departs from the ground floor and needsto stop at n floors, it takes the elevator 30 + 20n seconds to stop at thosefloors and be back at the ground floor. For policy 3, it takes an elevator forthe bottom part of the building 20 + 20n seconds to stop at n floors be backat the ground floor and 40 + 20n seconds to stop at n floors from the top partof the building and be back at the ground floor.Each elevator has a capacity of 10 people.An elevator departs 10 seconds after the first employee enters the elevator, regardless of the number of employees in the elevator and time the last employeeentered theelevator.3a. Define the relevant state variables, counter variables and events when usingpolicy 1. Explain how all variables are updated (i.e., when and how do thevalues change). Moreover, show how the simulation is initialised, and for eachevent when it is generated. Explain how the required performance measurescan be calculated.b. Program the DES using the variables and events defined.c. Program the DES for policy 2. Explain briefly what changes compared to thescenario with policy 1 (i.e., explain what parts are different compared to a.,you do not have to repeat the elements that remain the same).d. Program the DES for policy 3. Explain briefly what changes compared to thescenario with policy 1 (i.e., explain what parts are different compared to a.,you do not have to repeat the elements that remain the same).e. Give a recommendation to the investor regarding the elevator policy in hisbuilding. Explain differences you find in the performance measures for thedifferent policies.
WX:codehelp
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。