0% found this document useful (0 votes)
42 views

ARE - 510 - 6 - Programming and Languages

This document summarizes a presentation on computer utilization in architectural engineering. It discusses programming and languages. Programming involves problem solving through analysis, algorithms, and coding instructions in a programming language. High-level languages are closer to English while low-level languages relate to computer architecture. The six steps of programming are: 1) specification, 2) design, 3) coding, 4) testing, 5) documentation, and 6) maintenance. Program design involves determining inputs/outputs, using top-down design, pseudocode, flowcharts, and logic structures. An algorithm outlines the order of computer actions. Coding writes the program instructions using a programming language syntax.

Uploaded by

khalid
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

ARE - 510 - 6 - Programming and Languages

This document summarizes a presentation on computer utilization in architectural engineering. It discusses programming and languages. Programming involves problem solving through analysis, algorithms, and coding instructions in a programming language. High-level languages are closer to English while low-level languages relate to computer architecture. The six steps of programming are: 1) specification, 2) design, 3) coding, 4) testing, 5) documentation, and 6) maintenance. Program design involves determining inputs/outputs, using top-down design, pseudocode, flowcharts, and logic structures. An algorithm outlines the order of computer actions. Coding writes the program instructions using a programming language syntax.

Uploaded by

khalid
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Computer Utilization in

Architectural Engineering

ARE 510
Dpt. of Architectural Engineering
College of Environmental Design
KFUPM

D. Ouis
1st semester 2022

Presented By:
Khalid Abdullah Khan
Programming and Languages
Programs and Programming
What exactly is programming?
Many people think of it as simply typing words into a
computer.

It is partly, but mainly it is a problem-solving procedure.

What Is a Program?
A program is a list of instructions for the computer to follow
to accomplish the task of processing data into information.
Programming

It is a process that leads from an original formulation of a


computing problem to executable computer programs.
It involves: analysis, developing understanding,
generating algorithms, verification of requirements of
algorithms, and implementation (coding) of algorithms in a
target programming language.
It may even include: testing, debugging, and maintaining
the source code (collection of computer instructions), which
may be considered as part of the software development
process.
Programming Languages

High-level languages
High-level programming languages use syntax that is similar to the English
language. These languages are considered ‘higher’ because they are closer to
human language and therefore easier to understand by programmers. Some of
the most well-known high-level languages include C, C++, Java, and Python.
These languages are used to develop web, desktop, and mobile applications.

Low-level languages
Low-level programming languages are used to write programs that relate
specifically to the architecture and hardware of a computer. These
languages can be broken down into two categories: machine language
and assembly language.
Programming Languages
It’s hard to provide a definitive answer to this question, so we’ve put together
these resources and their respective coding language lists. The lists vary
significantly in size, demonstrating now only how many programming languages
are in existence, but more importantly, how many of them are relevant
Programming Languages
Programming Languages
Programming

Programming, (or software


development) is a
six-step procedure:

1. Program specification:
Determine the program’s
objectives, outputs, inputs,
and processing requirements. are determined.
Programming

2. Program design: A solution is created


using programming techniques such as
top-down program design, pseudocode,
flowcharts, and logic structures.

3. Program code: The program is


written, or coded, using a programming
language.

4. Program test: The program is tested


or debugged by looking for syntax and logic errors.
Programming

5. Program documentation: Documentation is an ongoing


process throughout the programming
process. This phase focuses on
formalizing the written description and
processes used in the program.

6. Program maintenance: Completed


programs are periodically reviewed to
evaluate their accuracy, efficiency,
standardization, and ease of use.
Changes are made to the program’s code as needed.
Step 1: Program Specification

Also called program definition or program analysis.

5 items:
(1) the program’s objectives, (2) the desired output, (3) the
input data required, (4) the processing requirements, and (5)
the documentation.
Step 1: Program Specification

(1) Program’s objectives: what is the problem to be solved?


(2) Desired output: what to get from your PC (picture of
output).
(3) The input data required: the necessary information
needed by the PC.
(4) The processing requirements: the kind of operations.
(5) The documentation: record all the above for later use.
Step 2: Program Design
(1) First determine the outputs and
inputs for the program. Then use
top-down steps: program
modules, each being made
up of logically related program statements

