You are on page 1of 6

MATHEMATICAL MODELLING FOR THE CONTINUOUS

SIMULATION OF A BICYCLE
USE CASE AND SPECIFICATION
SEAN ROBINSON

CONTENTS
1.

Use Case Diagram .......................................................................................................................................... 3

2.

Derive New State ........................................................................................................................................... 3

3.

4.

5.

2.1.

Description ............................................................................................................................................ 3

2.2.

Actors .................................................................................................................................................... 3

2.3.

Preconditions ........................................................................................................................................ 3

2.4.

Flow of Events ....................................................................................................................................... 4

2.5.

Alternate Flow of Events ....................................................................................................................... 4

2.6.

Post Conditions ..................................................................................................................................... 4

Get New Coordinates ..................................................................................................................................... 4


3.1.

Description ............................................................................................................................................ 4

3.2.

Actors .................................................................................................................................................... 5

3.3.

Preconditions ........................................................................................................................................ 5

3.4.

Flow of Events ....................................................................................................................................... 5

3.5.

Alternate Flow of Events ....................................................................................................................... 5

3.6.

Post Conditions ..................................................................................................................................... 5

Get Lean ......................................................................................................................................................... 5


4.1.

Description ............................................................................................................................................ 5

4.2.

Actors .................................................................................................................................................... 5

4.3.

Preconditions ........................................................................................................................................ 5

4.4.

Flow of Events ....................................................................................................................................... 5

4.5.

Alternate Flow of Events ....................................................................................................................... 5

4.6.

Post Conditions ..................................................................................................................................... 5

Get Pedal Difficulty Coefficient ...................................................................................................................... 6


5.1.

Description ............................................................................................................................................ 6

5.2.

Actors .................................................................................................................................................... 6

5.3.

Preconditions ........................................................................................................................................ 6

5.4.

Flow of Events ....................................................................................................................................... 6

5.5.

Alternate Flow of Events ....................................................................................................................... 6

5.6.

Post Conditions ..................................................................................................................................... 6

Page 2 of 6

Sean Robinson 2012

1. USE CASE DIAGRAM

2. DERIVE NEW STATE


2.1.

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.2.1. Simulation Program

2.3.

PRECONDITIONS

2.3.1. The physics engine library has been successfully referenced.


2.3.2. A physics engine object has been successfully created and initialised.
2.3.3. The variables required for deriving a new state have been accurately set within the physics
engine object.

Page 3 of 6

Sean Robinson 2012

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.

ALTERNATE FLOW OF EVENTS

1.

B: Invalid parameters passed.


1.1. Physics engine returns error message to Simulation Program.

1.

C: Only critical parameters passed.


1.1. Physics Engine sets non-critical variables to defaults.

2.

B: Derived acceleration fails testing.


2.1. Physics Engine returns error message to Simulation Program.

3.

B: Integrated value fails testing.


3.1. Physics Engine returns error message to Simulation Program.

4.

B: Derived distance to move fails testing.


4.1. Physics Engine returns error message to Simulation Program.

5.

B: New position fails testing.


5.1. Physics Engine returns error message to Simulation Program.

6.

B: Lean value fails testing.


6.1. Physics Engine returns error message to Simulation Program.

7.

B: Pedal coefficient fails testing.


7.1. Physics Engine returns error message to Simulation Program.

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.

3. GET NEW COORDINATES


3.1.

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

Sean Robinson 2012

3.2.

ACTORS

3.2.1. Simulation Program

3.3.

PRECONDITIONS

3.3.1. A new state has been successfully derived.

3.4.
1.
2.

FLOW OF EVENTS

User requests coordinates for a wheel.


System returns currently set coordinates for appropriate wheel.

3.5.

ALTERNATE FLOW OF EVENTS

2. B: No valid coordinates currently available


2.1. Return error message to system indicating problem.

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.2.1. Simulation Program

4.3.

PRECONDITIONS

4.3.1. A new state has been successfully derived.

4.4.
1.
2.

FLOW OF EVENTS

User requests coordinates for a wheel.


System returns currently set coordinates for appropriate wheel.

4.5.

ALTERNATE FLOW OF EVENTS

2. B: No valid coordinates currently available


2.1. Return error message to Simulation Program indicating problem.

4.6.

POST CONDITIONS

4.6.1. The currently known coordinates for a wheel centre is returned from the system.

Page 5 of 6

Sean Robinson 2012

5. GET PEDAL DIFFICULTY COEFFICIENT


5.1.

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.2.1. Simulation Program

5.3.

PRECONDITIONS

5.3.1. A new state has been successfully derived.

5.4.
3.
4.

FLOW OF EVENTS

User requests pedal coefficient.


System returns currently set coefficient.

5.5.

ALTERNATE FLOW OF EVENTS

3. B: No valid coefficient currently available


3.1. Return error message to Simulation Program indicating problem.

5.6.

POST CONDITIONS

5.6.1. The currently known pedal difficulty coefficient is returned to the Simulation Program.

Page 6 of 6

Sean Robinson 2012

You might also like