This is my second entry of sLOG. Today I would like to talk about our first project "Sneeze Infection". This is a very interesting topic for a student programmer. The project is basically about to generate some definition command to DrRacket, based on what has been given. Professor has generated a whole rkt file on the situation that he suggested. I have found some difficulties in doing this projects.
The first obstacle is that I do not fully understand all command he made in the file, although I have go through the whole file. For example, there are some commands such as "local" which is not appeared on our textbook yet. I have found that I could omit those "unknown" commands, then go to the exact question about in the file.
Among four jobs in the file, the first one is creating a definition on "left-cycle", that makes the first element of the list at the back of the new list. For this request, I have went through all the videos of list and aggregation. Finally, I decided to separate the list and then merge together into one list. "Append" command is my choice, however, the "check-expect" cannot go through for hundreds of times. Then I use a new draft window on DrRacket to try my definition again and again. Finally, I found the problem of my definition. I first time use the seen the reverse as a list, which is not. Then I put a list out of the bracket to make it as a list. It worked!
The second job is more complicated than the first one although it looks similar. "Right-cycle" is the one definition about put the last element in front of the rest of list. This is the one with a lot of logic cycle and use many "reverse" "rest" and "first" command on list. I figured it out to use the way of "in-to-out". I dissolved the list in to elements, then I found the last element of a list is the first element of reverse list. Using the same logic, I found the way to claim the definition. The following two question was not that difficult for me, since I can get the hint from "check-expect" sentence to define the other two variables.
The last part of this project is to change the variables which has been indicated in the first lines of the document to see what will happen on the expected result. I found it is fun when I change the three variables - VIRULENCE, DURATION and IMMUNITY. I changed those variables to their maximum value indicate in the assignment. This model is really like the real one with only three variables which can influence the effects of infection. The virulence is the idea how the virus spread into the public and the ability to infect other people. Duration is the variable to indicate the period of people who has been infected. The immunity is when people already recovered from the infection, they will have immunity to such a virus for a period. Those can influence the course differently. To find out the change and effects of the change, I keep other parameters the same as before, change the specific parameter into its extreme value to see how to influence the model. I found this project is very interesting and challenged for students.
No comments:
Post a Comment