(2) Pseudocode: outline of the logic,


or a kind of summary of the
program to be written.
Step 2: Program Design

(3) Flowcharts: graphical presentation


of the sequence of steps needed to solve
a programming problem.

(4) Logic Structures


How do you link the various parts of the flowchart?
Combination of 3 logic structures:
Concatenation: one program statement follows another.
Selection: decision must be made; IF-THEN-ELSE.
Repetition, or loop: repeat; do-untill, do while.
Step 2: Program Design
Elements of a Program

All programming languages have certain features in


common. For example:
 Variables
 Commands/Syntax (the way commands are
structured)
 Loops
 Decisions
 Functions

Each programming language has a different set of rules


about these features.
Step 2: Program Design
Elements of a Program

ACTIVITY
Create a set of instructions that
will tell us:

How to eat a banana


Make your instructions as detailed
as possible, so that even
someone who has never eaten a
banana before can understand
them.
Step 2: Program Design
Elements of a Program
How to eat a banana
A detailed list of instructions
1. Using your hand, get a yellow crescent-shaped fruit
called a “banana”
2. Peel the outer skin off the banana (by breaking off
the outer stem and peeling back the yellow peel)
3. Eat the banana
1. Put a small section of banana in your mouth
2. Bite down on the banana
3. Chew the banana by opening and closing your mouth
4. Once the banana has been chewed, swallow the banana
5. Repeat until banana is finished
4. Throw out the used banana peel
Step 2: Program Design
Elements of a Program

A procedure that outlines:


what actions you want the computer to perform
and the order in which they happen is called an
ALGORITHM.

An ALGORITHM is basically an outline for how your


computer program will work.
Step 2: Program Design
Elements of a Program

• The ORDER in which actions are performed is also very


important.
• Consider the following 2 algorithms that tell Mr. John how
to get ready in the morning.

Let’s call them the “Rise-and-Shine Algorithms”


Step 2: Program Design
Elements of a Program

RISE AND SHINE 1 RISE AND SHINE 2


• Get out of bed • Get out of bed
• Take off pyjamas • Take off pyjamas
• Take a shower • Get dressed
• Get dressed • Take a shower
• Eat breakfast • Eat breakfast
• Drive to school • Drive to school

RESULT RESULT
Mr. John arrives in a great Mr. John arrives in not too
mood ready to teach  great a mood since he’s
soaking wet 
Step 2: Program Design
Elements of a Program

RISE AND SHINE 1 RISE AND SHINE 2


• Get out of bed • Get out of bed
• Take off pyjamas • Take off pyjamas
• Take a shower • Get dressed
• Get dressed • Take a shower
• Eat breakfast • Eat breakfast
• Drive to school • Drive to school

RESULT RESULT
Mr. John arrives in a great Mr. John arrives in not too
mood ready to teach  great a mood since he’s
soaking wet 
Step 3: Program Code

Writing the program is called coding. It instructs the


computer what to do, i.e. a series of instructions to a
computer to accomplish a task.
Instructions must be written in a way the computer can
understand.
Good way for efficiency: write s.c. structured programs.
Coding
Is accomplished using the appropriate computer language.
E.g. A content-markup language uses symbols, words, and
phrases that instruct a computer how to structure information
for display or processing. Ex: HTML for making web pages.
Step 3: Program Code
A programming language uses a collection of symbols,
words, and phrases that instruct a computer to perform
specific operations.

I know Algol, Basic, Fortran, ….


…and the name of 10 other programming languages.
Let’s Define a Simple Engineering Problem

Load
Let’s Define a Simple Engineering Problem

Problem Definition
• Power Balance between Demand and Generation
• Lines Losses
• Voltage Regulations

Objective Definition Parameters


• Optimal power flow Voltage magnitude, Voltage
angle, active power, and
• Optimization constraints:
reactive power
• Ramp-up/down
• Capacities
• Generation Cost

Output
• Uninterruptible power supply
• Security & reliability
Let’s Define a Simple Engineering Problem

G1

L1

G9 Load

Ln Time varying
Source: https://xiongpengnus.github.io/rsome/example_ucp
Thank you for listening....

The rest of the presentation will be done by Mr.


Zakarriya

You might also like