SlideShare a Scribd company logo
MODELING	
  ELEVATOR	
  SYSTEM	
  	
  
WITH	
  COLOURED	
  PETRI	
  NETS	
  	
  
By	
  MOHAMMED	
  ASSIRI	
  
Jun	
  1,	
  2015	
   1	
  ©	
  Mohammed	
  Assiri	
  
1.  Introduction
2.  Coloured Petri Nets
3.  The Abstract Version of CPN-based Modelling of Elevator System
4.  The Timing Version of CPN-based Modelling of Elevator System
5.  The Parking Optimizer Model
6.  The Analyses
7.  Conclusion
Outline:	
  
Jun	
  1,	
  2015	
   2	
  ©	
  Mohammed	
  Assiri	
  
v Elevator Systems
v The Objective
v Related Works
v The Contributions
1. Introduction :
Jun	
  1,	
  2015	
   3	
  ©	
  Mohammed	
  Assiri	
  
•  Integral Part Of Buildings
•  Very Complex
o  Controlling Multiple Elevators By A Centralized Control Mechanism
o  The Differences Among Buildings And Traffic Patterns
v Elevator Systems
Jun	
  1,	
  2015	
   4	
  ©	
  Mohammed	
  Assiri	
  
Proposing a model of elevator system that fulfillments the constraints of the
following definition [Ghezzi et al. (2003)]*: An elevator system is to be installed
in a building with m floors and n cars. The elevator and the control
mechanisms are supplied by the manufacturer. The problem concerns the
logistics of moving cars between floors according to the following :
* Fundamentals of Software Engineering. Pearson Prentice Hall, 2nd edition.
v The Objective
Jun	
  1,	
  2015	
   5	
  ©	
  Mohammed	
  Assiri	
  
a.  Each elevator’s car has a set of buttons - one for each floor. Pressing
these buttons signals the elevator to move to the corresponding floor.
b.  On the wall outside the elevator each floor has two buttons (with the
exception of the ground and the top floors). One button is pressed to
request an upward moving elevator and another button is pressed to
request a downward moving elevator. If both buttons are pressed, then
each direction is assigned to a different car.
c.  When an elevator has not received any requests for service, it should be
held at its parking floor with its doors closed until it receives further
requests.
d.  All requests for elevators from floors (i.e. hall calls) must be serviced
eventually. The applied algorithm controls the priority of floors. All requests
for floors within elevators (i.e. car calls) must be serviced eventually, with
floors usually serviced sequentially in the direction of travel.
e.  Each elevator’s car has an emergency button which when pressed causes
an alarm. The elevator is then deemed "out of service". Each elevator has
a mechanism to cancel its "out of service" status.
v The Objective (Cont.)
Jun	
  1,	
  2015	
   6	
  ©	
  Mohammed	
  Assiri	
  
•  Elevator system is one of the software engineering benchmarks to test the
expressive power, readability and convenience of various formal specification
techniques [Ghezzi et al. (2003)]
•  It has been modeled many times in past and that includes Petri Nets:
1.  Petri net based dynamic scheduling of an elevator system [Lin and Fu (1996)].
2.  Dynamic scheduling of elevator systems over hybrid Petri net/rule modeling [Huang
and Fu (1998)].
3.  Timed Petri net based approach for elevator group controls [Cho et al. (1999)].
4.  Abstract Petri net based approach to problem solving in real time applications
[Etessami and Hura (1989)]
5.  Petri net-based modeling and control of the multi-elevator systems [Ahmad et
al. (2014)]
6.  Simulation of the intelligent control circuit based on Petri net [Ye et al. (2011)].
7.  Requirements Engineering for Reactive Systems: Coloured Petri Nets for an
Elevator Controller [Fernandes et al. (2007)]
8.  Modeling and analysis of elevator system based on timed-Coloured Petri net
[Liqian et al. (2004)]
v Related Works
Jun	
  1,	
  2015	
   7	
  ©	
  Mohammed	
  Assiri	
  
•  The independence of the number of floors and cars.
•  Covering different stages of the elevator system in substantial details.
•  The flexibility to adapt different algorithms and rules that govern real
elevator system.
•  May eventually evolve in a standard formal model of the elevator system.
v The Contributions
Jun	
  1,	
  2015	
   8	
  ©	
  Mohammed	
  Assiri	
  
v Overview
v Definition
v Computer Tools
2.  Coloured Petri Nets
Jun	
  1,	
  2015	
   9	
  ©	
  Mohammed	
  Assiri	
  
•  Coloured Petri Nets (CPN) [Jensen (1981)*] is an extension of Petri Nets. It is
a graphical language for constructing models of concurrent systems and
analyzing their properties.
•  CPN combines the capabilities of Petri Nets (as a graphical language) with
the capabilities of Standard ML (as a high-level programming language).
(next slides)
* Coloured Petri Nets and the Invariant Method, Theoretical Computer Science
v Overview
Jun	
  1,	
  2015	
   10	
  ©	
  Mohammed	
  Assiri	
  
v The Structure of CPN-Based Model
Jun	
  1,	
  2015	
   11	
  
placetransition
arc inscription
colour set
token colours
[guards]
priority value
©	
  Mohammed	
  Assiri	
  
•  The CPN ML language is a flexible, expressive, and extensible
language founded on the functional programming Language: Standard ML
(SML/NJ implementation).
•  By CPN ML language, the CPN-based models have not only types and
inscriptions, but also colour sets, token colours, variable declarations, and
functions.
v  CPN ML Language (A High-level Programming Language)
Jun	
  1,	
  2015	
   12	
  ©	
  Mohammed	
  Assiri	
  
Structure	
  	
  DefiniRons	
  
v Demo
Jun	
  1,	
  2015	
   13	
  
