Beruflich Dokumente
Kultur Dokumente
FORTRAN
Handout 1
Introduction to FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
Dr. Assakkaf
Slide No. 1
ENCE 202
FORTRAN
Handout 1
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n FORTRAN
FORTRAN = FORmula TRANslation
Developed for the IBM 704 Computer
Developed by John Backus and a team of
13 other programmers
Developed between 1954 and 1957
Dr. Assakkaf
Slide No. 2
1
ENCE 202
FORTRAN
Handout 1
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
X = A* B + C
Dr. Assakkaf
Slide No. 3
ENCE 202
FORTRAN
Handout 1
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Source Program
(high level language)
Compiler
Object Program
(machine language)
Dr. Assakkaf
Slide No. 4
2
ENCE 202
FORTRAN
Handout 1
Program Development
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n A program consists of
Input
An execution logic (computation)
Output
n A flow chart is used to develop the
structure
Dr. Assakkaf
Slide No. 5
ENCE 202
FORTRAN
Handout 1
Program Development
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Output:
Volume, V
Dr. Assakkaf
Slide No. 6
3
ENCE 202
FORTRAN
Handout 1
Program Development
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
CALCULATE:
V
OUTPUT:
ENTER:
BEGIN Display END
D and h 2
D Volume(V)
V= h
4
Dr. Assakkaf
Slide No. 7
ENCE 202
FORTRAN
Handout 1
Program Development
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Output:
Height, h
Dr. Assakkaf
Slide No. 8
4
ENCE 202
FORTRAN
Handout 1
Program Development
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 9
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 10
5
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n FORTRAN Statements
Positions 7 to 72 of a line can be used. To
continue on the next line, use any character on
position 6 of the next line
n Constants
Examples
-12
1.2345
12.45-e10
Dr. Assakkaf
Slide No. 11
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
1 2 3 4 5 6 7 8
1234567890123456789012345678901234567890123456789012345678901234567890 1234567890
C
Statement in columns 7 to 72
Column 73
Character different from 0 or blank in column 6 And beyond
Indicates a continuation of the preceding line Are ignored
6
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Data Types
Integer
Real
Double Precision
Complex
Character
Logical
Dr. Assakkaf
Slide No. 13
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Variables
Variables starts with a letter
The first letter defines the variable type
Integer or real
The default types are
I, J, K, L, M, and N
These are integers variables if they are used as
the first letter in names
Otherwise, they are treated as real variables
Dr. Assakkaf
Slide No. 14
7
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Type Statements
REAL list of variables
INTEGER list of variables
CHARACTER*n list of variables with size
n (default n = 1)
PARAMETER (param1 = value1, param2 =
value2, .etc)
DATA list1/data1/, list2/data2/, , listn/datan?
Dr. Assakkaf
Slide No. 15
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 16
8
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Arithmetic Operations
Addition +
Subtraction -
Multiplication *
Division /
Exponentiation **
Example:
Area = (3.14)*(D**2)/4
Dr. Assakkaf
Slide No. 17
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Priority Rules
** from right to left
* and / from left to right
+ and - from left to right
NOTE:
To avoid confusion, always use parentheses
Dr. Assakkaf
Slide No. 18
9
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 19
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Assignment Statements
Variable = expression
Examples
x = 0.234
y = sqrt(x) / 2 + height**3
Dr. Assakkaf
Slide No. 20
10
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Examples:
PRINT * (print a blank line)
PRINT *, Test, Test Test, Test
PRINT *, Interest =, Int Interest = 5
Dr. Assakkaf
Slide No. 21
ENCE 202
FORTRAN
Handout 1
Fundamentals of FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
11
ENCE 202
FORTRAN
Handout 1
Example: Simple Program
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 23
ENCE 202
FORTRAN
Handout 1
Example: Simple Program
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
PROGRAM PROJECT
C This program calculates the velocity and height of a projectile given its
C initial height, initial velocity, and constant acceleration. Variables used are:
C HGHT : initial height
C HGHT : height at any time
C VELOC : initial vertical velocity
C VELOC : vertical velocity at any time
C ACCEL : vertical acceleration (Gravity)
C TIME : time elapsed since projectile was launched
ACCEL = - .
PRINT *, `Enter initial height, initial velocity, and time?`
READ *, HGHT , VELOC , TIME
Dr. Assakkaf
Slide No. 24
12
ENCE 202
FORTRAN
Handout 2
Introduction to FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
Dr. Assakkaf
Slide No. 1
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Control Structures
In a structured program, the logical flow
can be of the following types:
Sequential straight-line programs
Selection If statements
Repetition Do loops
Dr. Assakkaf
Slide No. 2
1
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Logical Expressions
Relational Operators
Expression-1 relational-operator expression-2
Relational Operators are:
.LT. Is less than
.GT. Is greater than
.EQ. Is equal to
.LE. Is less than or equal to
.GE. Is greater than or equal to
.NE. Is not equal to
Dr. Assakkaf
Slide No. 3
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Logical Operators
They can be used to combine the previous
operators or negate them
Logical operators are:
.NOT. negation
.AND. both true
.OR. one is true
.EQV. both true or false
.NEQV. negation of .EQV.
Dr. Assakkaf
Slide No. 4
2
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Logical IF Statement
IF(logical-expression) statement
Logical
Statement TRUE
Expression
FALSE
Example
IF (1.5 .LE. X .AND. X .LE. 2.5) PRINT *, X
Dr. Assakkaf
Slide No. 5
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Block IF Statement
Type I
IF (logical-expression) THEN
statement 1
statement 2 Block-1 Logical
Block 1 TRUE
Expression
:
:
FALSE
END IF
Dr. Assakkaf
Slide No. 6
3
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Block IF Statement
Example: Type 1
IF (X .GT. 0) THEN
Y=X*X
Z = SQRT (X)
Slope = TAN (Z)
END IF
Dr. Assakkaf
Slide No. 7
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Block IF Statement
Type II
IF (logical-expression) THEN
Block-1
Logical
Block 1 TRUE
ELSE Expression
Block-2 FALSE
END IF Block 2
Dr. Assakkaf
Slide No. 8
4
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Sample runs:
Dr. Assakkaf
Slide No. 9
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Nested IF Statements
They are used for multi-alternative selection
structure as follows:
IF (logical-expression-1) THEN
Block-1
ELSE
IF (logical-expression-2) THEN
Block-2
ELSE
Block-3
END IF
END IF
Dr. Assakkaf
Slide No. 10
5
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Nested IF Statements
An alternative format for the previous nested IF
structures is as follows:
IF (logical-expression-1) THEN
Block-1
ELSE IF (logical-expression-2) THEN
Block-2
ELSE IF (logical-expression-3) THEN
Block-3
:
ELSE
Block-n
END IF
Dr. Assakkaf
Slide No. 11
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Body
6
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Nested DO Loops
Legal Structure Illegal Structure
DO 5, I = 1, 10 DO 5, I = 1, 10
Statement-Set-1 Statement-Set-1
DO 6, J = 1, 5 DO 6, J = 1, 5
Statement-Set-2 Statement-Set-2
6 CONTINUE 5 CONTINUE
Statement-Set-3 Statement-Set-3
5 CONTINUE 6 CONTINUE
DO 5, I = 1, 10 DO 5, I = 1, 10
Statement-Set-1 Statement-Set-1
IF (expression) THEN IF (expression) THEN
Statement-Set-2 Statement-Set-2
END IF 5 CONTINUE
Statement-Set-3 END IF
5 CONTINUE Statement-Set-3
Dr. Assakkaf
Slide No. 13
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 14
7
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n GO TO Statement
Form I
n IF (logical-expression) THEN
Statements
:
:
GO TO n
END IF
Dr. Assakkaf
Slide No. 15
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n GO TO Statement
Form II
n statements
:
:
IF (logical-expression) GO TO n
NOTE: Standard FORTRAN does not include a WHILE statement. Nevertheless, this
Important control structure can be implemented in standard FORTRAN by using a
GO TO statement within an IF construct
Dr. Assakkaf
Slide No. 16
8
ENCE 202
FORTRAN
Handout 2
Structured Programming
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 17
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 18
9
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
OR
Dr. Assakkaf
Slide No. 19
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Control Characters
I = integer
F = real number in decimal format
E = real number in scientific format
D = F or E input/output, depending on value
nX = horizontal spacing
/ = vertical spacing
A = character data
Example:
FORMAT (1X, 2(A, F6.2)) Dr. Assakkaf
Slide No. 20
10
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Formatted Input
The READ statement is for reading from the
default input device (such as the keyboard)
READ *, input-list
Dr. Assakkaf
Slide No. 21
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 22
11
ENCE 202
FORTRAN
Handout 2
Input an Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
WRITE (6, *) X, Y
WRITE (UNIT = 6, FMT = *) X, Y
WRITE (*, *) X, Y
same as PRINT *, X, Y
Dr. Assakkaf
Slide No. 23
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
12
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n File Processing
It is common to have a need for large
input/output. Files can be on magnetic
tapes, disks, or hard drive. Using files
requires the following steps:
To open an existing file or create a new file:
OPEN (open-list)
To close a file:
CLOSE (close-list)
Dr. Assakkaf
Slide No. 25
ENCE 202
FORTRAN
Handout 2
Input and output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
CLOSE (13)
(where 13 is the unit number
Dr. Assakkaf
Slide No. 26
13
ENCE 202
FORTRAN
Handout 2
Input and Output
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n File Processing
Other features
REWIND unit
(go to initial point for unit such as 13 (use a
number))
BACKSPACE unit
(go to the beginning of preceding record in unit
such as 13 (use a number))
Dr. Assakkaf
Slide No. 27
14
ENCE 202
FORTRAN
Handout 3
Introduction to FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
Dr. Assakkaf
Slide No. 1
ENCE 202
FORTRAN
Handout 3
Nonnumeric Data Types
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
LOGICAL list-of-variables
Dr. Assakkaf
Slide No. 2
1
ENCE 202
FORTRAN
Handout 3
Nonnumeric Data Type
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 3
ENCE 202
FORTRAN
Handout 3
Nonnumeric Data Type
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 4
2
ENCE 202
FORTRAN
Handout 3
Character Data Type
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
FORTRAN
Handout 3
Character Data Type
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
PRINT *, A, B
Dr. Assakkaf
Slide No. 6
3
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
DIMENSION List
Dr. Assakkaf
Slide No. 8
4
ENCE 202
FORTRAN
Handout 3
One dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 9
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
DIMENSION X(5)
DO 10 I = 1, 5
10 READ *, X (I)
Dr. Assakkaf
Slide No. 10
5
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Example 3
READ 10, X
10 FORMAT (5F6.1)
Note: It reads X(1) to X(5)
Dr. Assakkaf
Slide No. 11
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
READ *, (X(I), I = 1, 5)
or
N=5
READ *, (X(I), I = 1, N)
Dr. Assakkaf
Slide No. 12
6
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Example
READ (*, *, END = 10) (X(I), I = 1, 100)
The END means that once data are read go to statement number 10
Dr. Assakkaf
Slide No. 13
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 14
7
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 15
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n DATA Statement
Dr. Assakkaf
Slide No. 16
8
ENCE 202
FORTRAN
Handout 3
One Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 17
ENCE 202
FORTRAN
Handout 3
Multi-Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 18
9
ENCE 202
FORTRAN
Handout 3
Multi-Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example
REAL X(2,5)
The result of statement is declaring X as a
2 by 5 array. Also, it can declared using
one of the following statements:
DIMENSION X(2, 5)
REAL X(1:2, 1:5)
Dr. Assakkaf
Slide No. 19
ENCE 202
FORTRAN
Handout 3
Multi-Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 20
10
ENCE 202
FORTRAN
Handout 3
Multi-Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
FORTRAN
Handout 3
Multi-Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Example
INTEGER X(2,3)
READ *, X
The above statements results in reading X
column wise. If we read 3, 4, 8, 9, 10, 5,
the result is the following matrix:
3 8 10
4 9 5
Dr. Assakkaf
Slide No. 22
11
ENCE 202
FORTRAN
Handout 3
Multi-Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example
In general use a read or write statement
with (input/output list, control-variable =
initial-value, limit) as an implied DO loop.
For example
Dr. Assakkaf
Slide No. 23
ENCE 202
FORTRAN
Handout 3
Multi-Dimensional Arrays
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 24
12
ENCE 202
FORTRAN
Handout 4
Introduction to FORTRAN
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
Dr. Assakkaf
Slide No. 1
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 2
1
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Statement Functions
The statement should be used in the same
unit of program where function is used and
immediately after the specification
statements (before any executable
statements).
Dr. Assakkaf
Slide No. 4
2
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Function Subprograms
The structure for a function subprogram is the
same as a FORTRAN programs as follows:
FUNCTION name(argument-list)
Declaration part
Subprogram statements
RETURN
END
Dr. Assakkaf
Slide No. 6
3
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 7
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
FUNCTION F(X,Y,N)
REAL X, Y
INTEGER N
F = X**N + Y**N
RETURN
END
Dr. Assakkaf
Slide No. 8
4
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
W = F(A,B+3.0,2)
or
Z = F(R(I),SIN(A),K)
Dr. Assakkaf
Slide No. 9
ENCE 202
FORTRAN
Handout 4
Functions and Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 10
5
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Subroutine Subprograms
Similar to Function subprograms with the following
differences:
1.Functions return one value; whereas Subroutines return
no value, one or more values.
2.Returned values by Functions are their names; whereas
Subroutine names do not return values, Subroutine
output is part of the arguments
3.A Function is referenced using its name in an
expression; whereas subroutines are referenced by a
CALL statement
Dr. Assakkaf
Slide No. 11
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Structure of Subroutines
SUBROUTINE name(argument-list)
Declaration Part
Subprogram Statements
RETURN
END
Dr. Assakkaf
Slide No. 12
6
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
SUBROUTINE MEAN(X,N,Z)
SUM = 0
INTEGER N
REAL X(N), Z, SUM
DO 10 I = I, N
SUM = SUM + X(I)
10 CONTINUE
Z = SUM/N
RETURN
END
Dr. Assakkaf
Slide No. 14
7
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 15
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n COMMON Statement
This statement is used to share information
between main Program and Subprograms and
among subprograms. It takes the following form:
COMMON list
Dr. Assakkaf
Slide No. 16
8
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example
In the main program, use
COMMON A, B, C
In the subprograms, use
COMMON X, Y, Z
The results of these two statements is that
A takes on the same value as X, B takes
on same values as Y, and C takes on the
same value as Z.
Dr. Assakkaf
Slide No. 17
ENCE 202
FORTRAN
Handout 4
Subroutines
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 18
9
ENCE 202
FORTRAN
Handout 4
Double Precision
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 19
ENCE 202
FORTRAN
Handout 4
Double Precision
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 20
10
ENCE 202
FORTRAN
Handout 4
Double Precision
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
rDw.d
where
r = repetitions,
w = width, and
d = number of digits
Dr. Assakkaf
Slide No. 21
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
f ( x) = x 3 3x 2 x + 9 = 0
Calls: NEWT
Output (form Function F)
X=Value of X at current iteration
F=Functional value at x
Dr. Assakkaf
Slide No. 22
11
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
f
p( x) = f ( x0 ) + f ( x0 )( x x0 )
(Tangent line)
Approximation
Given by a
Newton Step f ( x0 )
f ( xi )
xi +1 = xi
f ( xi )
f (x )
x
x1
x0
Dr. Assakkaf
Slide No. 23
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
PROGRAM NEWTON
X0=-2.0
EPS=0.00001
C
C SUBROUTINE NEWT IS USED TO FIND A
C ROOT STARTING WITH THE INITIAL GUESS
C X0
CALL NEWT(X0,X,EPS)
STOP
END
Dr. Assakkaf
Slide No. 24
12
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
SUBROUTINE NEWT(X0,X,EPS)
C **************************************************************************
C * FUNCTION: THE SUBROUTINE APPROXIMATES THE ROOT
C* OF F(X)=0 GIVEN THE INITIAL POINT X0 AND
C* THE DERIVATIVE FUNCTION DF(X) USING THE
C* NEWTON METHOD
C * USAGE:
C* CALL SEQUENC: CALL NEWT(X0,X,EPS)
C* EXTERNAL FUNCTIONS/SUROUTINES:
C* FUNCTION F(X)
C* FUNCTION DF(X)
Dr. Assakkaf
Slide No. 25
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
C* PARAMETERS:
C* INPUT:
C* X0=INITIAL ROOT APPROXIMATION
C* EPS=ERROR BOUND
C* OUTPUT:
C* X=NEWTON APPROXIMATION OF THE ROOT
C ***********************************************************************
C **** INITIALIZATION ****
X=X0-(F(X0)/DF(X0))
C *** COMPUTE APPROXIMATE ROOT ITERATIVELY ***
Dr. Assakkaf
Slide No. 26
13
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 27
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 28
14
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
C
C FUNCTION DF(X) IS CALLED BY NEWT TO CALCULATE
C THE DERIVATIVE AT X
C
FUNCTION DF(X)
DF=3.0*X**2-6.0*X-1.0
RETURN
END
Dr. Assakkaf
Slide No. 29
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Area of a Circle
Demonstrating the use of Input and Output files
PROGRAM AREA_CIRCLE
DIMENSION DIA(10), AREA(10)
OPEN(5,FILE='TEST.DAT', STATUS='UNKNOWN')
OPEN(6,FILE='TEST.OUT', STATUS='UNKNOWN')
PI=22./7
DO 1 I=1,10
READ(5,*)DIA(I)
AREA(I)=PI*DIA(I)**2/4
WRITE(6,*)DIA(I),AREA(I)1
1 CONTINUE
END Dr. Assakkaf
Slide No. 30
15
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 31
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 32
16
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Numerical Analysis
The Trapezoidal Rule of Integration
xn
1 1
x1
f ( x )dx h f ( x0 ) + f ( x1 ) + ... + f ( xn 1 ) + f ( xn )
2 2
h = xi +1 xi
Dr. Assakkaf
Slide No. 33
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Numerical Analysis
The Trapezoidal Rule of Integration
f (x )
f ( xi ) f ( xi +1 ) h = xi +1 xi
x
x1 x2 xi xi +1
A B Dr. Assakkaf
Slide No. 34
17
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Numerical Analysis
Need for Trapezoidal Formula
Complex Integral that can not be evaluated
analytically
x cos( x 2 )
e x dx
Dr. Assakkaf
Slide No. 35
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Numerical Analysis
The Trapezoidal Rule of Integration
PROGRAM TRAPEZOID
A=0.0
B=10.0
N=10
CALL TRAP(A,B,N,EST)
WRITE(5,*)EST
END
Dr. Assakkaf
Slide No. 36
18
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
FORTRAN
Handout 4
Fortran Application Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 38
19
INTRODUCTION TO
ENGINEERING ECONOMICS
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
ENCE 202
Eng. Econ
Handout 6
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Definition of Engineering
Engineering is the profession in which
knowledge (math and natural sciences
gained by study, experience and practice)
is applied with judgment to develop ways
to utilize, economically, the materials and
forces of nature for the benefit of mankind.
Dr. Assakkaf
Slide No. 2
1
ENCE 202
Eng. Econ
Handout 6
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 3
ENCE 202
Eng. Econ
Handout 6
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Engineering Process
Determination of objectives
Identification of strategic factors
Determination of means (engineering
proposals)
Evaluation of engineering proposals
Assistance in decision making
Dr. Assakkaf
Slide No. 4
2
ENCE 202
Eng. Econ
Handout 6
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 5
ENCE 202
Eng. Econ
Handout 6
Introduction
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n EXAMPLES:
Infrastructure expenditure decision
Replace versus repair decisions
Selection of inspection method
Selection of a replacement for an
equipment
Dr. Assakkaf
Slide No. 6
3
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Utility
Utility is the power of a good or service to
satisfy human needs
Dr. Assakkaf
Slide No. 7
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Value
Value designate the worth that a person
attaches to an object or service
Value is a measure or appraisal of utility in
some medium of exchange.
Value is not the same as cost or price
Dr. Assakkaf
Slide No. 8
4
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
5
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Economy of Exchange
Economy of exchange occurs when utilities
are exchanged by two or more people.
It is possible because consumer utilities
are evaluated subjectively.
Mutual benefit in exchange
Persuasion in exchange. Salesperson
Dr. Assakkaf
Slide No. 11
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Economy of Organization
Through organizations, ends can be
attained or attained more economically by:
1. Labor saving
2. Efficiency in manufacturing or capital use
Dr. Assakkaf
Slide No. 12
6
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 13
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 14
7
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 15
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
8
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concept
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
9
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 19
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 20
10
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n The interest i
Interest is usually expressed as a
percentage of the amount owed
It is due and payable at the close of each
period of time involved in the agreed
transaction (usually every year or month).
Dr. Assakkaf
Slide No. 21
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n The interest i
EXAMPLE:
If $ 1,000.00 is borrowed at 14% interest, then
interest on the principal of $ 1,000.00 after one
year is 0.14 x 1, 000, or $140.00
Dr. Assakkaf
Slide No. 22
11
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n The interest i
EXAMPLE (contd):
If she does not pay back any of the amount
owed after one year, then normally the interest
owed, but not paid, is considered now to be
additional principal, and thus the interest is
compounded
After two years she will owe $1,140.00+0.14 X
1,140.00,or 1,299.60.
Dr. Assakkaf
Slide No. 23
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Equivalency
The banker in the previous example normally
does not care whether you pay him $1,140.00
after one year or $1,299.60 after two years. To
him, the three values ($1,000, $1,140, and
$1,299.60) are equivalent.
$ 1,000 today is equivalent to $1,140 one year
from today,
$ 1,000 today is equivalent to $1,299.60 two
years from today.
Dr. Assakkaf
Slide No. 24
12
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Equivalency
The banker in the previous example normally
does not care whether you pay him $1,140.00
after one year or $1,299.60 after two years. To
him, the three values ($1,000, $1,140, and
$1,299.60) are equivalent.
$ 1,000 today is equivalent to $1,140 one year
from today,
$ 1,000 today is equivalent to $1,299.60 two
years from today.
NOTE: The three values are not equal but equivalent Dr. Assakkaf
Slide No. 25
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Equivalency
It is to be noted that:
1.The concept of equivalence involves time and
a specified rate of interest. The three
preceding values are only equivalent for an
interest rate of 14%, and then only at the
specified times.
2.Equivalence means that one sum or series
differs from another only by the accumulated
interest at rate i for n periods of time.
Dr. Assakkaf
Slide No. 26
13
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F
0 1 2 3 4 5 6 n-1
n
Dr. Assakkaf
Slide No. 27
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 28
14
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
0
12.34 (1,400)
6,000
45,000
Dr. Assakkaf
Slide No. 29
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Financial Analysis
Single payment
Uniform series of payments
Discounted present worth analysis
Rate of return analysis
Dr. Assakkaf
Slide No. 30
15
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 31
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
16
ENCE 202
Fundamental Economic
Eng. Econ
Handout 6
Concepts
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 33
17
INTRODUCTION TO
ENGINEERING ECONOMICS
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
ENCE 202
Eng. Econ
Handout 7
Types of Interest
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Simple Interest
I = Pni
P = principal $1,000
i = interest rate 0.12
n = number of years or periods 1
I= interest $120.00
1
ENCE 202
Eng. Econ
Handout 7
Types of Interest
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 3
ENCE 202
Eng. Econ
Handout 7
Type of Interest
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
P = principal $ ,
i = interest rate .
n = number of years or periods
Year Amount at start of year Interest at year end Owed amount at year end Payment
$ , . $ . $ , . $ .
$ , . $ . $ , . $ .
$ , . $ . $ , . $ .
$ , . $ . $ , . $ .
$ , . $ . $ , . $ , .
Dr. Assakkaf
Slide No. 4
2
ENCE 202
Eng. Econ
Handout 7
Types of Interest
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 5
ENCE 202
Eng. Econ
Handout 7
Types of Interest
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
i = interest rate .
n = number of years or periods
Year Amount at start of year Interest at year end Owed amount at year end Payment
$ , . $ . $ , . $ .
$ , . $ . $ , . $ .
$ , . $ . $ , . $ .
$ , . $ . $ , . $ .
$ , . $ . $ , . $ , .
Dr. Assakkaf
Slide No. 6
3
ENCE 202
Eng. Econ
Handout 7
Cash Flow
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Eng. Econ
Handout 7
Cash Flow
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F
A A A A A A A A
0 1 2 3 4 5 6 n-1
n
Dr. Assakkaf
Slide No. 8
4
ENCE 202
Eng. Econ
Handout 7
Notations
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F = P(1 + i )
n
OR
F
F = , i, n
P
Dr. Assakkaf
Slide No. 10
5
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
Let the principle P = 1000, the interest rate
i = 12%, and the number of periods n = 4
years.
The future sum is therefore
Dr. Assakkaf
Slide No. 11
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
P
P = , i, n
F
Dr. Assakkaf
Slide No. 12
6
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 1:
Let the principle F = 1000, the interest rate
i = 12%, and the number of periods n = 4
years.
The present worth is therefore
F 1000
P= = = 635.5
(1 + i ) (1 + 0.12)4
n
Dr. Assakkaf
Slide No. 13
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 2:
Let the principle F = 1,573.5, the interest
rate i = 12%, and the number of periods n
= 4 years.
The present worth is therefore
F 1,573.5
P= = = 1000.0
(1 + i ) (1 + 0.12)4
n
Dr. Assakkaf
Slide No. 14
7
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F
F = , i, n
A
Dr. Assakkaf
Slide No. 15
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
Let A = 100, the interest rate i = 12%, and
the number of periods n = 4 years.
The future value is therefore
(1 + i ) n 1 (1 + 0.12) 4 1
F = A = 100 = 477.9
i 0 .12
Dr. Assakkaf
Slide No. 16
8
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
A
A = , i, n
F
Dr. Assakkaf
Slide No. 17
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
Let the future value F = 1000, the interest
rate i = 12%, and the number of periods n
= 4 years.
Therefore
i 0.12
A = F = 1000 = 209.2
(1 + i ) n
1 (1 + 0. 12 )4
1
Dr. Assakkaf
Slide No. 18
9
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
A
A = , i, n
P
NOTE: This is the case of loans (mortgages)
Dr. Assakkaf
Slide No. 19
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
Let the present worth P = 1000, the interest
rate i = 12%, and the number of periods n
= 4 years.
Therefore
i (1 + i )n 0.12(1 + 0.12 )4
A = P = 1000
(1 + 0.12)4 1 = 329.2
(1 + i ) n
1
Dr. Assakkaf
Slide No. 20
10
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
Let A = 100, the interest rate i = 12%, and
the number of periods n = 4 years.
Therefore
(1 + i )n 1 (1 + 0.12 )4 1
P = A = 100
n
0.12(1 + 0.12)4 = 303.7
i (1 + i )
Dr. Assakkaf
Slide No. 22
11
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
1 n
P = G
i (1 + i ) 1
n
Dr. Assakkaf
Slide No. 23
ENCE 202
Eng. Econ
Handout 7
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
Let G = 100, the interest rate i = 12%, and
the number of periods n = 4 years.
Therefore
1 n 1 4
A = G
= 100
0.12 (1 + 0.12 )4 1 = 135.9
i (1 + i ) n
1
Dr. Assakkaf
Slide No. 24
12
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example:
Effective rate is 1% per month
Therefore
Nominal Rate = 1% (12) = 12% compounded
monthly
Dr. Assakkaf
Slide No. 26
13
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 27
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
14
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
15
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Continuous Compounding
The limiting case for the effective rate is when
compounding is performed an infinite times in a
year, that is continuously. Using l = 1, the
following limit produces the continuously
compounded interest rate ( ia):
m
r
ia = Lim1 + 1 = e r 1
m
m
Dr. Assakkaf
Slide No. 31
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 1
If the nominal rate of 12% is compounded
monthly with time interval of one year, then
c =12, and
12
012
i = 1 + 1 = 0.1268 or 12.68% per year
12
Dr. Assakkaf
Slide No. 32
16
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 2
If the nominal rate of 18% is compounded
weekly with time interval of one year, then
c =52, and
52
018
i = 1 + 1 = 0.1968 or 19.68% per year
52
Dr. Assakkaf
Slide No. 33
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 3
If the nominal rate of 14% is compounded
monthly with time interval of six months, then
c =6, and
6
014
i = 1 + 1 = 0.0721 or 7.21% per six months
12
Dr. Assakkaf
Slide No. 34
17
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 4
If the nominal rate of 9% is compounded
semiannually with time interval of two years,
then
c =4, and
4
0.09
i = 1 + 1 = 0.1925 or 19.25% per two years
2
Dr. Assakkaf
Slide No. 35
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 5
The effective interest rates corresponding to a
nominal annual interest rate of 18%
compounded annually, semiannually, quarterly,
monthly, weekly, daily, and continuously are
shown in the following Table:
Dr. Assakkaf
Slide No. 36
18
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example 5 (contd)
Compounding Number of periods Effective interest rate Effective annual interest
frequency per year per period rate
Column 1 Column 2 Col. 3 = 18%/Col 2 . Col .2
018
i = 1 + 1
Col .2
Annually 1 18% 18%
Semiannually 2 9 18.81
Quarterly 4 4.5 19.2517
Monthly 12 1.5 19.5618
Weekly 52 0.3642 19.6843
Daily 365 0.0493 19.7412
Continuously 0.00000 19.7217 = exp(0.18) - 1
Dr. Assakkaf
Slide No. 37
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 38
19
ENCE 202
Discrete and Continuous
Eng. Econ
Handout 7
Compounding
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Eng. Econ
Handout 7
Use of Interest Tables
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 40
20
ENCE 202
Eng. Econ
Handout 7
Dr. Assakkaf
Slide No. 41
ENCE 202
Eng. Econ
Handout 7
Use of Interest Tables
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example
Let A = 300, the interest rate i = 20%, and
the number of periods n = 5 years.
Using the table, then
P P
P = , i, n = ,20,5 = 300(2.9906) = 897.2
A A
F F
F = , i, n = ,20,5 = 300(7.4416) = 2,232.5
A A
Dr. Assakkaf
Slide No. 42
21
INTRODUCTION TO
ENGINEERING ECONOMICS
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
ENCE 202
The Time Value of Money
Eng. Econ
Handout 8
(TVM)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 2
1
ENCE 202
Eng. Econ
Handout 8
The Interest (i)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Example:
If $ 1,000.00 is borrowed at 14% interest, then interest on the principal
of $ 1,000.00 after one year is 0. 14 x 1, 000, or $140.00.
If the borrower pays back the total amount owed after one year, she will
pay $1,140.00.
If she does not pay back any of the amount owed after one year, then
normally the interest owed, but not paid, is considered now to be
additional principal, and thus the interest is compounded.
ENCE 202
Eng. Econ
Handout 8
Equivalency
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
The banker normally does not care whether you pay him $1,140.00 after
one year or $1,299.60 after two years. To him, the three values ($1,000,
$1,140, and $1,299.60) are equivalent.
$ 1,000 today is equivalent to $1,140 one year from today,
$ 1,000 today is equivalent to $1,299.60 two years from today.
Dr. Assakkaf
Slide No. 4
2
ENCE 202
Financial Engineering
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Single payment
Uniform series of payments
Discounted present worth analysis
Rate of return analysis
Dr. Assakkaf
Slide No. 5
ENCE 202
Eng. Econ
Handout 8
Cash Flow
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
3
ENCE 202
Eng. Econ
Handout 8
Cash Flow
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F
A A A A A A A A
0 1 2 3 4 5 6 n-1
n
Dr. Assakkaf
Slide No. 7
ENCE 202
Eng. Econ
Handout 8
Notations
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
4
ENCE 202
Eng. Econ
Handout 8
Single Payment
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F = P(1 + i )
n
OR
F
F= , i, n
P
Dr. Assakkaf
Slide No. 9
ENCE 202
Eng. Econ
Handout 8
Single Payment
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
P
P= , i, n
F
Dr. Assakkaf
Slide No. 10
5
ENCE 202
Eng. Econ
Handout 8
Single Payment Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F = P(1 + i)n
Dr. Assakkaf
Slide No. 11
ENCE 202
Eng. Econ
Handout 8
Single Payment Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Note:
F is related to P by a factor which depends only on i and n.
This factor, termed the single payment compound amount
factor (SPCAF), makes F equivalent to P.
SPCAF may be expressed in a functional form:
F F
(1 + i ) n = , i, n or F = P , i, n
P P
F P
P= or P = F , i, n
(1 + i ) n F
Dr. Assakkaf
Slide No. 12
6
ENCE 202
Eng. Econ
Handout 8
Single Payment Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Note:
The factor 1/(1+i)n is called the present worth compound
amount factor (PWCAF)
1 P
n
= , i, n
(1 + i ) F
Dr. Assakkaf
Slide No. 13
ENCE 202
Eng. Econ
Handout 8
Example 1: Single Payment
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
If she pays back the loan and accumulated interest after 8 months,
how much will she have to pay back?
7
ENCE 202
Eng. Econ
Handout 8
Example 2: Single Payment
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
To solve this problem you can also use the interest tables.
ENCE 202
Uniform Series of Payments
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F
F= , i, n
A
Dr. Assakkaf
Slide No. 16
8
ENCE 202
Uniform Series of Payments
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
A
A= , i, n
F
Dr. Assakkaf
Slide No. 17
ENCE 202
Eng. Econ
Handout 8
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
A
A= , i, n
P
NOTE: This is the case of loans (mortgages)
Dr. Assakkaf
Slide No. 18
9
ENCE 202
Eng. Econ
Handout 8
Interest Formulas
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 19
ENCE 202
Uniform Series of Payments
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Often payments or receipts occur at regular intervals, and such
uniform values can be handled by the use of additional functions.
Another symbol:
A = uniform end-of-period payments or receipts continuing for
a duration of n periods
If a uniform amount A is invested at the end of each period for n
periods at a rate of interest i per period, then the total equivalent
amount F at the end of the n periods will be:
F = A[(1 + i ) (1 + i )n 2 + .... + (1 + i ) + 1]
n1
+
Fi = A(1 + i ) 1
n
Dr. Assakkaf
Slide No. 20
10
ENCE 202
Uniform Series of Payments
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
[(1+i)n - 1]/i is called the uniform series compound amount factor (USCAF)
It can also be shown that
i
A = F
(1 + i ) 1
n
Dr. Assakkaf
Slide No. 21
ENCE 202
Uniform Series of Payments
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
[(1+i)n - 1]/i is called the uniform series compound amount factor (USCAF)
It can also be shown that
i
A = F
(1 + i ) 1
n
Dr. Assakkaf
Slide No. 22
11
ENCE 202
Uniform Series of Payments
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
A
A = F , i, n
F
The relationship i / [(1+i)n - 1]is termed as the uniform series sinking fund factor
(USSFF)
F = P (1 + i )
n
Recall that
Hence
(1 + i)
1
n
P
P = A n
or P = A , i, n
i (1 + i ) A
Dr. Assakkaf
Slide No. 23
ENCE 202
Uniform Series of Payments
Eng. Econ
Handout 8
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
i (1 + i )
n
(USPWF)
Also
i (1 + i )
n
A
A = P or A = P , i, n
(1 + i ) 1
n
P
The relationship i(1 + i ) is called the uniform series capital recovery factor
n
n
(USCRF) (1 + i ) 1
Dr. Assakkaf
Slide No. 24
12
ENCE 202
Cash Flow Diagram for Single
Eng. Econ
Handout 8
Payment
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F
0 1 2 3 4 5 6 n-1
n
1
F = P (1 + i ) or P = F
n
n
P (1 + i )
Dr. Assakkaf
Slide No. 25
ENCE 202
Cash Flow Diagram for Single
Eng. Econ
Handout 8
Payment
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
F
A A A A A A A A
0 1 2 3 4 5 6 n-1
n
(1 + i ) 1
n
i
F = A or A = F
(1 + i ) 1
n
i
Dr. Assakkaf
Slide No. 26
13
ENCE 202
Cash Flow Diagram for Single
Eng. Econ
Handout 8
Payment
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
A A A A A A A A
0 1 2 3 4 5 6 n-1
n
(1 + i ) 1 i (1 + i )
n n
P = A n
or A = P
i (1 + i ) (1 + i ) 1
n
P
Dr. Assakkaf
Slide No. 27
ENCE 202
Eng. Econ
Handout 8
Example 3
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
14
ENCE 202
Eng. Econ
Handout 8
Example 3 (continued)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
0 1 2 3 4 5 6
12.34 (1,400)
3,200 3,200
6,000
45,000
n = 8,400/1,400 = 6 yrs,
nT = 2800/1400 = 2 yrs,
nR= 4200/1400 = 3yrs
Dr. Assakkaf
Slide No. 29
ENCE 202
Eng. Econ
Handout 8
Example 3 (continued)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
(1 + i )n 1 P
1
n
=
P
, i, n
P = A n
or P = A , i, n (1 + i ) F
i (1 + i ) A Dr. Assakkaf
Slide No. 30
15
ENCE 202
Eng. Econ
Handout 8
Example 3 (continued)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 31
16
INTRODUCTION TO
ENGINEERING ECONOMICS
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
ENCE 202
Economic Analysis of
Eng. Econ
Handout 9
Alternatives
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 2
1
ENCE 202
Economic Analysis of
Eng. Econ
Handout 9
Alternatives
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Present-Worth Amount
It is the difference between the equivalent
receipts and disbursements at the present.
Assume Ft is a cash flow at time t, the
present worth (PW) is
n n
PW (i ) = Ft ( P / F , i, t ) = Ft (1 + i) t
t =0 t =0
Dr. Assakkaf
Slide No. 3
ENCE 202
Economic Analysis of
Eng. Econ
Handout 9
Alternatives
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n
i(1 + i) n
AE (i ) = PW (i)( A / P, i, n) = Ft (1 + i ) t n
t= 0 (1 + i ) 1
Dr. Assakkaf
Slide No. 4
2
ENCE 202
Eng. Econ
Handout 9
Example 1
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 5
ENCE 202
Discounted Present Worth
Eng. Econ
Handout 9
Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Definition:
The present worth is discounted at a predetermined rate of interest
called the minimum attractive rate of return (MARR or i*).
The MARR is usually equal to the current rate of interest for
borrowed capital plus an additional rate for such factors as risk,
uncertainty, and contingencies.
MARR = i* = i + i(risk)
Dr. Assakkaf
Slide No. 6
3
ENCE 202
Eng. Econ
Handout 9
Example 2
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Note: All alternatives involve equal lives. Slide No. 7
ENCE 202
Eng. Econ
Handout 9
Example 2 (continued)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
7,200
0 4
B
NPWB = -2,250 - 2,250(P/A),15,3) = -$7,387
4
0
C NPWC = -750 - 2,700(P/A),15,4)+1,200(P/A),15,4) = -$7,772
750
4
ENCE 202
Eng. Econ
Handout 9
Example 3
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
ENCE 202
Eng. Econ
Handout 9
Example 3 (continued)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
(a)
MARR = 12%
NACAT = 378,000 (A/P,12,5) = $104,861 / yr
NACMT = 494,000 (A/P,12,8) = $99,444 / yr
Choose Macho-Turf (Lower cost)
(b)
MARR = 20%
NACAT = 378,000 (A/P,20,5) = $126,396 / yr
NACMT = 494,000 (A/P,20,8) = $128,741 / yr
Choose Astro-Turf (Lower cost)
Dr. Assakkaf
Slide No. 10
5
ENCE 202
What to do When Alternatives
Eng. Econ
Handout 9
Involve Different Lives
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Approach 1.
Truncate (cut off) the longer-lived alternative(s) to equal the
shorter lived alternative and assume a salvage value for the
unused portion of the longer lived alternatives. Then make
the comparison on the basis of equal lives.
Approach 2.
Assume equal replacement conditions (costs and incomes)
for each alternative and compute the discounted present
worth on the basis of the least common multiple of lives for
all alternatives.
Dr. Assakkaf
Slide No. 11
ENCE 202
Eng. Econ
Handout 9
Example 4
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
6
ENCE 202
Eng. Econ
Example 4 (continued)
Handout 9
Approach 1. (comparison on the basis of equal lives)
73,750 30,000
12,000 12,000 12,000 26,000 26,000
Old New 26,000
tractor tractor
0 3 0 3
24,680 73,570
ENCE 202
Eng. Econ
Example 4 (continued)
Handout 9
Approach 2. (comparison on the basis of equal replacement conditions)
73,570
24,680 24,680
7
ENCE 202
Eng. Econ
Handout 9
Rate of Return (ROR) Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Definition:
The rate of return of a proposed investment is that interest
rate which makes the discounted present worth of the
investment equal to zero.
Dr. Assakkaf
Slide No. 15
ENCE 202
Eng. Econ
Handout 9
Example 5
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
8
ENCE 202
Eng. Econ
Example 5 (continued)
Handout 9
Approach 1. (comparison on the basis of equal lives)
P
24,680 NPWold = 24,680 + 12,000 , i,3 = 0
A
P 24,680 (1 + i ) 1 3
, i,3 = = 2.05667 =
i(1 + i )
3
A 12,000
iold = 21.5%
Dr. Assakkaf
Slide No. 17
ENCE 202
Eng. Econ
Example 5 (continued)
Handout 9 Iterative Solution
P
NPW new = 73,570 + 26,000 , i, 6 = 0
A
P 73,570 (1 + i ) 1 6
(1 + i )6 1
, i ,6 = = 2.82962 = inew =
i(1 + i ) 2.82962(1 + i )
6 6
A 26,000
P
NPW new = 24,680 + 12,000 , i,3 = 0
A
P 24,680 (1 + i ) 1 3
(1 + i )3 1
, i ,6 = = 2.05667 = iold =
i (1 + i ) 2.05667(1 + i )
3 3
A 12,000
Dr. Assakkaf
Slide No. 18
9
ENCE 202
Eng. Econ
Example 5 (continued)
Handout 9 Iterative Solution
ENCE 202
Eng. Econ
Handout 9
Example 5 (continued)
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n If MARR is 20%
Dr. Assakkaf
Slide No. 20
10
ENCE 202
Eng. Econ
Handout 9
Rate of Return (ROR) Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
iold = 21.5%
inew = 18.9%
Before the decision can be reached
YOU MUST KNOW YOUR MARR.
If MARR = 20% and 3 year analysis period, we choose old tractor.
If MARR = 30%, we choose neither tractor - do nothing alternative.
If the MARR was 15%, which alternative should we select then?
Dr. Assakkaf
Slide No. 21
ENCE 202
Eng. Econ
Handout 9
Rate of Return (ROR) Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Shouldn't the alternative with the higher rate of return would yield
the higher NPW regardless of the assumed interest rate?
NO IT SHOULD NOT!
The initial investments in the tractor examples we used are not theDr. Assakkaf
same. Slide No. 22
11
ENCE 202
Incremental Rate of Return
Eng. Econ
Handout 9
(ROR) Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 23
ENCE 202
Incremental Rate of Return
Eng. Econ
Handout 9
(ROR) Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
8,000
26,000 26,000 26,000 26,000 26,000
26,000
New
tractor 0
6
73,570
24,680 24,680
Dr. Assakkaf
Slide No. 24
12
ENCE 202
Incremental Rate of Return
Eng. Econ
Handout 9
(ROR) Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
i = 30.9%
24,680
8,000
14,000
0 6
48,890
Dr. Assakkaf
Slide No. 25
ENCE 202
Incremental Rate of Return
Eng. Econ
Handout 9
(ROR) Analysis
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n While the initial investment of $24,680 for the old tractor will yield a
ROR of 21.5%, the incremental increase in initial investment of
$48,890 (by purchasing the new tractor) will yield an IROR of
30.9%.
n Now that all the rates of return are known, a decision can be
reached which is dependent on the MARR.
For a MARR of 20% the ROR of the new tractor is too low, and
therefore the old tractor is chosen.
For a MARR of 15% both alternatives exceed it and we have to examine
the IROR.
In this case the IROR is higher than the MARR, so we should choose
the new tractor.
Dr. Assakkaf
Slide No. 26
13
INTRODUCTION TO
ENGINEERING ECONOMICS
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
by
ENCE 202
Economic Equivalence
Eng. Econ
Handout 10
Involving Inflation
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 2
1
ENCE 202
Economic Equivalence
Eng. Econ
Handout 10
Involving Inflation
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
CPI t + 1 CPI t
annual inflation rate at t+1 =
CPI t
Dr. Assakkaf
Slide No. 3
ENCE 202
Economic Equivalence
Eng. Econ
Handout 10
Involving Inflation
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
CPI t (1 + f ) n = CPI t + n
Or
CPI t + n
f =n 1
CPI t
Dr. Assakkaf
Slide No. 4
2
ENCE 202
Economic Equivalence
Eng. Econ
Handout 10
Involving Inflation
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
n Example
1 / 14
246.80 246.80
f = 14 1 = 1 = 6.882%
97.2 97.2
Dr. Assakkaf
Slide No. 5
ENCE 202
Economic Equivalence
Eng. Econ
Handout 10
Involving Inflation
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 6
3
ENCE 202
Economic Equivalence
Eng. Econ
Handout 10
Involving Inflation
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Therefore, 1
(1 + f ) n =
(1 k ) n
This equation relates the average f and k.
Dr. Assakkaf
Slide No. 7
ENCE 202
Depreciation and Depreciation
Eng. Econ
Handout 10
Accounting
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 8
4
ENCE 202
Eng. Econ
Handout 10
Depreciation Accounting
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 9
ENCE 202
Eng. Econ
Handout 10
Depreciation Accounting
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 10
5
ENCE 202
Depreciation Calculation
Eng. Econ
Handout 10
Methods
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 11
ENCE 202
Eng. Econ
Handout 10
Straight-line (SL) Method
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 12
6
ENCE 202
Eng. Econ
Handout 10
Example 1
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
A piece of equipment is available for purchase for $12,000, has an estimated useful
life of 5 years, and has an estimated salvage value of $2,000. Determine the
depreciation and the book value for each of the 5 years using the SL method.
Rm = 1/5 = 0.2
Dm= 0.2(12,000 - 2,000) = $2,000 per year
The table of values is: BV2 = 12,000 2( 2,000) = $8,000
m BVm-1 Dm BVm
0 $0 $0 $12,000
1 12,000 2,000 10,000
2 10,000 2,000 8,000
3 8,000 2,000 6,000
4 6,000 2,000 4,000
5 4,000 2,000 2,000
If the equipment is expected to be used about 1,400 hours per year then its
estimated hourly depreciation portion of the ownership cost is
Dr. Assakkaf
$2,000/1,400 = $1.428 = $1.43 per hour Slide No. 13
ENCE 202
Eng. Econ
Handout 10
Sum-of-the-years (SOY) Method
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
7
ENCE 202
Eng. Econ
Handout 10
Example 2
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Using the same values as given in Example 1, calculate the allowable depreciation
and the book value for each of the 5 years using the SOY method.
Year Rm Dm BVm
0 $ 0 $12,000
1 5/15 3,333 8,667
2 4/15 2,667 6,000
3 3/15 2,000 4,000
4 2/15 1,333 2,667
5 1/15 667 2,000
Dr. Assakkaf
Slide No. 15
ENCE 202
Eng. Econ
Handout 10
Declining-balance (DB) Method
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
Dr. Assakkaf
Slide No. 16
8
ENCE 202
Eng. Econ
Handout 10
Declining-balance (DB) Method
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
2. The allowable depreciation Dm, for any year m and any depreciation rate R is
ENCE 202
Eng. Econ
Handout 10
Example 3
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
R = 2.0/5 = 0.4
Dm = 0.4(BVm-1)
BVm = BVm-1 - Dm
Year Dm BVm
0 0 12,000
1 0.4x12,000 = 4,800 7,200
2 0.4x7,200 = 2,880 4,320
3 0.4x4,320 = 1,728 2,592
4 0.4x2,592 = 592 2,000
5 0 2,000
Dr. Assakkaf
Slide No. 18
9
ENCE 202
Depreciation Curves for the
Eng. Econ
Handout 10
Examples
A. J. Clark School of Engineering Department of Civil and Environmental Engineering
12,000
SL - Straight-line depreciation method
SOY - Sum-of-the-Years depreciation method
DDB - Double-Declining-Balance depreciation method
10,000
Book value, $
8,000
SL
6,000 SOY
DDB
4,000
F = $2,000
2,000
0 1 2 3 4 5
Time, years
Dr. Assakkaf
Slide No. 19
ENCE 202
Eng. Econ
Handout 10
Dr. Assakkaf
Slide No. 20
10