Case Study - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Case Study

Description:

Case Study Oil Tanker Terminal Control System Specification Tanker is the set of tankers Berth is the set of berths The given set is [Tanker, Berth] In any particular ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 16
Provided by: edum141
Category:
Tags: case | study | terminal

less

Transcript and Presenter's Notes

Title: Case Study


1
Case Study
  • Oil Tanker Terminal Control System

2
Specification
  • Tanker is the set of tankers
  • Berth is the set of berths
  • The given set is
  • Tanker, Berth
  • In any particular oil terminal there will be a
    certain set of berths available for tanker to use
  • berths P Berth

3
  • The definition below gives the response to an
    operation
  • OTSResp okwaitmove-tanker
  • known-tankernot-at-berth

4
State Data
  • Declaration
  • a queue of tankers waiting for berths,
  • a record of which tanker occupies which berth
  • The set of tankers that are either occupying
    berths or queuing for them

5
Declaration for state data
Otcsys Waiting seq Tanker Docked Tanker ?
Berth Known P Tanker
6
State Data
  • Predicate
  • A tanker cannot be both in the queue and in a
    berth
  • The tanker queuing will all be different
  • No tanker will be queuing unless all the berths
    are full
  • Tankers occupying berths will all be different

7
State Data
Otcsys waiting seq Tanker docked Tanker ?
Berth known P Tanker
ran waiting n dom docked Ø waiting (ran
waiting) waiting gt 0 ?ran docked berths ran
docked ? berths known ran waiting ? dom docked
8
Initializing state data
InitOtc Otcsys waiting lt gt docked Ø
In the initial state there are no tankers queuing
and all berths are free
9
Operation tankers arriving(1)
  • Only tankers not already queuing or docked can
    ask for permission to arrive.

Arrive0 ?Otcsys T? Tanker T? ? known
10
Operation tankers arriving(2)
  • If there is a free berth, the tanker is allocated
    to it

ArriveNoQ Arrive0 B? Berth Res!
OTSResp ran docked ? berths Res! ok B? ?
berths \ ran docked docked docked ? T? ?
B? Waiting waiting
11
Operation tankers arriving(3)
  • If there is no free berth, the tanker must be
    queued

ArriveQ Arrive0 Res! OTSResp ran
docked berths Res! wait B? ? berths \ ran
docked waiting waiting ltT?gt docked docked
ArriveOk ? ArriveQ ? ArriveNoQ
12
Operation tankers leaving(1)
  • A tanker can apply to leave if it is at berth.

Leave0 ?Otcsys T? Tanker T? ? dom docked
13
Operation tankers leaving(2)
  • If there is no queue, the berth is freed

LeaveNoQ Leave0 Res! OTSResp waiting
lt gt docked T? ? docked Waiting
waiting Res! ok
14
Operation tankers leaving(3)
  • If there is a queue, the operation must output
    the berth and the tanker next to occupy it, must
    update the docked function

LeaveQ Leave0 C! Tanker B! Berth Res!
OTSResp waiting ? lt gt C! head waiting B!
docked T? docked (T? ? docked) ? C! ?
B! waiting tail waiting Res! move-tanker
15
Operation tankers leaving (4)
LeaveOk ? LeaveQ ? LeaveNoQ
Write a Comment
User Comments (0)
About PowerShow.com