unilluminated
buttons
Buttons
1`{floor_location=2,illumination=off}++
1`{floor_location=3,illumination=off}
unilluminate(button)
button
button
illuminate(button)
illuminated
buttons
1`{floor_location=1,illumination=on}
Buttons
illuminate
unilluminate
©	
  Mohammed	
  Assiri	
  
•  Semi-formal definition:
A Coloured Peter Net is a tuple :
CPN = (P,T,A,Σ,C,N,E,G,I)
•  For more details and theory of CPN, please refer to Coloured Petri Nets
Modelling and Validation of Concurrent Systems by Jensen and
Kristensen (2009)
v Definition
Jun	
  1,	
  2015	
   14	
  ©	
  Mohammed	
  Assiri	
  
•  CPN Tools v.4.0 from AIS Group, Eindhoven University of Technology, The
Netherlands. (www.cpntools.org)
•  The CPN Tools is composed of a graphical editor, a state space tool, and a
simulator.
•  Visualization v.0.1 a visual aid was developed to observe the modeled
system.
v Computer Tools
Jun	
  1,	
  2015	
   15	
  ©	
  Mohammed	
  Assiri	
  
3.  The Abstract Version of CPN-based Modelling
of Elevator System
Jun	
  1,	
  2015	
   16	
  ©	
  Mohammed	
  Assiri	
  
v The Abstract Car-Structure Sub-model
Jun	
  1,	
  2015	
   17	
  
CarsCarsCars DatabaseDatabaseDatabase
Database
initialize_database()
Cars
initialize_cars()
©	
  Mohammed	
  Assiri	
  
Colour	
  Sets	
  	
   Defini1ons	
  	
  
Car	
  ID	
  	
  {	
  i	
  |i	
  ∈	
  Z+	
  ∧	
  i	
  ≤	
  total	
  number	
  of	
  cars}	
  	
  
Range	
  	
  {	
  r	
  |	
  r	
  ∈	
  Z+	
  ∧	
  lowest	
  floor	
  ≤	
  r	
  ≤	
  highest	
  floor}	
  	
  
Status	
  	
  {	
  idle,	
  emergency,	
  out	
  of	
  service,	
  up,	
  down	
  }	
  	
  
Desired	
  Floors	
  	
  {	
  [l]	
  |	
  l	
  ∈	
  Range}	
  	
  
Call	
  Issuer	
  	
  {	
  request,	
  system,	
  non,	
  reservaRon}	
  	
  
Cars	
  	
  
{	
  (car	
  id,	
  current	
  floor,	
  status,	
  parking	
  floor,	
  
desired	
  floors,	
  call	
  issuer)	
  |	
  car	
  id	
  ∈	
  Car	
  ID,	
  
current	
  floor	
  ∈	
  Range,	
  status	
  ∈	
  Status,	
  parking	
  
floor	
  ∈	
  Range,	
  desired	
  floors	
  ∈	
  Desired	
  Floors,	
  
call	
  issuer	
  ∈	
  Call	
  Issuer}	
  	
  
v The Abstract Car-Structure Sub-model (Cont. 1)
Jun	
  1,	
  2015	
   18	
  ©	
  Mohammed	
  Assiri	
  
Colour	
  Sets	
  	
   Defini1ons	
  	
  
Car	
  Info	
  	
  
{(current	
  floor,	
  status,	
  desRnaRons,	
  car	
  id)	
  |	
  
current	
  floor	
  ∈	
  Range,	
  status	
  ∈	
  Status,	
  
desRnaRons	
  ∈	
  Desired	
  Floors,	
  car	
  id	
  ∈	
  Car	
  ID}	
  	
  
Database	
  	
  {[d]	
  |	
  d	
  ∈	
  Car	
  Info}	
  	
  
v The Abstract Car-Structure Sub-model (Cont. 2)
Jun	
  1,	
  2015	
   19	
  ©	
  Mohammed	
  Assiri	
  
Parameter	
  	
   Legal	
  value	
  
Cars’	
  number	
  	
  {n	
  |	
  n	
  ∈	
  Z+}	
  	
  
Lowest	
  floor	
  number	
  	
  {f	
  |	
  f	
  ∈	
  Z+	
  ∧	
  f	
  <	
  highest	
  floor}	
  	
  
Highest	
  floors	
  number	
  	
  {h	
  |	
  h	
  ∈	
  Z+	
  ∧	
  lowest	
  floor	
  <	
  h}	
  	
  
v The Abstract Car-Structure Sub-model (Cont. 3)
Jun	
  1,	
  2015	
   20	
  ©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model
Jun	
  1,	
  2015	
   21	
  
counter
selected
floor's num
requested call
floor's
number
CarsCars
DatabaseDatabasePrk SysPrk SysPrk Sys
all floors'
numbers
watch
generators
log
Release Random
Number
Release
Assign Hall Call
Assign
Direction
n
rn_random()
new_call
new_call
car
hall_call
snd_hcall
(car,hall_call)
n+1
i i-1
i
i new_call
hall_call
i
i+1
asn_dir(new_call)
hall_call
db
upd_db
(hall_call,
db,car)
INT
1`1
()
Range
Range
selected_floor
INT
1`1
Hall_Call
Hall_Call
[rn_guard(n,i)]
[r_guard(i)]
[asn_hcall_guard
(hall_call,car,db)]
Hall_Call
Database
Database
initialize_database()
initialize_cars()
Cars
Cars
©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model (Cont. 1)
Jun	
  1,	
  2015	
   22	
  
requested call
Hall_Call
CarsCars
initialize_cars()
DatabaseDatabase
initialize_database()
Prk SysPrk Sys
Hall_Call
log
Hall_Call
Assign Hall Call
[asn_hcall_guard
(hall_call,car,db)]
car
hall_call
snd_hcall
(car,hall_call)
hall_call
hall_call
db
upd_db
(hall_call,
db,car)
Hall	
  Call	
   {(hall	
  call	
  floor,	
  status)	
  |	
  hall	
  call	
  floor	
  ∈	
  Range,	
  status	
  ∈	
  Status}	
  	
  
©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model (Cont. 2)
Jun	
  1,	
  2015	
   23	
  
The Rules
1.  The selected car is either idle or
travelling toward the direction of the hall call,
2. The selected car is not reserved,
3. The selected car is elected by the applied algorithm which could be
the nearest-car algorithm ,
the minimum-waiting algorithm ,
or the scope algorithm .
©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model (Cont. 3)
Jun	
  1,	
  2015	
   24	
  
•  The nearest-car algorithm [Barney (2003a)1]:
1.  Analysing the token of place Database.
a.  The cars with proper status are extracted from the token.
b.  The distances between hall-call floor and cars’ current floors are calculated.
2.  The hall call is assigned to the car with minimum distance to the hall call floor.
•  The minimum waiting algorithm:
3.  Calculating the stop times consumed by the already placed and being served calls
between the floor of the new hall call and each car’s current floor.
4.  The car with the expected minimum waiting-time is assigned to serve the new hall call
•  The scope algorithm [Barney (2003b)2]:
H ≤ A ≤ T.
where:
H = the head floor of car’s scope
A = the answered hall-call floors
T = the tail floor of car’s scope
1 Elevator Traffic Handbook: Theory and Practice.
2 VerRcal	
  transportaRon	
  in	
  tall	
  buildings.	
  	
  
©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model (Cont. 4)
Jun	
  1,	
  2015	
   25	
  
counter
selected
floor's num
floor's
number
all floors'
numbers
watch
generators
Release Random
Number
Release
n
rn_random()
new_call
new_call
n+1
i
i
INT
1`1
()
Range
Range
selected_floor
INT
1`1
[rn_guard(n,i)]
[r_guard(i)]
©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model (Cont. 5)
Jun	
  1,	
  2015	
   26	
  
Parameters	
   Legal	
  values	
  	
  
Producing	
  mode	
  	
  {finite,	
  infinite}	
  	
  
Times	
  of	
  finite	
  hall	
  calls	
  	
  {y	
  |	
  y	
  ∈	
  Z	
  ∧	
  0	
  ≤	
  y}	
  	
  
The	
  most	
  requested	
  floor	
  	
  {r	
  |	
  r	
  ∈	
  Range}	
  	
  
DuplicaRon	
  of	
  most	
  requested	
  floor	
  	
  {d	
  |	
  d	
  ∈	
  Z	
  ∧	
  0	
  ≤	
  d}	
  	
  
The	
  applied	
  algorithm	
  	
  {minimum	
  waiRng,	
  nearest,	
  scope}	
  	
  
Producing’	
  pause	
  number∗	
  	
  {p	
  |	
  p	
  ∈	
  Z	
  ∧	
  0	
  <	
  p}	
  	
  
©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model (Cont. 6)
Jun	
  1,	
  2015	
   27	
  
requested call
floor's
number
Assign
Direction
new_call
asn_dir(new_call)
Range
Hall_Call
©	
  Mohammed	
  Assiri	
  
v The Abstract Hall-Call Sub-model (Cont. 7)
Jun	
  1,	
  2015	
   28	
  
•  If the produced number equates the highest floor, then it is associated
restrictedly with the down direction,
•  Else if the produced number equates the lowest floor, then it is associated
restrictedly with up direction.
•  Otherwise, a produced number is associated non-deterministically with up
direction or down direction.
ü  Thus, a hall call of a valid floor’s number and an appropriate direction is
produced correctly and completely.
©	
  Mohammed	
  Assiri	
  
v The Abstract Car-call Sub-model
Jun	
  1,	
  2015	
   29	
  
CarsCarsCars log
car call
all floors'
numbers
counter
specific
floors' num
DatabaseDatabase
watch
generator
Coordinate
Release Floor's Number
Reproduce
archive(car,car_call,
new_call,sf)car_callcar
snd_ccall(car,
new_call,sf)
new_call
rn_random()
n+1
n
sf
place_calls
(car,sf)
db
upd_db_
(new_call,
db,car,sf)
i+1
i
i
i-1
car_call
reproduce(sf)sf
car
INT
1`1[rfn_guard(n,i)]()
RangeINT
1`1
Specific_Floors
initialize_sfloors()
[rep_guard
(sf,car,car_call)]
0Car_Calls
initialize_log()initialize_cars()
CarsDatabase
initialize_database()
[coord_guard(car_call,car,sf,new_call)]
Database
©	
  Mohammed	
  Assiri	
  
v The Abstract Car-call Sub-model (Cont. 1)
Jun	
  1,	
  2015	
   30	
  
CarsCars log
car call
specific
floors' num
DatabaseDatabase
Coordinate
archive(car,car_call,
new_call,sf)car_callcar
snd_ccall(car,
new_call,sf)
new_call
sf
place_calls
(car,sf)
db
upd_db_
(new_call,
db,car,sf)
Range
Specific_Floors
initialize_sfloors()
Car_Calls
initialize_log()initialize_cars()
CarsDatabase
initialize_database()
[coord_guard(car_call,car,sf,new_call)]
©	
  Mohammed	
  Assiri	
  
Specific	
  Floors	
  	
  {(car	
  id,	
  specific	
  calls,	
  repeated	
  Rmes)	
  |	
  car	
  id	
  ∈	
  Car	
  ID,	
  Specific	
  
calls	
  ∈	
  Desired	
  Floors,	
  repeated	
  Rmes	
  ∈	
  Z}	
  	
  
v The Abstract Car-call Sub-model (Cont. 2)
Jun	
  1,	
  2015	
   31	
  
car call
all floors'
numbers
counter
watch
generator
Release Floor's Number
rn_random()
n+1
n
i+1
i
INT
1`1
[rfn_guard(n,i)]()
RangeINT
1`1
©	
  Mohammed	
  Assiri	
  
specific
floors' num
Reproduce
reproduce(sf)sf
Specific_Floors
initialize_sfloors()
[rep_guard
(sf,car,car_call)]
v The Abstract Car-call Sub-model (Cont. 3)
Jun	
  1,	
  2015	
   32	
  ©	
  Mohammed	
  Assiri	
  
Parameters	
  	
   Legal	
  values	
  	
  
Producing	
  mode	
  	
  {finite,	
  infinite}	
  	
  
Times	
  of	
  finite	
  car	
  calls	
  	
  {x	
  |	
  x	
  ∈	
  Z	
  ∧	
  0	
  ≤	
  x}	
  	
  
Most	
  desired	
  floors	
  	
  {[f]	
  |	
  f	
  ∈	
  Range}	
  	
  
Frequency	
  of	
  desired	
  floors	
  	
  {d	
  |	
  d	
  ∈	
  Z	
  ∧	
  0	
  ≤	
  d}	
  	
  
Producing	
  pause	
  number	
  	
  {p	
  |	
  p	
  ∈	
  Z+	
  }	
  	
  
v The Abstract System-cycle Sub-model
Jun	
  1,	
  2015	
   33	
  
CarsCars
Cars
initialize_cars()
Cars
out of service
Cars
error log
Cars
DatabaseDatabase
Database
initialize_database()
Databasesuccess log
Cars
Doors
Doors
initialize_doors ()
Database
Database
initialize_database()
Database
Maintain
[mnt_guard(car)]
0
Restart
[rst_guard(car)]
Transfer
[trn_guard(car)]
Arrive
[arr_guard(car,door)]
suspend
(car)
car
car
car
restart(car)
car
transfer(car)
upd_trn(car,db) db
cararrive(car)
car
doordoor
upd_arr(car,db)
db
upd_susp
(car,db)
db
db upd_rst
(car,db)
©	
  Mohammed	
  Assiri	
  
v  The Abstract System-cycle Sub-model (The Maintenance)
Jun	
  1,	
  2015	
   34	
  
CarsCars
out of service
error log
Database
Database
Maintain
Restart
suspend
(car)
car
car
car
restart(car)
upd_susp
(car,db)
db
db upd_rst
(car,db)
Cars
initialize_cars()
[rst_guard(car)]
Cars
initialize_database()
[mnt_guard(car)]
0
Cars
©	
  Mohammed	
  Assiri	
  
Parameter	
  	
   Legal	
  value	
  	
  
Restart	
  pending	
  cars	
  automaRcally	
  	
   {”yes”,”no”	
  }	
  	
  
v The Abstract System-cycle Sub-model (The Transition)
Jun	
  1,	
  2015	
   35	
  
CarsCars
DatabaseDatabase
Database
Transfer
car
transfer(car)
upd_trn(car,db) db
Cars
initialize_cars() [trn_guard(car)]
initialize_database()
©	
  Mohammed	
  Assiri	
  
v The Abstract System-cycle Sub-model (The Arrival)
Jun	
  1,	
  2015	
   36	
  
CarsCars
Cars
initialize_cars()
DatabaseDatabase
Database
initialize_database()
success log
Cars
Doors
Doors
initialize_doors ()
Arrive
[arr_guard(car,door)]
cararrive(car)
car
doordoor
upd_arr(car,db)
db
©	
  Mohammed	
  Assiri	
  
4.  The Timing Version of CPN-based Modelling of
Elevator System
Jun	
  1,	
  2015	
   37	
  ©	
  Mohammed	
  Assiri	
  
•  The abstract version concerns the logical movement of elevator system.
In contrast, the timing version extends the abstract version to include the
illumination of buttons , the calculation of waiting and serving times, and
the limiting of cars’ stops.
v The Timing Car-Structure Sub-model
Jun	
  1,	
  2015	
   38	
  
CarsTiming Cars
Timing_Cars
initialize_tcars()
DatabaseTiming Database
Timing_Database
initialize_tdatabase()
Timing DatabaseTiming Cars
©	
  Mohammed	
  Assiri	
  
Colour	
  Sets	
  	
   Defini1ons	
  	
  
Car	
  ID	
  	
   {	
  i	
  |i	
  ∈	
  Z+	
  ∧	
  i	
  ≤	
  total	
  number	
  of	
  cars}	
  	
  
Range	
  	
   {	
  r	
  |	
  r	
  ∈	
  Z+	
  ∧	
  lowest	
  floor	
  ≤	
  r	
  ≤	
  highest	
  floor}	
  	
  
Status	
   {	
  up,	
  down,	
  emergency,	
  idle,	
  out	
  of	
  service}	
  	
  
Desired	
  Floors	
   {	
  [l]	
  |	
  l	
  ∈	
  Range}	
  	
  
Call	
  Issuer	
   {	
  request,	
  system,	
  non,	
  reservaRon}	
  	
  
INT	
   {n	
  |	
  n	
  ∈	
  Z}	
  	
  
REAL	
   {r	
  |	
  r	
  ∈	
  R}	
  
Timing	
  Hall	
  Call	
  
{(hall	
  call,	
  direc1on,	
  1me)	
  |	
  hall	
  call	
  ∈	
  Range,	
  direc1on	
  ∈	
  Status,	
  	
  
1me	
  ∈	
  R}	
  	
  
Timing	
  Hall	
  Calls	
   {[h]	
  |	
  h	
  ∈	
  Timing	
  Hall	
  Call}	
  	
  
Timing	
  Cars	
  
{(car	
  id,	
  current	
  floor,	
  status,	
  parking	
  floor,	
  desired	
  floors,	
  call	
  issuer,	
  
Rme	
  period,	
  served	
  hall	
  calls,	
  stops	
  limitaRon	
  )	
  |	
  car	
  id	
  ∈	
  Car	
  ID,	
  
current	
  floor	
  ∈	
  Range,	
  status	
  ∈	
  Status,	
  parking	
  floor	
  ∈	
  Range,	
  desired	
  
floors	
  ∈	
  Desired	
  Floors,	
  call	
  issuer	
  ∈	
  Call	
  Issuer,	
  Rme	
  period	
  ∈	
  REAL,	
  
served	
  hall	
  calls	
  ∈	
  Timing	
  Hall	
  Calls,	
  stops	
  limitaRon	
  ∈	
  INT}	
  	
  
v The Timing Car-Structure Sub-model (Cont. 1)
Jun	
  1,	
  2015	
   39	
  ©	
  Mohammed	
  Assiri	
  
Parameter	
  	
   Legal	
  value	
  
Stops’	
  limitaRon	
  	
  {s	
  |	
  s	
  ∈	
  Z+	
  ∧s=0	
  ∨	
  1	
  ≤	
  s}	
  	
  
v The Timing Car-Structure Sub-model (Cont. 2)
Jun	
  1,	
  2015	
   40	
  ©	
  Mohammed	
  Assiri	
  
	
  
(Pseudocode)	
  	
  
func%on	
  stops’	
  limita%on	
  value	
  ()	
  =	
  
	
  	
  	
  	
  	
  	
  	
  	
  if	
  the	
  parameter	
  "stops’	
  limita%on"	
  =	
  0	
  then	
  
	
  return	
  random(1,	
  floors’	
  number);	
  
else	
  
	
  return	
  the	
  parameter	
  "stops’	
  limita%on";	
  
Colour	
  Sets	
  	
   Defini1ons	
  	
  
Timing	
  Car’s	
  Data	
  	
  
{(current	
  floor,	
  status,	
  desRnaRons,	
  car	
  id,	
  
Rme)	
  |	
  current	
  floor	
  ∈	
  Range,	
  status	
  ∈	
  
Status,	
  desRnaRons	
  ∈	
  Desired	
  Floors,	
  car	
  id	
  
∈	
  Car	
  ID,	
  Rme	
  ∈	
  REAL}	
  	
  
Timing	
  Database	
  	
  {[g]	
  |	
  g	
  ∈	
  Timing	
  Carʹ′s	
  Data}	
  	
  
v The Timing Car-Structure Sub-model (Cont. 3)
Jun	
  1,	
  2015	
   41	
  ©	
  Mohammed	
  Assiri	
  
v The Timing Hall-Call Sub-model
Jun	
  1,	
  2015	
   42	
  
Prk Sys
Hall_Call
Prk Sys
CarsTiming Cars
Timing_Cars
initialize_tcars()
Coordinator
Coordinator
initialize_coordination()
Hall's_Buttons
Hall's_Buttons
initialize_halls'_buttons()
Hall's_Buttons
Requested
Hall Call
Requested_Hall_Call
DatabaseTiming Database
Timing_Database
initialize_tdatabase()
Release Hall Call
[releas_guard(HB,C)]
Assign Hall Call
[asn_guard(rhc,car,DB)]
Cupd_coord(HB,C)
illuminate_hall_btn(HB,C)
carasn_hcall(car,rhc)
(#hall_call rhc)
rhc
hall_call(HB,C,DB)
released(C) C
HB
DB
upd_asn
(car,rhc,DB)
DB
DB
Timing Cars
Timing Database
©	
  Mohammed	
  Assiri	
  
v The Timing Hall-Call Sub-model (Releasing Hall Calls)
Jun	
  1,	
  2015	
   43	
  
Coordinator
Coordinator
initialize_coordination()
Hall's_Buttons
Hall's_Buttons
initialize_halls'_buttons()
Requested
Hall Call
Requested_Hall_Call
DatabaseTiming Database
Timing_Database
initialize_tdatabase()
Release Hall Call
[releas_guard(HB,C)]
Cupd_coord(HB,C)
illuminate_hall_btn(HB,C)
hall_call(HB,C,DB)
HB
DB
DB
©	
  Mohammed	
  Assiri	
  
Colour	
  Sets	
  	
   Defini1ons	
  	
  
Hall	
  Call	
  	
   {(hall	
  call	
  floor,	
  status)	
  |	
  hall	
  call	
  floor	
  ∈	
  Range,	
  status	
  ∈	
  Status	
  }	
  	
  
Hall	
  Calls	
  	
   {[h]	
  |	
  h	
  ∈	
  Hall	
  Call}	
  	
  
Hall	
  BuOons	
  	
   {(IB,	
  USB,	
  UUB)	
  |	
  IB	
  ∈	
  Hall	
  Calls,	
  USB	
  ∈	
  Hall	
  Calls,	
  UUB	
  ∈	
  Hall	
  Calls}	
  	
  
Coordinator	
   {(specified	
  call,	
  unspecified	
  call,	
  next	
  selec1on,	
  released	
  calls)	
  |	
  specified	
  
call	
  ∈	
  Z,	
  unspecified	
  call	
  ∈	
  Z,	
  next	
  selec1on	
  ∈	
  Z,	
  released	
  calls	
  ∈	
  Z}	
  	
  
v  The Timing Hall-Call Sub-model (Releasing Hall Calls Cont. 2)
Jun	
  1,	
  2015	
   44	
  ©	
  Mohammed	
  Assiri	
  
Rules:
1.  The unilluminated-specified buttons (USB) list and unilluminated-unspecified
buttons (UUB) list are not both empty,
2.  If the limit of producing calls is finite, then it has been not already reached,
3.  The number of produced calls is less than the value of parameter pause number
v  The Timing Hall-Call Sub-model (Releasing Hall Calls Cont. 3)
Jun	
  1,	
  2015	
   45	
  ©	
  Mohammed	
  Assiri	
  
The choice of either USB list or UUB list is based on the following rules:
1.  When a list is empty, the other list is always selected.
2.  The difference between both lists’ length is less or equal to the value of
parameter “The frequency of most requested hall calls”.
3.  The internal choice between tuples is sequential in USB list and arbitrary in UUB
list.
v  The Timing Hall-Call Sub-model (Releasing Hall Calls Cont. 1)
Jun	
  1,	
  2015	
   46	
  ©	
  Mohammed	
  Assiri	
  
Parameters 	
   Legal values 	
  
Producing mode 	
   {finite, infinite} 	
  
Times of finite hall calls 	
   {y | y ∈ Z ∧ 0 ≤ y} 	
  
The most requested hall calls 	
  
{[(floor number, direction)] | floor number ∈ Range,
direction ∈ Status} 	
  
The frequency of most requested
hall calls 	
  
{d | d ∈ Z ∧ 0 ≤ d} 	
  
The applied algorithm of hall calls 	
   {minimum waiting,nearest, scope} 	
  
The travel time 	
   {t | t ∈ R+} 	
  
The average time of stop 	
   {s | s ∈ R+} 	
  
Pause number 	
   {p | p ∈ Z+} 	
  
v The Timing Hall-Call Sub-model (Assigning Hall Calls)
Jun	
  1,	
  2015	
   47	
  
Prk Sys
Hall_Call CarsTiming Cars
Timing_Cars
initialize_tcars()
Coordinator
Coordinator
initialize_coordination()
Requested
Hall Call
Requested_Hall_Call
DatabaseTiming Database
Timing_Database
initialize_tdatabase()
Assign Hall Call
[asn_guard(rhc,car,DB)]
carasn_hcall(car,rhc)
(#hall_call rhc)
rhc
released(C) C
DB
upd_asn
(car,rhc,DB)
©	
  Mohammed	
  Assiri	
  
Car’s Time 	
   {(car id, time) | car id ∈ Car ID, time ∈ R} 	
  
Cars’ Times 	
   {[c] | c ∈ Car′s Time} 	
  
Requested
Hall Call 	
  
{(hall call, waiting times) | hall call ∈ Hall Call, waiting times ∈ Cars’ Times} 	
  
Coordinator	
  	
  
{(specified	
  call,	
  unspecified	
  call,	
  next	
  selecRon,	
  released	
  calls)	
  |	
  specified	
  call	
  ∈	
  Z,	
  
unspecified	
  call	
  ∈	
  Z,	
  next	
  selecRon	
  ∈	
  Z,	
  released	
  calls	
  ∈	
  Z}	
  	
  
v The Timing Car-Call Sub-model
Jun	
  1,	
  2015	
   48	
  
CarsTiming Cars
Timing_Cars
initialize_tcars()
Calls_Counters
Calls_Counters
initialize_coord ()
DatabaseTiming Database
Timing_Database
initialize_tdatabase()
Car's_ButtonsCar's_Buttons
Car's_Buttons
initialize_car's_buttons ()
Car's_Buttons
Place Car Call
[plc_gaurd(CB,CC,car) ]
CCupd_ccoord(CB,CC)
DBcarsnd_ccall(CB,CC,car) upd_db_(CB,CC,DB,car)
CB illuminate_btn(CB,CC,car)
Timing DatabaseTiming Cars
©	
  Mohammed	
  Assiri	
  
Floors 	
   {[f] | f ∈ Range} 	
  
Served Calls 	
   {[(floor, time)] | floor ∈ Range, time ∈ R} 	
  
Cars’ Buttons 	
   {(car id, ICB, USCB, UUCB) | car id ∈ Car ID, ICB ∈ Served calls, USCB ∈
Floors, UUCB ∈ Floors} 	
  
Calls’	
  Counters	
  	
  
{(specified call, unspecified call, next selection) | specified call ∈ Z, unspecified call
∈ Z, next selection ∈ Z}
v The Timing Car-Call Sub-model (Cont. )
Jun	
  1,	
  2015	
   49	
  ©	
  Mohammed	
  Assiri	
  
Parameters 	
   Legal values 	
  
Producing mode 	
  {finite, infinite} 	
  
Times of finite car calls 	
  {y | y ∈ Z ∧ 0 ≤ y} 	
  
The most desired floors 	
  {[f] | f ∈ Range} 	
  
The frequency of most desired floors 	
  {d | d ∈ Z ∧ 0 ≤ d} 	
  
v The Timing System-cycle Sub-model
Jun	
  1,	
  2015	
   50	
  
CarsTiming Cars
Timing_Cars
initialize_tcars()
Timing Cars
out of service
Timing_Cars
DatabaseTiming Database
Timing_Database
initialize_tdatabase()
Doors
Doors
initialize_counters ()
Database_Timing Database
Timing_Database
initialize_tdatabase()
Car's_ButtonsCar's_Buttons
Car's_Buttons
initialize_car's_buttons ()
Car's_Buttons
Hall's_ButtonsHall's_Buttons
Hall's_Buttons
initialize_halls'_buttons()
Hall's_Buttons
warning
to manager
Hall Call
LOG
Hall_Call_LOG
Car Call
LOG
Car_Call_LOG
initialize_car_call_log ()
Maintain
[mnt_guard(car,c)]
0
Restart
[rst_guard(car)]
Transfer
[trn_guard(car)]
Arrive
[arr_guard(CB,car,cnt)]
suspend(car)
car
car
restart(car)
car
transfer(car)
upd_trn(car,DB) DB
cararrive(car,cnt)
upd_cnt(car,cnt) cnt
upd_arr(car,DB)
DB
upd_susp(car,DB)DB
DB
upd_rst
(car,DB)
unilluminate_hall_btn
(HB,car)
HBCB unilluminate_btn
(CB,car)
reset_car's_btns(CB)CB
return_hall_call
(HB,car)
HB
log_hall(car) log_car(CB,CL,car)CL
Timing Database
Timing Database
©	
  Mohammed	
  Assiri	
  
v  The Timing System-cycle Sub-model (Maintenance Stage)
Jun	
  1,	
  2015	
   51	
  
CarsTiming Cars
Timing_Cars
initialize_tcars()
out of service
Timing_Cars
Database_Timing Database
Timing_Database
initialize_tdatabase()
Car's_ButtonsCar's_Buttons
Car's_Buttons
initialize_car's_buttons ()
Hall's_ButtonsHall's_Buttons
Hall's_Buttons
initialize_halls'_buttons()
warning
to manager
Maintain
[mnt_guard(car,c)]
0
Restart
[rst_guard(car)]
suspend(car)
car
car
restart(car)
upd_susp(car,DB)DB
DB
upd_rst
(car,DB)
reset_car's_btns(CB)CB
return_hall_call
(HB,car)
HB
©	
  Mohammed	
  Assiri	
  
v The Timing System-cycle Sub-model (Arrival Stage)
Jun	
  1,	
  2015	
   52	
  
CarsTiming Cars
Timing_Cars
initialize_tcars()
Doors
Doors
initialize_counters ()
Car's_ButtonsCar's_Buttons
Car's_Buttons
initialize_car's_buttons ()
Hall's_ButtonsHall's_Buttons
Hall's_Buttons
initialize_halls'_buttons()
Hall Call
LOG
Hall_Call_LOG
Car Call
LOG
Car_Call_LOG
initialize_car_call_log ()
Arrive
[arr_guard(CB,car,cnt)]
cararrive(car,cnt)
upd_cnt(car,cnt) cnt
upd_arr(car,DB)
DB
unilluminate_hall_btn
(HB,car)
HBCB unilluminate_btn
(CB,car)
log_hall(car) log_car(CB,CL,car)CL
©	
  Mohammed	
  Assiri	
  
v  The Timing System-cycle Sub-model (Arrival Stage Cont.)
Jun	
  1,	
  2015	
   53	
  
CarsTiming Cars
Timing_Cars
initialize_tcars()
Doors
Doors
initialize_counters ()
Car's_ButtonsCar's_Buttons
Car's_Buttons
initialize_car's_buttons ()
Hall's_ButtonsHall's_Buttons
Hall's_Buttons
initialize_halls'_buttons()
Hall Call
LOG
Hall_Call_LOG
Car Call
LOG
Car_Call_LOG
initialize_car_call_log ()
Arrive
[arr_guard(CB,car,cnt)]
cararrive(car,cnt)
upd_cnt(car,cnt) cnt
upd_arr(car,DB)
DB
unilluminate_hall_btn
(HB,car)
HBCB unilluminate_btn
(CB,car)
log_hall(car) log_car(CB,CL,car)CL
©	
  Mohammed	
  Assiri	
  
Colour	
  Sets	
  	
   Defini1ons	
  	
  
Doors	
  	
   {(car	
  id,	
  current	
  delivery	
  number,	
  deliveries’	
  total)	
  |	
  car	
  id	
  ∈	
  Car	
  ID,	
  
current	
  delivery	
  number	
  ∈	
  Z	
  ,	
  deliveries’	
  total	
  ∈	
  Z}	
  	
  
Hall	
  Call	
  LOG	
  	
   {(hall	
  call,	
  waiRng	
  Rme)	
  |	
  hall	
  call	
  ∈	
  Hall	
  Call,	
  waiRng	
  Rme	
  ∈	
  R}	
  	
  
Serving	
  Rmes	
  	
   {[(floor,	
  serving	
  Rme)]	
  min	
  floor	
  ∈	
  Range,	
  serving	
  Rme	
  ∈	
  R}	
  	
  
Car	
  Call	
  LOG	
  	
   {(car	
  id,	
  serving	
  Rmes)	
  |	
  car	
  id	
  ∈	
  Car	
  ID,	
  serving	
  Rmes	
  ∈	
  Serving	
  
Times}	
  	
  
5.  The Parking Optimizer Model
Jun	
  1,	
  2015	
   54	
  
elected floors
Range
Position ModelPosition Sub-modelPosition Sub-model
Election ModelElection Sub-modelElection Sub-model
Assignment ModelAssignment Sub-modelAssignment Sub-model
©	
  Mohammed	
  Assiri	
  
5.  The Parking Optimizer Model (Cont. )
Jun	
  1,	
  2015	
   55	
  ©	
  Mohammed	
  Assiri	
  
The initial value of the parking floor is calculated generally by:
1.  Floors′ Number = (highest floor − lowest floor ) + 1
2.  Scope = |floors′ number ÷ cars′ number|
3.  Scope Head = ((scope ∗ car id) − (scope − 1)) + (lowest floor′s − 1)
4.  Scope Tail = (scope ∗ car id) + (lowest floor − 1)
∴ Spot(car id) = scope′s head (car id)
v The Election Sub-model
Jun	
  1,	
  2015	
   56	
  
elected floor
counter
INT
1`1
sorted
list
INT_List
1`[]
candidate
floors
Floors_Statistics
processed
call counter
INT
1`0
floors
statistics
Floors_Statistics
initialize_statistics()
Prk SysPrk Sys
Hall_Call
Prk Sys
elected floors
Out
Range
Out
Lock SysLock Sys
INT
1`0
Lock Sys
Elect Floor
[elect_guard(tl,n,fs)]
3
Sort Floors' Recursion
[sort_guard(n,fs)]
2
Count Call
[count_guard(hall_call,fs,n,i)]
1
Sweepe Unelected
Floors
5
upd_pcc(n,i,tl)
hall_call
upd_efc(tl,n)
fs
fs
n
update_list(tl,n)
n
count(hall_call,fs)
i
tlsort_recursion(fs,tl)
n fsn+1
tl
update_statistics(fs)
(#floor fs)
i
1i
fs
fs
©	
  Mohammed	
  Assiri	
  
v  The Election Sub-model (1. Counting The Placed Hall Calls)
Jun	
  1,	
  2015	
   57	
  
processed
call counter
INT
1`0
floors
statistics
Floors_Statistics
initialize_statistics()
Prk SysPrk Sys
Hall_Call
Lock SysLock Sys
INT
1`0
Count Call
[count_guard(hall_call,fs,n,i)]
1
hall_call
count(hall_call,fs)n fsn+1 i
©	
  Mohammed	
  Assiri	
  
Floors	
  staRsRcs	
  	
  {(floor,	
  Rmes)	
  |	
  floor	
  ∈	
  Range,	
  reputaRon	
  ∈	
  Z}	
  	
  
INT	
  List	
  	
  {	
  [x]	
  |	
  x	
  ∈	
  Z	
  }	
  	
  
v The Election Sub-model (2. Sorting The Floors)
Jun	
  1,	
  2015	
   58	
  
sorted
list
INT_List
1`[]
candidate
floors
Floors_Statistics
processed
call counter
INT
1`0
floors
statistics
Floors_Statistics
initialize_statistics()
Lock SysLock Sys
1`0
Sort Floors' Recursion
[sort_guard(n,fs)]
2
Sweepe Unelected
Floors
5
fs
fs
n
tlsort_recursion(fs,tl)
update_statistics(fs)
1i
fs
©	
  Mohammed	
  Assiri	
  
