Lab 1 Lecture Notes - Computer Science

advertisement
CS123 Engineering Computation Lab
Lab 1
Bruce Char
Department of Computer Science
Drexel University
Spring 2011
Welcome Back to CS123
• Goals and objectives for this term – by the end of this
term, students should be able to :
– Develop code scripts and programs using Maple’s “procedure”
(proc) feature, including creation of time staged simulations
– Develop user interfaces from Maple’s Components palette
– Use Maple’s Optimization feature to solve differential calculus
problems involving maximum and minimum (optimal) solutions
– Develop data fitting correlations using Maple’s Spline curve
fitting algorithm
– Work with application programming interfaces (API’s)
CS123 – Basic Schedule
•
•
•
•
•
•
4 labs in even numbered weeks (2, 4, 6 and 8)
4 quizzes in odd numbered weeks (3, 5, 7 and 9)
4 pre-lab quizlets in weeks (1, 3, 5 and 7)
Proficiency Exam in week 10
Flow of course similar to cs121 and cs122
Be sure to review contents of course web site for details
– www.cs.drexel.edu/complab/cs123/spring2011
What’s New in CS123?
• Extra consultation activity
– Intended for students who had a B or less in cs122
• Voluntary, but many find CS 123 to be harder than CS 122
– 4 sessions to be held on Tuesday evenings following lab week
(weeks 3, 5, 7 and 9)
• 6 to 7:30 PM
– Focus on problem solving and Maple exercises to enable
enhanced performance in quizzes
– A 4 point bonus will be awarded to all students who attend all 4
sessions
– To enroll, please contact Dave Augenblick at
• augenbdh@cs.drexel.edu
– 1st session  Tuesday, April 12th
Administrative Notes
• Please contact your individual instructors with questions
and problems
• CLC (room 147 UC) will be staffed at same times as for
cs122 in Winter (odd weeks – starting week 3)
– Note that CLC is also staffed on Thursdays and Fridays
• Missed work policies – same as in cs121 and cs122
– Makeup labs to be held on Monday at 6 PM (odd weeks). Must
receive explicit approval from your instructor in order to attend!
– Makeup quiz offered (30% penalty) – Thursday through Sunday
after completion of regular quiz
• No excused quizzes due to MapleTA login issues – please resolve
any such issues immediately
• All MapleTA login accounts have been (re) set to your Drexel id (ID)
and 8 digit student number (password)
– No makeup quizlets
Lab 1 Overview
• Based on materials from Chapter 17 readings – writing
programs as functions
– Review of user defined function syntax and usage
– Creating functions with Maple’s procedure feature
•
•
•
•
Use of global and local variables
Use of “if” and “looping” statements
Transforming scripts into procedures
Troubleshooting within procedures
Lab 1 Overview
• Lab 1 outline
– Part 0 – practice examples using Maple procedures
– Part 1.1 – building a time staged simulation program from
specifications
• In prior labs/quizzes, we encountered time staged simulation
scripts:
– Prey-predator problem
– Moving particle and bouncing ball
– Chemical reaction
• In today’s lab, we will develop a simulation to model the cooling of a
house
• Starter script provided – must add logic to perform a time staged
analysis using specified modeling relationships along with plots of
the temperature profiles
Lab 1 Overview
• Lab 1 outline - continued
– Part 1.2 – extend the cooling simulation to include
thermostat and air flow control functions
• Will modify script created in Part 1.1 to incorporate these
controls in the form of Maple procedures
– The overall simulation model is described in depth in
the introduction portion of the lab description
Quiz Week (3) Activities
• Quiz 1 will be released on Friday (4/8) at 6 PM
– Deadline: Wednesday (4/13) at 4:30 PM
– Makeup quiz – from Thursday (4/14) at 9 AM through
Sunday (4/17) at 11:00 PM
• 30% penalty
• Pre-lab 2 quizlet
– From Thursday (4/14 – noon) through Monday (4/18 –
8 AM)
• Be sure to visit the CLC for quiz or general
Maple assistance
• Be sure to register for extra consultation initiative
if interested
Download