Professional Documents
Culture Documents
Use Case Specification
Use Case Specification
SIMULATION OF A BICYCLE
USE CASE AND SPECIFICATION
SEAN ROBINSON
CONTENTS
1.
2.
3.
4.
5.
2.1.
Description ............................................................................................................................................ 3
2.2.
Actors .................................................................................................................................................... 3
2.3.
Preconditions ........................................................................................................................................ 3
2.4.
2.5.
2.6.
Description ............................................................................................................................................ 4
3.2.
Actors .................................................................................................................................................... 5
3.3.
Preconditions ........................................................................................................................................ 5
3.4.
3.5.
3.6.
Description ............................................................................................................................................ 5
4.2.
Actors .................................................................................................................................................... 5
4.3.
Preconditions ........................................................................................................................................ 5
4.4.
4.5.
4.6.
Description ............................................................................................................................................ 6
5.2.
Actors .................................................................................................................................................... 6
5.3.
Preconditions ........................................................................................................................................ 6
5.4.
5.5.
5.6.
Page 2 of 6
DESCRIPTION
The core functionality of this solution is whereby the user tells the system to derive a new physical state for
the simulation based on current factors. This sets off a linear chain of events where individual values are
calculated by relevant specialised classes. These values are then often used by subsequent classes. The final
output of this use case is that all relevant values required to remodel the state of the system become stored in
the local variables of the physics engine.
2.2.
ACTORS
2.3.
PRECONDITIONS
Page 3 of 6
2.4.
1.
2.
3.
4.
5.
6.
7.
FLOW OF EVENTS
Simulation Program tells physics engine to derive new state, passing all variables.
Acceleration is calculated.
Velocity is Integrated
Distance to move is calculated.
New position is plotted
Lean is calculated
Pedal difficulty coefficient is calculated
2.5.
1.
1.
2.
3.
4.
5.
6.
7.
2.6.
1.
2.
3.
POST CONDITIONS
New coordinates for centres of both wheels are set in the physics engine object.
Lean of the bicycle is set in the physics engine object.
Pedal difficulty coefficient is set in the physics engine object.
DESCRIPTION
The user requests the current coordinates for the centre of a tyre. This coordinate is the product of the new
derived state.
Page 4 of 6
3.2.
ACTORS
3.3.
PRECONDITIONS
3.4.
1.
2.
FLOW OF EVENTS
3.5.
3.6.
POST CONDITIONS
3.6.1. The currently known coordinates for a wheel centre is returned from the system.
4. GET LEAN
4.1.
DESCRIPTION
The user requests the current coordinates for the centre of a tyre. This coordinate is the product of
the new derived state.
4.2.
ACTORS
4.3.
PRECONDITIONS
4.4.
1.
2.
FLOW OF EVENTS
4.5.
4.6.
POST CONDITIONS
4.6.1. The currently known coordinates for a wheel centre is returned from the system.
Page 5 of 6
DESCRIPTION
The user requests the pedal difficulty coefficient in order to increase or decrease pedal difficulty. This
value is derived from a heuristic based on the amount of power lost due to environmental factors.
5.2.
ACTORS
5.3.
PRECONDITIONS
5.4.
3.
4.
FLOW OF EVENTS
5.5.
5.6.
POST CONDITIONS
5.6.1. The currently known pedal difficulty coefficient is returned to the Simulation Program.
Page 6 of 6