Floors	
  staRsRcs	
  	
  {(floor,	
  Rmes)	
  |	
  floor	
  ∈	
  Range,	
  reputaRon	
  ∈	
  Z}	
  	
  
INT	
  List	
  	
  {	
  [x]	
  |	
  x	
  ∈	
  Z	
  }	
  	
  
v  The Election Sub-model (3. Electing The Most Requested Floors)
Jun	
  1,	
  2015	
   59	
  
elected floor
counter
INT
1`1
sorted
list
INT_List
1`[]
candidate
floors
Floors_Statistics
elected floors
Out
Range
Elect Floor
[elect_guard(tl,n,fs)]
3
upd_efc(tl,n)
update_list(tl,n)
n
tl
(#floor fs)
fs
©	
  Mohammed	
  Assiri	
  
v The Assignment Sub-model
Jun	
  1,	
  2015	
   60	
  
elected
floor
Range
ID
INT
1`0
identified
floor
Identified_Floor
elected floors
In
Range
In
CarsCars
Cars
initialize_cars()
Lock SysLock Sys
INT
1`0
Lock Sys
Count Elected Floors
[count__guard()]
4
Assign ID to Floor
6
Alter Car's Parking Floor
[alter_guard(car,f)]
7
n
floor
assign
(n,floor)
floor
n-1
f
car
alter(car,f)
iunlock(i)
ii+1
nn+1
floor
Cars
©	
  Mohammed	
  Assiri	
  
v The Assignment Sub-model (1. Processing The Floors)
Jun	
  1,	
  2015	
   61	
  
elected
floor
ID
elected floors
In
Range
Count Elected Floors
Assign ID to Floor
n
floor
floor
n-1
nn+1
floor
Range
[count__guard()]
4
INT
1`0
6
©	
  Mohammed	
  Assiri	
  
v  The Assignment Sub-model (2. Altering the Cars’ Parking Floors)
Jun	
  1,	
  2015	
   62	
  
identified
floor
Identified_Floor
CarsCars
Cars
initialize_cars()
Lock SysLock Sys
INT
1`0
Assign ID to Floor
6
Alter Car's Parking Floor
[alter_guard(car,f)]
7
assign
(n,floor)
f
car
alter(car,f)
iunlock(i)
ii+1
©	
  Mohammed	
  Assiri	
  
IdenRfied	
  Floor	
  	
   {(floor	
  id,	
  floor’s	
  number)	
  |	
  floor	
  id	
  ∈	
  Car	
  ID,	
  floor’s	
  number	
  ∈	
  Range}	
  	
  
v The Position Sub-model
Jun	
  1,	
  2015	
   63	
  
scopes
req
times
Scope_Statistics
cmpl
nxt
cmpl
orders
cmpl
prv
elected floors
In
Range
new
position
Identified_Floor
CarsCars
Cars
Lock SysLock Sys
Identify Scope
Count Scope's
Elected Floors
Identify Next
Scope
Decide Position
Identify Previous
Scope
Alter Car's
Parking Floor
s
s
identify_prv(s,t)
identify(s,floor)
s
s
identify_nxt(s,t)
s
count_floors(s)
decide(s)
f
car alter(car,f)
iunlocksys(i)
ii+1
t
t
floor
s
re_initialize(i)
n
INT
1`0
[scope_guard(s,floor)]
4
Scope
initialize_scope()
[n<>0]
6
Scope
[prv_guard(s,t)]
7
Scope
[nxt_guard(s,t)]
8
Scope
9
In
[alter_guard(car,f)]
10
Cars
Lock Sys
initialize_cars()
©	
  Mohammed	
  Assiri	
  
v  The Position Sub-model (1. Identifying The Scope of Floors)
Jun	
  1,	
  2015	
   64	
  
scopes
elected floors
In
Range
Identify Scope
identify(s,floor)s
floor
[scope_guard(s,floor)]
4
Scope
initialize_scope()
©	
  Mohammed	
  Assiri	
  
Scope	
   {(scope	
  id,	
  prev,	
  next,	
  elected	
  floors)	
  |	
  scope	
  id	
  ∈	
  Car	
  ID,	
  prev	
  ∈	
  Z,	
  
next	
  ∈	
  Z,	
  elected	
  floors	
  ∈	
  INT	
  List}	
  	
  
v  The Position Sub-model (2. Completing The Information of Scopes)
Jun	
  1,	
  2015	
   65	
  
scopes
req
times
Scope_Statistics
cmpl
nxt
cmpl
orders
cmpl
prv
Lock SysLock Sys
Count Scope's
Elected Floors
Identify Next
Scope
Identify Previous
Scope
s
s
identify_prv(s,t)
s
s
identify_nxt(s,t)
count_floors(s)
t
t
n
INT
1`0
Scope
initialize_scope()
[n<>0]
6
Scope
[prv_guard(s,t)]
7
Scope
[nxt_guard(s,t)]
8
Scope
©	
  Mohammed	
  Assiri	
  
Scope	
  StaRsRcs	
  	
   {(scope	
  id,	
  floors’	
  number)	
  |	
  scope	
  id	
  ∈	
  Car	
  ID,	
  floors’	
  number	
  ∈	
  Z}	
  	
  
v  The Position Sub-model (3. Altering the Cars’ Parking Floors)
Jun	
  1,	
  2015	
   66	
  
new
position
Identified_Floor
CarsCars
Cars
Lock SysLock Sys
Decide Position
Alter Car's
Parking Floor
decide(s)
f
car alter(car,f)
iunlocksys(i)
ii+1
INT
1`0
9
[alter_guard(car,f)]
10
initialize_cars()
©	
  Mohammed	
  Assiri	
  
v  The Position Sub-model (3. Altering the Cars’ Parking Floors)
Jun	
  1,	
  2015	
   67	
  ©	
  Mohammed	
  Assiri	
  
The new parking floor of a scope is chosen according to the following rules:
1.  If the scope has many elected floors, then the floor of the highest reputation time
is selected.
2.  If the scope has only one elected floor, then this floor is selected.
3.  If the scope has no elected floors, then the head floor or the tail floor of the
scope is selected in account of elected floors of the lower and higher scopes.
v Introduction
v Reachability Analysis
v Simulation-based Performance Analysis
6.  The Analyses
Jun	
  1,	
  2015	
   68	
  ©	
  Mohammed	
  Assiri	
  
v Introduction
Jun	
  1,	
  2015	
   69	
  ©	
  Mohammed	
  Assiri	
  
•  Various techniques and tools [van der Aalst and Stahl (2011)* ].
•  Reachability analysis is executed by the State Space tool to construct a graph of
nodes and arcs, then report automatically some properties.
•  Simulation-based performance analysis is by executing the model constantly
while its data is being recorded, and then measured and compared.
•  By simulator tool of CPN Tools and monitors (data-collectors and controller
techniques)
* Modeling Business Processes: A Petri Net-Oriented Approach. The MIT Press
v Reachability Analysis
Jun	
  1,	
  2015	
   70	
  ©	
  Mohammed	
  Assiri	
  
A	
  ParRal	
  Report	
  
v  The Report of The Data-collector of
Simulation-based Performance Analysis
Jun	
  1,	
  2015	
   71	
  ©	
  Mohammed	
  Assiri	
  
v  The Comparison between Two Algorithm though
Simulation-based Performance Analysis.
Jun	
  1,	
  2015	
   72	
  ©	
  Mohammed	
  Assiri	
  
v Discussion
v Future Works
v Questions
7.  Conclusion
Jun	
  1,	
  2015	
   73	
  ©	
  Mohammed	
  Assiri	
  
v Future Works
Jun	
  1,	
  2015	
   74	
  ©	
  Mohammed	
  Assiri	
  
•  First, adopting more complex algorithms such as genetic algorithms.
•  Second, resolving the state space explosion problem.
•  Third, developing a Java-based extension that extracts and compares direct
data from the proposed model with instance support of charts.
ü  Questions
Jun	
  1,	
  2015	
   75	
  ©	
  Mohammed	
  Assiri	
  

More Related Content

PDF
Elevator system. a case study of coloured petri nets
PDF
Application Of The Three-In-One Control Platform Based On OPC In The Lifting-...
PPTX
Abstract Simulation Scenario Generation for Autonomous Vehicle Verification
PPT
Drawbot Final Presentation
PDF
Comp archch05l11multibusorgn
PPSX
Ds03 part i algorithms by jyoti lakhani
PDF
Modeling Elevator System With Coloured Petri Nets
PDF
[IJET-V1I5P12] Authors: Omkar Dhorge, ShantanuShamraj ,Sumedh Melkunde, Rohit...
Elevator system. a case study of coloured petri nets
Application Of The Three-In-One Control Platform Based On OPC In The Lifting-...
Abstract Simulation Scenario Generation for Autonomous Vehicle Verification
Drawbot Final Presentation
Comp archch05l11multibusorgn
Ds03 part i algorithms by jyoti lakhani
Modeling Elevator System With Coloured Petri Nets
[IJET-V1I5P12] Authors: Omkar Dhorge, ShantanuShamraj ,Sumedh Melkunde, Rohit...

Similar to Modeling Elevator System With Coloured Petri Nets (20)

DOCX
Reply 1 EMA model for Traffic managementTop of Fo
PPTX
A Star Heuristic Search
PDF
Real Time Parking Information Provider System on Android Phones
PDF
710201909
PDF
Verification of Autonomous Vehicles Through Simulation Using MATLAB ADAS Toolbox
PPTX
ConnectedAutomationToTRB2015
PPTX
Building a Data Analytics PaaS for Smart Cities
PPTX
B-12 Presentation.pptx
PPT
Machine Learning Approach to Report Prioritization with an ...
PDF
Deep Learning Approach Model for Vehicle Classification using Artificial Neur...
PPTX
PDF
The design of vertical transportation systems
DOC
A Computer Model for Selecting Equipment for Earthmoving Operations Using Sim...
PDF
Transit Tech Lab: Info session
PDF
IRJET- Toll Collection Automation
PDF
IRJET- Artificial Intelligence Based Smart Traffic Management System using Vi...
DOCX
Running head MOTION SENSOR SYSTEM IN PARKING LOTS AND GARAGES .docx
DOCX
Running head MOTION SENSOR SYSTEM IN PARKING LOTS AND GARAGES .docx
PDF
Major bank enterprise payment hub automation framework
PPTX
Introduction of vissim software
Reply 1 EMA model for Traffic managementTop of Fo
A Star Heuristic Search
Real Time Parking Information Provider System on Android Phones
710201909
Verification of Autonomous Vehicles Through Simulation Using MATLAB ADAS Toolbox
ConnectedAutomationToTRB2015
Building a Data Analytics PaaS for Smart Cities
B-12 Presentation.pptx
Machine Learning Approach to Report Prioritization with an ...
Deep Learning Approach Model for Vehicle Classification using Artificial Neur...
The design of vertical transportation systems
A Computer Model for Selecting Equipment for Earthmoving Operations Using Sim...
Transit Tech Lab: Info session
IRJET- Toll Collection Automation
IRJET- Artificial Intelligence Based Smart Traffic Management System using Vi...
Running head MOTION SENSOR SYSTEM IN PARKING LOTS AND GARAGES .docx
Running head MOTION SENSOR SYSTEM IN PARKING LOTS AND GARAGES .docx
Major bank enterprise payment hub automation framework
Introduction of vissim software
Ad

Recently uploaded (20)

PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Nekopoi APK 2025 free lastest update
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
assetexplorer- product-overview - presentation
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
AutoCAD Professional Crack 2025 With License Key
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms II-SECS-1021-03
Autodesk AutoCAD Crack Free Download 2025
Nekopoi APK 2025 free lastest update
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
iTop VPN Crack Latest Version Full Key 2025
Patient Appointment Booking in Odoo with online payment
Monitoring Stack: Grafana, Loki & Promtail
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
assetexplorer- product-overview - presentation
Navsoft: AI-Powered Business Solutions & Custom Software Development
Odoo Companies in India – Driving Business Transformation.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Download FL Studio Crack Latest version 2025 ?
Designing Intelligence for the Shop Floor.pdf
AutoCAD Professional Crack 2025 With License Key
Ad

Modeling Elevator System With Coloured Petri Nets

  • 1. MODELING  ELEVATOR  SYSTEM     WITH  COLOURED  PETRI  NETS     By  MOHAMMED  ASSIRI   Jun  1,  2015   1  ©  Mohammed  Assiri  
  • 2. 1.  Introduction 2.  Coloured Petri Nets 3.  The Abstract Version of CPN-based Modelling of Elevator System 4.  The Timing Version of CPN-based Modelling of Elevator System 5.  The Parking Optimizer Model 6.  The Analyses 7.  Conclusion Outline:   Jun  1,  2015   2  ©  Mohammed  Assiri  
  • 3. v Elevator Systems v The Objective v Related Works v The Contributions 1. Introduction : Jun  1,  2015   3  ©  Mohammed  Assiri  
  • 4. •  Integral Part Of Buildings •  Very Complex o  Controlling Multiple Elevators By A Centralized Control Mechanism o  The Differences Among Buildings And Traffic Patterns v Elevator Systems Jun  1,  2015   4  ©  Mohammed  Assiri  
  • 5. Proposing a model of elevator system that fulfillments the constraints of the following definition [Ghezzi et al. (2003)]*: An elevator system is to be installed in a building with m floors and n cars. The elevator and the control mechanisms are supplied by the manufacturer. The problem concerns the logistics of moving cars between floors according to the following : * Fundamentals of Software Engineering. Pearson Prentice Hall, 2nd edition. v The Objective Jun  1,  2015   5  ©  Mohammed  Assiri  
  • 6. a.  Each elevator’s car has a set of buttons - one for each floor. Pressing these buttons signals the elevator to move to the corresponding floor. b.  On the wall outside the elevator each floor has two buttons (with the exception of the ground and the top floors). One button is pressed to request an upward moving elevator and another button is pressed to request a downward moving elevator. If both buttons are pressed, then each direction is assigned to a different car. c.  When an elevator has not received any requests for service, it should be held at its parking floor with its doors closed until it receives further requests. d.  All requests for elevators from floors (i.e. hall calls) must be serviced eventually. The applied algorithm controls the priority of floors. All requests for floors within elevators (i.e. car calls) must be serviced eventually, with floors usually serviced sequentially in the direction of travel. e.  Each elevator’s car has an emergency button which when pressed causes an alarm. The elevator is then deemed "out of service". Each elevator has a mechanism to cancel its "out of service" status. v The Objective (Cont.) Jun  1,  2015   6  ©  Mohammed  Assiri  
  • 7. •  Elevator system is one of the software engineering benchmarks to test the expressive power, readability and convenience of various formal specification techniques [Ghezzi et al. (2003)] •  It has been modeled many times in past and that includes Petri Nets: 1.  Petri net based dynamic scheduling of an elevator system [Lin and Fu (1996)]. 2.  Dynamic scheduling of elevator systems over hybrid Petri net/rule modeling [Huang and Fu (1998)]. 3.  Timed Petri net based approach for elevator group controls [Cho et al. (1999)]. 4.  Abstract Petri net based approach to problem solving in real time applications [Etessami and Hura (1989)] 5.  Petri net-based modeling and control of the multi-elevator systems [Ahmad et al. (2014)] 6.  Simulation of the intelligent control circuit based on Petri net [Ye et al. (2011)]. 7.  Requirements Engineering for Reactive Systems: Coloured Petri Nets for an Elevator Controller [Fernandes et al. (2007)] 8.  Modeling and analysis of elevator system based on timed-Coloured Petri net [Liqian et al. (2004)] v Related Works Jun  1,  2015   7  ©  Mohammed  Assiri  
  • 8. •  The independence of the number of floors and cars. •  Covering different stages of the elevator system in substantial details. •  The flexibility to adapt different algorithms and rules that govern real elevator system. •  May eventually evolve in a standard formal model of the elevator system. v The Contributions Jun  1,  2015   8  ©  Mohammed  Assiri  
  • 9. v Overview v Definition v Computer Tools 2.  Coloured Petri Nets Jun  1,  2015   9  ©  Mohammed  Assiri  
  • 10. •  Coloured Petri Nets (CPN) [Jensen (1981)*] is an extension of Petri Nets. It is a graphical language for constructing models of concurrent systems and analyzing their properties. •  CPN combines the capabilities of Petri Nets (as a graphical language) with the capabilities of Standard ML (as a high-level programming language). (next slides) * Coloured Petri Nets and the Invariant Method, Theoretical Computer Science v Overview Jun  1,  2015   10  ©  Mohammed  Assiri  
  • 11. v The Structure of CPN-Based Model Jun  1,  2015   11   placetransition arc inscription colour set token colours [guards] priority value ©  Mohammed  Assiri  
  • 12. •  The CPN ML language is a flexible, expressive, and extensible language founded on the functional programming Language: Standard ML (SML/NJ implementation). •  By CPN ML language, the CPN-based models have not only types and inscriptions, but also colour sets, token colours, variable declarations, and functions. v  CPN ML Language (A High-level Programming Language) Jun  1,  2015   12  ©  Mohammed  Assiri  
  • 13. Structure    DefiniRons   v Demo Jun  1,  2015   13   unilluminated buttons Buttons 1`{floor_location=2,illumination=off}++ 1`{floor_location=3,illumination=off} unilluminate(button) button button illuminate(button) illuminated buttons 1`{floor_location=1,illumination=on} Buttons illuminate unilluminate ©  Mohammed  Assiri  
  • 14. •  Semi-formal definition: A Coloured Peter Net is a tuple : CPN = (P,T,A,Σ,C,N,E,G,I) •  For more details and theory of CPN, please refer to Coloured Petri Nets Modelling and Validation of Concurrent Systems by Jensen and Kristensen (2009) v Definition Jun  1,  2015   14  ©  Mohammed  Assiri  
  • 15. •  CPN Tools v.4.0 from AIS Group, Eindhoven University of Technology, The Netherlands. (www.cpntools.org) •  The CPN Tools is composed of a graphical editor, a state space tool, and a simulator. •  Visualization v.0.1 a visual aid was developed to observe the modeled system. v Computer Tools Jun  1,  2015   15  ©  Mohammed  Assiri  
  • 16. 3.  The Abstract Version of CPN-based Modelling of Elevator System Jun  1,  2015   16  ©  Mohammed  Assiri  
  • 17. v The Abstract Car-Structure Sub-model Jun  1,  2015   17   CarsCarsCars DatabaseDatabaseDatabase Database initialize_database() Cars initialize_cars() ©  Mohammed  Assiri  
  • 18. Colour  Sets     Defini1ons     Car  ID    {  i  |i  ∈  Z+  ∧  i  ≤  total  number  of  cars}     Range    {  r  |  r  ∈  Z+  ∧  lowest  floor  ≤  r  ≤  highest  floor}     Status    {  idle,  emergency,  out  of  service,  up,  down  }     Desired  Floors    {  [l]  |  l  ∈  Range}     Call  Issuer    {  request,  system,  non,  reservaRon}     Cars     {  (car  id,  current  floor,  status,  parking  floor,   desired  floors,  call  issuer)  |  car  id  ∈  Car  ID,   current  floor  ∈  Range,  status  ∈  Status,  parking   floor  ∈  Range,  desired  floors  ∈  Desired  Floors,   call  issuer  ∈  Call  Issuer}     v The Abstract Car-Structure Sub-model (Cont. 1) Jun  1,  2015   18  ©  Mohammed  Assiri  
  • 19. Colour  Sets     Defini1ons     Car  Info     {(current  floor,  status,  desRnaRons,  car  id)  |   current  floor  ∈  Range,  status  ∈  Status,   desRnaRons  ∈  Desired  Floors,  car  id  ∈  Car  ID}     Database    {[d]  |  d  ∈  Car  Info}     v The Abstract Car-Structure Sub-model (Cont. 2) Jun  1,  2015   19  ©  Mohammed  Assiri  
  • 20. Parameter     Legal  value   Cars’  number    {n  |  n  ∈  Z+}     Lowest  floor  number    {f  |  f  ∈  Z+  ∧  f  <  highest  floor}     Highest  floors  number    {h  |  h  ∈  Z+  ∧  lowest  floor  <  h}     v The Abstract Car-Structure Sub-model (Cont. 3) Jun  1,  2015   20  ©  Mohammed  Assiri  
  • 21. v The Abstract Hall-Call Sub-model Jun  1,  2015   21   counter selected floor's num requested call floor's number CarsCars DatabaseDatabasePrk SysPrk SysPrk Sys all floors' numbers watch generators log Release Random Number Release Assign Hall Call Assign Direction n rn_random() new_call new_call car hall_call snd_hcall (car,hall_call) n+1 i i-1 i i new_call hall_call i i+1 asn_dir(new_call) hall_call db upd_db (hall_call, db,car) INT 1`1 () Range Range selected_floor INT 1`1 Hall_Call Hall_Call [rn_guard(n,i)] [r_guard(i)] [asn_hcall_guard (hall_call,car,db)] Hall_Call Database Database initialize_database() initialize_cars() Cars Cars ©  Mohammed  Assiri  
  • 22. v The Abstract Hall-Call Sub-model (Cont. 1) Jun  1,  2015   22   requested call Hall_Call CarsCars initialize_cars() DatabaseDatabase initialize_database() Prk SysPrk Sys Hall_Call log Hall_Call Assign Hall Call [asn_hcall_guard (hall_call,car,db)] car hall_call snd_hcall (car,hall_call) hall_call hall_call db upd_db (hall_call, db,car) Hall  Call   {(hall  call  floor,  status)  |  hall  call  floor  ∈  Range,  status  ∈  Status}     ©  Mohammed  Assiri  
  • 23. v The Abstract Hall-Call Sub-model (Cont. 2) Jun  1,  2015   23   The Rules 1.  The selected car is either idle or travelling toward the direction of the hall call, 2. The selected car is not reserved, 3. The selected car is elected by the applied algorithm which could be the nearest-car algorithm , the minimum-waiting algorithm , or the scope algorithm . ©  Mohammed  Assiri  
  • 24. v The Abstract Hall-Call Sub-model (Cont. 3) Jun  1,  2015   24   •  The nearest-car algorithm [Barney (2003a)1]: 1.  Analysing the token of place Database. a.  The cars with proper status are extracted from the token. b.  The distances between hall-call floor and cars’ current floors are calculated. 2.  The hall call is assigned to the car with minimum distance to the hall call floor. •  The minimum waiting algorithm: 3.  Calculating the stop times consumed by the already placed and being served calls between the floor of the new hall call and each car’s current floor. 4.  The car with the expected minimum waiting-time is assigned to serve the new hall call •  The scope algorithm [Barney (2003b)2]: H ≤ A ≤ T. where: H = the head floor of car’s scope A = the answered hall-call floors T = the tail floor of car’s scope 1 Elevator Traffic Handbook: Theory and Practice. 2 VerRcal  transportaRon  in  tall  buildings.     ©  Mohammed  Assiri  
  • 25. v The Abstract Hall-Call Sub-model (Cont. 4) Jun  1,  2015   25   counter selected floor's num floor's number all floors' numbers watch generators Release Random Number Release n rn_random() new_call new_call n+1 i i INT 1`1 () Range Range selected_floor INT 1`1 [rn_guard(n,i)] [r_guard(i)] ©  Mohammed  Assiri  
  • 26. v The Abstract Hall-Call Sub-model (Cont. 5) Jun  1,  2015   26   Parameters   Legal  values     Producing  mode    {finite,  infinite}     Times  of  finite  hall  calls    {y  |  y  ∈  Z  ∧  0  ≤  y}     The  most  requested  floor    {r  |  r  ∈  Range}     DuplicaRon  of  most  requested  floor    {d  |  d  ∈  Z  ∧  0  ≤  d}     The  applied  algorithm    {minimum  waiRng,  nearest,  scope}     Producing’  pause  number∗    {p  |  p  ∈  Z  ∧  0  <  p}     ©  Mohammed  Assiri  
  • 27. v The Abstract Hall-Call Sub-model (Cont. 6) Jun  1,  2015   27   requested call floor's number Assign Direction new_call asn_dir(new_call) Range Hall_Call ©  Mohammed  Assiri  
  • 28. v The Abstract Hall-Call Sub-model (Cont. 7) Jun  1,  2015   28   •  If the produced number equates the highest floor, then it is associated restrictedly with the down direction, •  Else if the produced number equates the lowest floor, then it is associated restrictedly with up direction. •  Otherwise, a produced number is associated non-deterministically with up direction or down direction. ü  Thus, a hall call of a valid floor’s number and an appropriate direction is produced correctly and completely. ©  Mohammed  Assiri  
  • 29. v The Abstract Car-call Sub-model Jun  1,  2015   29   CarsCarsCars log car call all floors' numbers counter specific floors' num DatabaseDatabase watch generator Coordinate Release Floor's Number Reproduce archive(car,car_call, new_call,sf)car_callcar snd_ccall(car, new_call,sf) new_call rn_random() n+1 n sf place_calls (car,sf) db upd_db_ (new_call, db,car,sf) i+1 i i i-1 car_call reproduce(sf)sf car INT 1`1[rfn_guard(n,i)]() RangeINT 1`1 Specific_Floors initialize_sfloors() [rep_guard (sf,car,car_call)] 0Car_Calls initialize_log()initialize_cars() CarsDatabase initialize_database() [coord_guard(car_call,car,sf,new_call)] Database ©  Mohammed  Assiri  
  • 30. v The Abstract Car-call Sub-model (Cont. 1) Jun  1,  2015   30   CarsCars log car call specific floors' num DatabaseDatabase Coordinate archive(car,car_call, new_call,sf)car_callcar snd_ccall(car, new_call,sf) new_call sf place_calls (car,sf) db upd_db_ (new_call, db,car,sf) Range Specific_Floors initialize_sfloors() Car_Calls initialize_log()initialize_cars() CarsDatabase initialize_database() [coord_guard(car_call,car,sf,new_call)] ©  Mohammed  Assiri   Specific  Floors    {(car  id,  specific  calls,  repeated  Rmes)  |  car  id  ∈  Car  ID,  Specific   calls  ∈  Desired  Floors,  repeated  Rmes  ∈  Z}    
  • 31. v The Abstract Car-call Sub-model (Cont. 2) Jun  1,  2015   31   car call all floors' numbers counter watch generator Release Floor's Number rn_random() n+1 n i+1 i INT 1`1 [rfn_guard(n,i)]() RangeINT 1`1 ©  Mohammed  Assiri   specific floors' num Reproduce reproduce(sf)sf Specific_Floors initialize_sfloors() [rep_guard (sf,car,car_call)]
  • 32. v The Abstract Car-call Sub-model (Cont. 3) Jun  1,  2015   32  ©  Mohammed  Assiri   Parameters     Legal  values     Producing  mode    {finite,  infinite}     Times  of  finite  car  calls    {x  |  x  ∈  Z  ∧  0  ≤  x}     Most  desired  floors    {[f]  |  f  ∈  Range}     Frequency  of  desired  floors    {d  |  d  ∈  Z  ∧  0  ≤  d}     Producing  pause  number    {p  |  p  ∈  Z+  }    
  • 33. v The Abstract System-cycle Sub-model Jun  1,  2015   33   CarsCars Cars initialize_cars() Cars out of service Cars error log Cars DatabaseDatabase Database initialize_database() Databasesuccess log Cars Doors Doors initialize_doors () Database Database initialize_database() Database Maintain [mnt_guard(car)] 0 Restart [rst_guard(car)] Transfer [trn_guard(car)] Arrive [arr_guard(car,door)] suspend (car) car car car restart(car) car transfer(car) upd_trn(car,db) db cararrive(car) car doordoor upd_arr(car,db) db upd_susp (car,db) db db upd_rst (car,db) ©  Mohammed  Assiri  
  • 34. v  The Abstract System-cycle Sub-model (The Maintenance) Jun  1,  2015   34   CarsCars out of service error log Database Database Maintain Restart suspend (car) car car car restart(car) upd_susp (car,db) db db upd_rst (car,db) Cars initialize_cars() [rst_guard(car)] Cars initialize_database() [mnt_guard(car)] 0 Cars ©  Mohammed  Assiri   Parameter     Legal  value     Restart  pending  cars  automaRcally     {”yes”,”no”  }    
  • 35. v The Abstract System-cycle Sub-model (The Transition) Jun  1,  2015   35   CarsCars DatabaseDatabase Database Transfer car transfer(car) upd_trn(car,db) db Cars initialize_cars() [trn_guard(car)] initialize_database() ©  Mohammed  Assiri  
  • 36. v The Abstract System-cycle Sub-model (The Arrival) Jun  1,  2015   36   CarsCars Cars initialize_cars() DatabaseDatabase Database initialize_database() success log Cars Doors Doors initialize_doors () Arrive [arr_guard(car,door)] cararrive(car) car doordoor upd_arr(car,db) db ©  Mohammed  Assiri  
  • 37. 4.  The Timing Version of CPN-based Modelling of Elevator System Jun  1,  2015   37  ©  Mohammed  Assiri   •  The abstract version concerns the logical movement of elevator system. In contrast, the timing version extends the abstract version to include the illumination of buttons , the calculation of waiting and serving times, and the limiting of cars’ stops.
  • 38. v The Timing Car-Structure Sub-model Jun  1,  2015   38   CarsTiming Cars Timing_Cars initialize_tcars() DatabaseTiming Database Timing_Database initialize_tdatabase() Timing DatabaseTiming Cars ©  Mohammed  Assiri  
  • 39. Colour  Sets     Defini1ons     Car  ID     {  i  |i  ∈  Z+  ∧  i  ≤  total  number  of  cars}     Range     {  r  |  r  ∈  Z+  ∧  lowest  floor  ≤  r  ≤  highest  floor}     Status   {  up,  down,  emergency,  idle,  out  of  service}     Desired  Floors   {  [l]  |  l  ∈  Range}     Call  Issuer   {  request,  system,  non,  reservaRon}     INT   {n  |  n  ∈  Z}     REAL   {r  |  r  ∈  R}   Timing  Hall  Call   {(hall  call,  direc1on,  1me)  |  hall  call  ∈  Range,  direc1on  ∈  Status,     1me  ∈  R}     Timing  Hall  Calls   {[h]  |  h  ∈  Timing  Hall  Call}     Timing  Cars   {(car  id,  current  floor,  status,  parking  floor,  desired  floors,  call  issuer,   Rme  period,  served  hall  calls,  stops  limitaRon  )  |  car  id  ∈  Car  ID,   current  floor  ∈  Range,  status  ∈  Status,  parking  floor  ∈  Range,  desired   floors  ∈  Desired  Floors,  call  issuer  ∈  Call  Issuer,  Rme  period  ∈  REAL,   served  hall  calls  ∈  Timing  Hall  Calls,  stops  limitaRon  ∈  INT}     v The Timing Car-Structure Sub-model (Cont. 1) Jun  1,  2015   39  ©  Mohammed  Assiri  
  • 40. Parameter     Legal  value   Stops’  limitaRon    {s  |  s  ∈  Z+  ∧s=0  ∨  1  ≤  s}     v The Timing Car-Structure Sub-model (Cont. 2) Jun  1,  2015   40  ©  Mohammed  Assiri     (Pseudocode)     func%on  stops’  limita%on  value  ()  =                  if  the  parameter  "stops’  limita%on"  =  0  then    return  random(1,  floors’  number);   else    return  the  parameter  "stops’  limita%on";  
  • 41. Colour  Sets     Defini1ons     Timing  Car’s  Data     {(current  floor,  status,  desRnaRons,  car  id,   Rme)  |  current  floor  ∈  Range,  status  ∈   Status,  desRnaRons  ∈  Desired  Floors,  car  id   ∈  Car  ID,  Rme  ∈  REAL}     Timing  Database    {[g]  |  g  ∈  Timing  Carʹ′s  Data}     v The Timing Car-Structure Sub-model (Cont. 3) Jun  1,  2015   41  ©  Mohammed  Assiri  
  • 42. v The Timing Hall-Call Sub-model Jun  1,  2015   42   Prk Sys Hall_Call Prk Sys CarsTiming Cars Timing_Cars initialize_tcars() Coordinator Coordinator initialize_coordination() Hall's_Buttons Hall's_Buttons initialize_halls'_buttons() Hall's_Buttons Requested Hall Call Requested_Hall_Call DatabaseTiming Database Timing_Database initialize_tdatabase() Release Hall Call [releas_guard(HB,C)] Assign Hall Call [asn_guard(rhc,car,DB)] Cupd_coord(HB,C) illuminate_hall_btn(HB,C) carasn_hcall(car,rhc) (#hall_call rhc) rhc hall_call(HB,C,DB) released(C) C HB DB upd_asn (car,rhc,DB) DB DB Timing Cars Timing Database ©  Mohammed  Assiri  
  • 43. v The Timing Hall-Call Sub-model (Releasing Hall Calls) Jun  1,  2015   43   Coordinator Coordinator initialize_coordination() Hall's_Buttons Hall's_Buttons initialize_halls'_buttons() Requested Hall Call Requested_Hall_Call DatabaseTiming Database Timing_Database initialize_tdatabase() Release Hall Call [releas_guard(HB,C)] Cupd_coord(HB,C) illuminate_hall_btn(HB,C) hall_call(HB,C,DB) HB DB DB ©  Mohammed  Assiri   Colour  Sets     Defini1ons     Hall  Call     {(hall  call  floor,  status)  |  hall  call  floor  ∈  Range,  status  ∈  Status  }     Hall  Calls     {[h]  |  h  ∈  Hall  Call}     Hall  BuOons     {(IB,  USB,  UUB)  |  IB  ∈  Hall  Calls,  USB  ∈  Hall  Calls,  UUB  ∈  Hall  Calls}     Coordinator   {(specified  call,  unspecified  call,  next  selec1on,  released  calls)  |  specified   call  ∈  Z,  unspecified  call  ∈  Z,  next  selec1on  ∈  Z,  released  calls  ∈  Z}    
  • 44. v  The Timing Hall-Call Sub-model (Releasing Hall Calls Cont. 2) Jun  1,  2015   44  ©  Mohammed  Assiri   Rules: 1.  The unilluminated-specified buttons (USB) list and unilluminated-unspecified buttons (UUB) list are not both empty, 2.  If the limit of producing calls is finite, then it has been not already reached, 3.  The number of produced calls is less than the value of parameter pause number
  • 45. v  The Timing Hall-Call Sub-model (Releasing Hall Calls Cont. 3) Jun  1,  2015   45  ©  Mohammed  Assiri   The choice of either USB list or UUB list is based on the following rules: 1.  When a list is empty, the other list is always selected. 2.  The difference between both lists’ length is less or equal to the value of parameter “The frequency of most requested hall calls”. 3.  The internal choice between tuples is sequential in USB list and arbitrary in UUB list.
  • 46. v  The Timing Hall-Call Sub-model (Releasing Hall Calls Cont. 1) Jun  1,  2015   46  ©  Mohammed  Assiri   Parameters   Legal values   Producing mode   {finite, infinite}   Times of finite hall calls   {y | y ∈ Z ∧ 0 ≤ y}   The most requested hall calls   {[(floor number, direction)] | floor number ∈ Range, direction ∈ Status}   The frequency of most requested hall calls   {d | d ∈ Z ∧ 0 ≤ d}   The applied algorithm of hall calls   {minimum waiting,nearest, scope}   The travel time   {t | t ∈ R+}   The average time of stop   {s | s ∈ R+}   Pause number   {p | p ∈ Z+}  
  • 47. v The Timing Hall-Call Sub-model (Assigning Hall Calls) Jun  1,  2015   47   Prk Sys Hall_Call CarsTiming Cars Timing_Cars initialize_tcars() Coordinator Coordinator initialize_coordination() Requested Hall Call Requested_Hall_Call DatabaseTiming Database Timing_Database initialize_tdatabase() Assign Hall Call [asn_guard(rhc,car,DB)] carasn_hcall(car,rhc) (#hall_call rhc) rhc released(C) C DB upd_asn (car,rhc,DB) ©  Mohammed  Assiri   Car’s Time   {(car id, time) | car id ∈ Car ID, time ∈ R}   Cars’ Times   {[c] | c ∈ Car′s Time}   Requested Hall Call   {(hall call, waiting times) | hall call ∈ Hall Call, waiting times ∈ Cars’ Times}   Coordinator     {(specified  call,  unspecified  call,  next  selecRon,  released  calls)  |  specified  call  ∈  Z,   unspecified  call  ∈  Z,  next  selecRon  ∈  Z,  released  calls  ∈  Z}    
  • 48. v The Timing Car-Call Sub-model Jun  1,  2015   48   CarsTiming Cars Timing_Cars initialize_tcars() Calls_Counters Calls_Counters initialize_coord () DatabaseTiming Database Timing_Database initialize_tdatabase() Car's_ButtonsCar's_Buttons Car's_Buttons initialize_car's_buttons () Car's_Buttons Place Car Call [plc_gaurd(CB,CC,car) ] CCupd_ccoord(CB,CC) DBcarsnd_ccall(CB,CC,car) upd_db_(CB,CC,DB,car) CB illuminate_btn(CB,CC,car) Timing DatabaseTiming Cars ©  Mohammed  Assiri   Floors   {[f] | f ∈ Range}   Served Calls   {[(floor, time)] | floor ∈ Range, time ∈ R}   Cars’ Buttons   {(car id, ICB, USCB, UUCB) | car id ∈ Car ID, ICB ∈ Served calls, USCB ∈ Floors, UUCB ∈ Floors}   Calls’  Counters     {(specified call, unspecified call, next selection) | specified call ∈ Z, unspecified call ∈ Z, next selection ∈ Z}
  • 49. v The Timing Car-Call Sub-model (Cont. ) Jun  1,  2015   49  ©  Mohammed  Assiri   Parameters   Legal values   Producing mode  {finite, infinite}   Times of finite car calls  {y | y ∈ Z ∧ 0 ≤ y}   The most desired floors  {[f] | f ∈ Range}   The frequency of most desired floors  {d | d ∈ Z ∧ 0 ≤ d}  
  • 50. v The Timing System-cycle Sub-model Jun  1,  2015   50   CarsTiming Cars Timing_Cars initialize_tcars() Timing Cars out of service Timing_Cars DatabaseTiming Database Timing_Database initialize_tdatabase() Doors Doors initialize_counters () Database_Timing Database Timing_Database initialize_tdatabase() Car's_ButtonsCar's_Buttons Car's_Buttons initialize_car's_buttons () Car's_Buttons Hall's_ButtonsHall's_Buttons Hall's_Buttons initialize_halls'_buttons() Hall's_Buttons warning to manager Hall Call LOG Hall_Call_LOG Car Call LOG Car_Call_LOG initialize_car_call_log () Maintain [mnt_guard(car,c)] 0 Restart [rst_guard(car)] Transfer [trn_guard(car)] Arrive [arr_guard(CB,car,cnt)] suspend(car) car car restart(car) car transfer(car) upd_trn(car,DB) DB cararrive(car,cnt) upd_cnt(car,cnt) cnt upd_arr(car,DB) DB upd_susp(car,DB)DB DB upd_rst (car,DB) unilluminate_hall_btn (HB,car) HBCB unilluminate_btn (CB,car) reset_car's_btns(CB)CB return_hall_call (HB,car) HB log_hall(car) log_car(CB,CL,car)CL Timing Database Timing Database ©  Mohammed  Assiri  
  • 51. v  The Timing System-cycle Sub-model (Maintenance Stage) Jun  1,  2015   51   CarsTiming Cars Timing_Cars initialize_tcars() out of service Timing_Cars Database_Timing Database Timing_Database initialize_tdatabase() Car's_ButtonsCar's_Buttons Car's_Buttons initialize_car's_buttons () Hall's_ButtonsHall's_Buttons Hall's_Buttons initialize_halls'_buttons() warning to manager Maintain [mnt_guard(car,c)] 0 Restart [rst_guard(car)] suspend(car) car car restart(car) upd_susp(car,DB)DB DB upd_rst (car,DB) reset_car's_btns(CB)CB return_hall_call (HB,car) HB ©  Mohammed  Assiri  
  • 52. v The Timing System-cycle Sub-model (Arrival Stage) Jun  1,  2015   52   CarsTiming Cars Timing_Cars initialize_tcars() Doors Doors initialize_counters () Car's_ButtonsCar's_Buttons Car's_Buttons initialize_car's_buttons () Hall's_ButtonsHall's_Buttons Hall's_Buttons initialize_halls'_buttons() Hall Call LOG Hall_Call_LOG Car Call LOG Car_Call_LOG initialize_car_call_log () Arrive [arr_guard(CB,car,cnt)] cararrive(car,cnt) upd_cnt(car,cnt) cnt upd_arr(car,DB) DB unilluminate_hall_btn (HB,car) HBCB unilluminate_btn (CB,car) log_hall(car) log_car(CB,CL,car)CL ©  Mohammed  Assiri  
  • 53. v  The Timing System-cycle Sub-model (Arrival Stage Cont.) Jun  1,  2015   53   CarsTiming Cars Timing_Cars initialize_tcars() Doors Doors initialize_counters () Car's_ButtonsCar's_Buttons Car's_Buttons initialize_car's_buttons () Hall's_ButtonsHall's_Buttons Hall's_Buttons initialize_halls'_buttons() Hall Call LOG Hall_Call_LOG Car Call LOG Car_Call_LOG initialize_car_call_log () Arrive [arr_guard(CB,car,cnt)] cararrive(car,cnt) upd_cnt(car,cnt) cnt upd_arr(car,DB) DB unilluminate_hall_btn (HB,car) HBCB unilluminate_btn (CB,car) log_hall(car) log_car(CB,CL,car)CL ©  Mohammed  Assiri   Colour  Sets     Defini1ons     Doors     {(car  id,  current  delivery  number,  deliveries’  total)  |  car  id  ∈  Car  ID,   current  delivery  number  ∈  Z  ,  deliveries’  total  ∈  Z}     Hall  Call  LOG     {(hall  call,  waiRng  Rme)  |  hall  call  ∈  Hall  Call,  waiRng  Rme  ∈  R}     Serving  Rmes     {[(floor,  serving  Rme)]  min  floor  ∈  Range,  serving  Rme  ∈  R}     Car  Call  LOG     {(car  id,  serving  Rmes)  |  car  id  ∈  Car  ID,  serving  Rmes  ∈  Serving   Times}    
  • 54. 5.  The Parking Optimizer Model Jun  1,  2015   54   elected floors Range Position ModelPosition Sub-modelPosition Sub-model Election ModelElection Sub-modelElection Sub-model Assignment ModelAssignment Sub-modelAssignment Sub-model ©  Mohammed  Assiri  
  • 55. 5.  The Parking Optimizer Model (Cont. ) Jun  1,  2015   55  ©  Mohammed  Assiri   The initial value of the parking floor is calculated generally by: 1.  Floors′ Number = (highest floor − lowest floor ) + 1 2.  Scope = |floors′ number ÷ cars′ number| 3.  Scope Head = ((scope ∗ car id) − (scope − 1)) + (lowest floor′s − 1) 4.  Scope Tail = (scope ∗ car id) + (lowest floor − 1) ∴ Spot(car id) = scope′s head (car id)
  • 56. v The Election Sub-model Jun  1,  2015   56   elected floor counter INT 1`1 sorted list INT_List 1`[] candidate floors Floors_Statistics processed call counter INT 1`0 floors statistics Floors_Statistics initialize_statistics() Prk SysPrk Sys Hall_Call Prk Sys elected floors Out Range Out Lock SysLock Sys INT 1`0 Lock Sys Elect Floor [elect_guard(tl,n,fs)] 3 Sort Floors' Recursion [sort_guard(n,fs)] 2 Count Call [count_guard(hall_call,fs,n,i)] 1 Sweepe Unelected Floors 5 upd_pcc(n,i,tl) hall_call upd_efc(tl,n) fs fs n update_list(tl,n) n count(hall_call,fs) i tlsort_recursion(fs,tl) n fsn+1 tl update_statistics(fs) (#floor fs) i 1i fs fs ©  Mohammed  Assiri  
  • 57. v  The Election Sub-model (1. Counting The Placed Hall Calls) Jun  1,  2015   57   processed call counter INT 1`0 floors statistics Floors_Statistics initialize_statistics() Prk SysPrk Sys Hall_Call Lock SysLock Sys INT 1`0 Count Call [count_guard(hall_call,fs,n,i)] 1 hall_call count(hall_call,fs)n fsn+1 i ©  Mohammed  Assiri   Floors  staRsRcs    {(floor,  Rmes)  |  floor  ∈  Range,  reputaRon  ∈  Z}     INT  List    {  [x]  |  x  ∈  Z  }    
  • 58. v The Election Sub-model (2. Sorting The Floors) Jun  1,  2015   58   sorted list INT_List 1`[] candidate floors Floors_Statistics processed call counter INT 1`0 floors statistics Floors_Statistics initialize_statistics() Lock SysLock Sys 1`0 Sort Floors' Recursion [sort_guard(n,fs)] 2 Sweepe Unelected Floors 5 fs fs n tlsort_recursion(fs,tl) update_statistics(fs) 1i fs ©  Mohammed  Assiri   Floors  staRsRcs    {(floor,  Rmes)  |  floor  ∈  Range,  reputaRon  ∈  Z}     INT  List    {  [x]  |  x  ∈  Z  }    
  • 59. v  The Election Sub-model (3. Electing The Most Requested Floors) Jun  1,  2015   59   elected floor counter INT 1`1 sorted list INT_List 1`[] candidate floors Floors_Statistics elected floors Out Range Elect Floor [elect_guard(tl,n,fs)] 3 upd_efc(tl,n) update_list(tl,n) n tl (#floor fs) fs ©  Mohammed  Assiri  
  • 60. v The Assignment Sub-model Jun  1,  2015   60   elected floor Range ID INT 1`0 identified floor Identified_Floor elected floors In Range In CarsCars Cars initialize_cars() Lock SysLock Sys INT 1`0 Lock Sys Count Elected Floors [count__guard()] 4 Assign ID to Floor 6 Alter Car's Parking Floor [alter_guard(car,f)] 7 n floor assign (n,floor) floor n-1 f car alter(car,f) iunlock(i) ii+1 nn+1 floor Cars ©  Mohammed  Assiri  
  • 61. v The Assignment Sub-model (1. Processing The Floors) Jun  1,  2015   61   elected floor ID elected floors In Range Count Elected Floors Assign ID to Floor n floor floor n-1 nn+1 floor Range [count__guard()] 4 INT 1`0 6 ©  Mohammed  Assiri  
  • 62. v  The Assignment Sub-model (2. Altering the Cars’ Parking Floors) Jun  1,  2015   62   identified floor Identified_Floor CarsCars Cars initialize_cars() Lock SysLock Sys INT 1`0 Assign ID to Floor 6 Alter Car's Parking Floor [alter_guard(car,f)] 7 assign (n,floor) f car alter(car,f) iunlock(i) ii+1 ©  Mohammed  Assiri   IdenRfied  Floor     {(floor  id,  floor’s  number)  |  floor  id  ∈  Car  ID,  floor’s  number  ∈  Range}    
  • 63. v The Position Sub-model Jun  1,  2015   63   scopes req times Scope_Statistics cmpl nxt cmpl orders cmpl prv elected floors In Range new position Identified_Floor CarsCars Cars Lock SysLock Sys Identify Scope Count Scope's Elected Floors Identify Next Scope Decide Position Identify Previous Scope Alter Car's Parking Floor s s identify_prv(s,t) identify(s,floor) s s identify_nxt(s,t) s count_floors(s) decide(s) f car alter(car,f) iunlocksys(i) ii+1 t t floor s re_initialize(i) n INT 1`0 [scope_guard(s,floor)] 4 Scope initialize_scope() [n<>0] 6 Scope [prv_guard(s,t)] 7 Scope [nxt_guard(s,t)] 8 Scope 9 In [alter_guard(car,f)] 10 Cars Lock Sys initialize_cars() ©  Mohammed  Assiri  
  • 64. v  The Position Sub-model (1. Identifying The Scope of Floors) Jun  1,  2015   64   scopes elected floors In Range Identify Scope identify(s,floor)s floor [scope_guard(s,floor)] 4 Scope initialize_scope() ©  Mohammed  Assiri   Scope   {(scope  id,  prev,  next,  elected  floors)  |  scope  id  ∈  Car  ID,  prev  ∈  Z,   next  ∈  Z,  elected  floors  ∈  INT  List}    
  • 65. v  The Position Sub-model (2. Completing The Information of Scopes) Jun  1,  2015   65   scopes req times Scope_Statistics cmpl nxt cmpl orders cmpl prv Lock SysLock Sys Count Scope's Elected Floors Identify Next Scope Identify Previous Scope s s identify_prv(s,t) s s identify_nxt(s,t) count_floors(s) t t n INT 1`0 Scope initialize_scope() [n<>0] 6 Scope [prv_guard(s,t)] 7 Scope [nxt_guard(s,t)] 8 Scope ©  Mohammed  Assiri   Scope  StaRsRcs     {(scope  id,  floors’  number)  |  scope  id  ∈  Car  ID,  floors’  number  ∈  Z}    
  • 66. v  The Position Sub-model (3. Altering the Cars’ Parking Floors) Jun  1,  2015   66   new position Identified_Floor CarsCars Cars Lock SysLock Sys Decide Position Alter Car's Parking Floor decide(s) f car alter(car,f) iunlocksys(i) ii+1 INT 1`0 9 [alter_guard(car,f)] 10 initialize_cars() ©  Mohammed  Assiri  
  • 67. v  The Position Sub-model (3. Altering the Cars’ Parking Floors) Jun  1,  2015   67  ©  Mohammed  Assiri   The new parking floor of a scope is chosen according to the following rules: 1.  If the scope has many elected floors, then the floor of the highest reputation time is selected. 2.  If the scope has only one elected floor, then this floor is selected. 3.  If the scope has no elected floors, then the head floor or the tail floor of the scope is selected in account of elected floors of the lower and higher scopes.
  • 68. v Introduction v Reachability Analysis v Simulation-based Performance Analysis 6.  The Analyses Jun  1,  2015   68  ©  Mohammed  Assiri  
  • 69. v Introduction Jun  1,  2015   69  ©  Mohammed  Assiri   •  Various techniques and tools [van der Aalst and Stahl (2011)* ]. •  Reachability analysis is executed by the State Space tool to construct a graph of nodes and arcs, then report automatically some properties. •  Simulation-based performance analysis is by executing the model constantly while its data is being recorded, and then measured and compared. •  By simulator tool of CPN Tools and monitors (data-collectors and controller techniques) * Modeling Business Processes: A Petri Net-Oriented Approach. The MIT Press
  • 70. v Reachability Analysis Jun  1,  2015   70  ©  Mohammed  Assiri   A  ParRal  Report  
  • 71. v  The Report of The Data-collector of Simulation-based Performance Analysis Jun  1,  2015   71  ©  Mohammed  Assiri  
  • 72. v  The Comparison between Two Algorithm though Simulation-based Performance Analysis. Jun  1,  2015   72  ©  Mohammed  Assiri  
  • 74. v Future Works Jun  1,  2015   74  ©  Mohammed  Assiri   •  First, adopting more complex algorithms such as genetic algorithms. •  Second, resolving the state space explosion problem. •  Third, developing a Java-based extension that extracts and compares direct data from the proposed model with instance support of charts.
  • 75. ü  Questions Jun  1,  2015   75  ©  Mohammed  Assiri