duction. These advantages of the electronic measurement system over the
mechanical ... 2 Chapter 1 0 Applications of Electronic Instrument Systems. 1.2
THE ...
actions have become tightly integrated in online social networks and social media such as biogs, micro blogs, and social tagging. Moreover, user generated ...
1.1 Cell Structure; DNA; RNA; transcription; translation; proteins. COMS 4761 --
2007. 2 ... B. Alberts et al, “Molecular Biology of The Cell”, 4th edition, Garland.
Science. ... J.D. Watson et al, “Molecular Biology of The Gene”, 5th edition,.
Pea
Harvard to Offer Class on The Wire by William Julius Wilson. The ... Letters to the Editor: The Impact of PTSD on Treatment Adherence in. Persons with HIV .... Watkins-Hayes, Celeste, LaShawnDa Pittman, and Jean Beaman (2011). âDying ...
of motivation was put forward by Maslow in 1943, and with this theory, a hierarchy of needs that ...... Massachusetts: Jones and Bartlett Publishers, 2007. 64.
1.2.1 The VBA Integrated Development Environment (IDE) . ..... language, but you
can't use it outside the application in which it is integrated. .... of the window (refer
to Figure 1.5), select Code from the tools menu, or press F7 (refer to Fi
The legal system calls upon the jury to perform numerous roles. The jury is asked to evaluate the factual evidence presented in the courtroom and to apply legal ...
2 Roy Walmsley, World Prison Population List (Seventh Ed.), KINGS COLLEGE ... the 1980s, peaking in 1989, hitting a trough from 1991 to 1993, then rising again). ... 2011), http://bjs.gov/content/pub/pdf/jim10st.pdf (showing Harris County at ...
many thinkers were preoccupied with the question of script choice, a question on which .... A neighbour girl peeked in to see if she needed anything, and Lalla.
Apr 27, 2016 - with the record files paperwork, pays fees, attends additional court hearings, and successfully navigates
Defendants' Parole Revocation System, Within Which Parolees Are Denied. Adequate Process ..... Defender in the State of
At the heart of the interpretive anthropology Clifford Geertz pioneered, or at ..... worker returns repeatedly to these field notes consisting of experiences and conversations ..... Introduction. special issue: the fate of 'culture': Geertz and beyon
perceive that the structures are actually dynamic objects that move on a time- ..... The second example reveals the importance of understanding stereochemistry.
Address correspondence to Daniel C. Molden, Northwestern University, 2029 Sheridan Rd.,. Evanston, IL ...... Posner, M. I., & Snyder, C. R. R. (1975). Atten-.
Northwestern University School of Law. 357 East Chicago Avenue ... New Illinois Trade Regulation Laws: The Uniform Deceptive Trade Practices Act, 54.
Apr 27, 2016 - juvenile system has aimed to help young people avoid the stigma of a .... conducted a literature review o
Jun 1, 2004 ... Computer Security: Art and Science .... Use manuals; try exceeding limits and
restrictions; try omitting steps in ..... Possible procedural problem.
2. Chapter 23 Solutions. 23.4. We find the equal-magnitude charges on both
spheres: F = ke ...... *23.37 (a) Every object has the same volume, V = 8 0.0300 m
.
The provisions of this chapter shall govern the materials, design, construction,
and quality ... Diaphragms and shear wall boundary members to which sheathing
...
Architectural Drafting Using AutoCAD 2010. Chapter 23 Test Questions. Drawing
Foundation Plans. Chapter 23 Test Questions. Name: ...
adapter sequences and merging paired-end sequencing data; (4) base quality score filtering or ..... Iterate over the output files from the merging script and call.
Acquisition System} wave measuring stations located off. Haifa CNorthD and Ashkelon CSoutrO along the Mediterra- nean coast of Israel. The paper includes a ...
MRI of Experimental Gliomas. Frits Thorsen ... We have developed a model where human glioma specimens are oper- ated into the ...... brainstem glioma model.
VBA & Excel for discrete-event simulation. • Advantages. – VBA is easy to learn
and available almost everywhere. – VBA is a full-featured programming ...
Visual Basic for Applications • VBA a significant subset of the stand‐alone Visual Basic programming language • It is integrated into Microsoft Office applications (and others) • It is the macro language of Excel • You can add – Forms for dialog boxes with user input – Modules containing procedures this lecture – Class Modules for object definitions later 2
VBA & Excel for discrete‐event simulation • Advantages – VBA is easy to learn and available almost everywhere – VBA is a full‐featured programming language so what you learn translates directly to C++, Java, etc. – You have access to Excel functions for computation and Excel itself for storing and analyzing outputs
• Disadvantages – VBA is interpreted, not compiled, so execution is slow – Excel functions can be buggy
3
Accessing VBA in Excel 2010+ • You launch the Visual Basic Editor from the Developer Tab. • If you don’t have a Developer Tab in the Ribbon, then go to the File, Options, and add the “Developer” tab to the ribbon.
4
Modules are a convenient way to organize code
Code Window: This is where you will write your simulation programs
Property Inspector
Project Explorer
Declarations made here are global; all other code must be in a Sub or Function
5
Structure of a VBA project • Modules are collections of VBA code – From menu: Insert Module – Module can be named in the Property Inspector – Includes: • Global Declarations that occur before any Subs or Functions • Procedures (Subs) and Functions of executable code
• Class Modules are covered later…. • UserForms are graphic objects for user input and output; we will not work with UserForms 6
Variables • It is good programming practice to declare the type of all variables • Standard types in VBA – Single, Double (single and double‐precision reals) – Integer, Long (small 32k and large 2 billion integers) – String (character variables) – Boolean (True or False)
7
Variable scope • “Scope” determines to what part of your VBA code a variable is visible • Project level: Entire workbook – Public X As Double – Must be declared at the top of a Module – You will rarely want to do this
• Module level: Entire module (“Global”) – {Dim or Private} Z As Long – Must be declared at the top of a Module
• Procedure level: Sub or Function (“Local”) – {Dim or Private} Y As String – Declared inside a Sub or Function 8
Constants & Statics • Const constantName [As type] = expression – Value cannot be changed Const PI = 3.1, NumPLANETS = 9 • Static staticName As type – Static causes variables in Subs and Functions to retain their values (normally lost when you exit Sub or Function) Static yourName As String 9
The values of these variables in the initial declarations are available to all Subs or Functions in this Module, but not to other Modules
Examples Dim Dim Dim Dim Dim Dim Dim
Clock As Double NextFailure As Double NextRepair As Double S As Double Slast As Double Tlast As Double Area As Double
' ' ' ' ' ' '
simulation clock time of next failure event time of next repair event system state previous value of the system state time of previous state change area under S(t) curve
Public Sub TTFRep() ' Program to generate a sample path for the TTF example Dim NextEvent As String Const Infinity = 1000000 Declaration of a constant Rnd (-1) Randomize (1234) ' Define and initialize replication variables Dim Rep As Integer Dim SumS As Double, SumY As Double
These variables’ values are only known to Sub TTFRep 10
Arrays • Arrays can have any number of dimensions • Where the indices start is up to you Dim X(1 to 100) as Integer Dim Elf(0 to 5, 0 to 20) as String
• You can also dynamically allocate and reallocate an array Dim Calendar() as Integer ReDim Calendar (1 to 31) as Integer 11
Control Structures • VBA contains the usual control structures for branching, looping, etc. • We will present a few of the most useful ones. • A consistent feature of VBA control structures is that there is an explicit "end" statement
12
If‐Then‐Else‐Endif Structure If Index = 0 Then X = X + 1 Y = VBA.Sqr(X) Else If Index = 1 Then Y = VBA.Sqr(X) Else If Index = 2 Then Y = X Else X = 0 Note: All control structures in VBA have an End If explicit ending statement 13
Select Case Structure Select Case IndexVariable Case 0 statements… Case 1 to 10 statements… Case Is