Creating Computational Models with Excel (AKA Excelettes) Purpose Learn how to use Excel to create computational modeling tools that incorporate easy-to-change variables so as to quickly illustrate their impact on a system’s behavior or output. Creating an Excel Computational Model 1. Select an activity or experiment to model. 2. Analyze the experimental scenario and process: a. What is the question that your experiment will answer? b. What is the outcome or result that you are watching? c. What factors (variables) affect the results? d. Which of these factors will you keep constant throughout the experiment? e. Which of these factors will you intentionally vary to see how they affect the results? f. Which factors will you ignore? 3. Write the equation that relates the variables to the results. 4. Open Excel and display the Developer Tab (Win) or the Forms Toolbar (Mac). a. Windows Office 2010: File -> Options > Customize Ribbon. Choose commands from: Main Tab. Click to highlight Developer (do not expand). Click Add. Click OK. b. Windows Office 2007: Microsoft Office -> Excel Options -> Popular -> Show Developer Tab in Ribbon. The Home Faucet Audit Example 1. The Home Faucet Audit 2. The Home Faucet Audit Scenario a. How much water do we use each day via the bathroom faucet? b. Amount of water used (daily-usage) c. Factors that affect how much we use: i. How often we turn on the faucet (frequency) ii. How long the faucet is on with each use (duration) iii. Why we turn on the faucet (purpose) iv. How much water flows from the faucet each minute (flow-rate) d. Constants: flow rate e. Independent variables: frequency, duration f. Ignore: purpose 3. gal min # times gal Flowrate xDuration secx x Usage 60sec day min day c. Mac: Views -> Toolbars -> Forms. 5. Format a spreadsheet: a. Enter a title into Row 1 that is descriptive of the experiment. 5. Home Faucet Audit spreadsheet set up w/ the experiment’s question as the title and descriptions of the variables used as column headings. Tip: once all of your column headings are in place select all of the Row 1 cells across the columns in use and click the icon to merge the Row 1 cells and center your title. b. Enter column headings into Row 2, assigning one column to each factor/variable identified and one to the result. Tip: if your column headings are long, click on the icon before starting to type. This will force your heading to stay within the width of the column. You won’t need to use multiple rows of cells for your multi-line headings. Tip: adjust column widths, font sizes and types, colors etc. to make your spreadsheet easy to read. 6. Set up data entry: a. Enter the equation from above into Row 3 of the results column. Tip: Use the Insert Function feature, to “build” your equation. 6. Home Water Audit example data entry set-up: a. Entering the equation: , b. Leave the row under the column heading blank. Draw a value slider into the second cell under each factor’s/ variable’s heading. Tip: for the Home Faucet Audit example, under the purpose column, merge cells A3 and A4 so that one purpose brackets two rows, one for the value and one for the slider bar. Windows Office 2010: Click on the Developer Tab b. Adding a scroll bar for the number of times a water use/purpose happens each day: Click Controls -> Insert Click Form Controls -> Scroll Bar Mac: On the Forms toolbar, select the Scroll Bar: Form Control. It is the 5th one down on the left hand side. i. Having selected scrollbar tool, click and drag to draw your scroll bar near the target cell. Tip: whenever the anchors (corner boxes) are showing on the scroll bar, you can move it around to position it on your screen. Use the arrow keys on the keyboard for fine-control over the scroll bar position. ii. Right click on the scroll bar and select “Format Control”. iii. In the Format Control dialog box, set the Current Value = the default value of this variable; Minimum Value = lowest value this variable could have; Maximum Value = highest value this variable could have; and the Incremental Change = smallest change possible (usually the significance of this value). Tip: All values must be whole numbers. Tip: You do not need to change the Page Change control value. iv. Click on the icon next to the Cell Link field, . A Format control window will open. v. Click on the cell above the scroll bar / below the column heading. The cell address will appear in the Cell Link field. vi. Hit the Enter key and click OK. The numerical value of this variable will display in that cell. c. Your model is complete; try it out! c. The completed model: sliders have been adjusted to enter realistic values. The values can be easily increased or decreased to see what impact changes in “brushing teeth” would have on water usage. Summary/Analysis of the Home Faucet Audit Example In the example, we created an Excel file to model water savings. Here is how it works. 1. If my faucet flow rate is 3.5 gallons per minute, and I have the water running for 240 seconds (4 minutes), while I brush my teeth, I will use 14 gallons of water each time I brush my teeth. 2. Since I brush my teeth 2 times/day, this amounts to 28 gallons/day. 3. If all 4 people in my family do the same thing, we are using 112 gals/day for this purpose. 4. I can think of having everyone in my family reduce the amount of time they have the water running to 60 seconds by turning the water off and on during the brushing. I can test my idea by adjusting the slider(s) on the computational model and quickly see that it will result in our family using only 28 gals/day for teeth brushing! This tool is a quick, easy, informative, and motivating way to evaluate the impact of input variables on the output of an experiment!