COMP1531
🐶Software Engineering
8.1 - Design - System Modelling
Author: Hayden Smith 2021
In this lecture
Why?
- A critical element of software design is to be able to translate complex system ideas into something high level and understandable
What?
- Conceptual Model
- State Diagrams
What's a model?
Conceptual Modelling
- A model is an attempt to represent a more complex system
- A conceptual model captures a system in a conceptual way
- High level abstraction
- Tends to be diagramatic or visual
Conceptual models software engineers care about
- Data models
- Mathematical models
- Domain models
- Data flow models
- State transition models (today)
How models are used
- To predict future states of affairs.
- Understand the current state of affairs.
- Determine the past state of affairs.
- To convey the fundamental principles and basic functionality of systems (communication)
Communicating models
-
Four fundamental objectives of communicating with a conceptual model:
- Enhance an individual's understanding of the representative system
- Facilitate efficient conveyance of system details between stakeholders
- Provide a point of reference for system designers to extract system specifications
- Document the system for future reference and provide a means for collaboration
Conceptual Models
-
Structural – Emphasise the static structure of the system
- UML class diagrams (object oriented programming)
- ER diagrams (database design)
- ... many others
-
Behavioural - Emphasise the dynamic behaviour
- State diagrams (state machines)
- Use case diagram (user flows)
- ... some others
We will discuss some of these, and explore state diagrams in detail.
State Diagrams
- State machines made up of a finite number of states.
- The machine can be transitioned from one state to another through an action
- Simple example: a door
State diagrams
- A diagrammatic representation of a state.
- Some variation in notation.
- Typically: states are circles, transitions are labelled arrows connecting them
State machines
-
Useful for modelling systems that have clearly defined states. For example:
- UIs with different screens
- Network protocols
- Conversational interfaces
Parking meter
Parking meter
Opal Card
- Can we model the opal card system as a state machine?
For fun: A complex conceptual model
- In 2015 a UNSW student wrote a conceptual model "Gallium" based off of previous research to represent the energy usage of a solar car as it drove from Darwin to Adelaide
- The model was written in python and modeled the physical system of the vehicle and it's energy consumption over a fixed distance in response to a dynamic environmental and physical characteristics
The model calculated the energy usage across a number of fixed-distance intervals (e.g. a 200 metre stretch of road) over a 3000km journey across Australia.
Wind Speed
Wind Direction
Solar Output
Cloud cover
Elevation
Speed of vehicle
Orientation of vehicle
Weight of vehicle
Power usage across intervals
Energy usage
For each of ~10,000 interval
Feedback
COMP1531 21T3 - 8.1 - System Modelling
By haydensmith
COMP1531 21T3 - 8.1 - System Modelling
- 1,641