CS108L Lab 11: Independent Rubric Example: The Parking Lot In this example we will build a model from scratch (we will not be using a model in the library, found on the web or any of our previous assignments). What we will be modeling is a parking lot where we have cars coming in and leaving through defined access points, parking for a random amount of time in parking only spaces and not crashing into one another. Milestone 2: The Proposal (Worth 10 points) The proposal is described in the document Independent Project Proposal you may obtain from the class web page. It is not repeated here. Milestone 3: The first week (Worth 10 points) This is the first programming milestone so it requires us to have a foundation for building upon. So the first thing we need to do is build a foundation. So that becomes our activity and we break it down as follows: Activity: build the foundation A. We need a parking lot: this is just black with yellow lines for the parking spaces [3pts] B. Access Points: Cars will come in and leave through these points. So these are patches that periodically sprout cars or if a car is leaving they cause the car to ‘die’ [1pt] C. Cars: We don’t care about the type of car so they can just be turtles but they do need a special variable(s) to indicate if they are arriving, leaving or parking. We probably want to monitor the # of each car status too, say a plot where each status is on the plot. [1pt] D. Car movement: Cars don’t wiggle walk they follow the path. Let’s get them moving along a correct path and stopping in a parking space (note that at this time they can park on top of each other). [5pts] Milestone 4: The second week (Worth 10 points) For this milestone we will add more features. Activity: Car Navigation Part 1 and Parking Time Previously we just had the cars moving along a path and parked. We didn't care if they ran over each other or not. Now we want to add collision avoidance. This is a challenging concept and very important when dealing with agents in real environments. Because of the challenge we decide to only do 1 aspect this week. We focus on collision avoidance while they are moving and allow them to park on top of each other if they want. Additionally, we only want the car to stay parked so long so we include that as part of this activity. We do this here because we want to make sure the collision avoidance works whether a car is entering the lot or leaving. A. As its driving along which is when it is on a path towards the parking lot or heading out of the parking lot. This is straight forward avoidance it will have to wait on a car in front of it and decide if it wants to keep following it or turn if an opportunity presents itself. Let’s make a global variable for that probability, for now all drivers are the same. [6pts] B. Let’s also add a cars-own variable call parkTime that sets the time a car will stay in the parking spot. Set it to a random time, we will have to play around to figure out a good random range. So finding that range is part of the rubric and we include this data as part of our data collection. [4 pts] Milestone 4: The final project (Worth 40 points) (submission). We are almost done. Part of this milestone’s rubric is written (the first 20 points). For that portion refer to the Independent Project Proposal on the class website. The remainder of the points (‘E’) from the Proposal document is up to us. So we will finish off our parking lot model. We need to finish off the car navigation by making sure cars don’t hit parked cars or cars exiting a parking space. Activities: Car Navigation Part 2 and Parking Lot Efficiency A. We need to keep cars from parking on top of each other so we add code that checks if a space is open and if not it continues looking. We limit its ability to see if a space is open to 1 patch ahead. [7pts] B. We need to keep the car from hitting other cars when leaving a parking space so we need to check if we can back out or not, if not we wait. [7pts] C. Let’s collect some data we want to find out the efficiency of our parking lot. We will do a very big simplification for this. We will stop the model when X amount of ticks happen and see how many cars have exited the lot (we start with 0 cars and sprout cars at set # of ticks). We run this 3 times for each of (at least) 3 different tick stopping points and create a plot to see its performance over time. [6pts] And that completes are rubric. We need to take the completed proposal and go over it with an instructor. In talking through these items we will likely find things we want to change, add or remove depending on the instructor’s feedback.
© Copyright 2026 Paperzz