Modelling CellDEVS applications - PowerPoint PPT Presentation

1 / 82
About This Presentation
Title:

Modelling CellDEVS applications

Description:

Prefer path with pheromone, detected w/antennae. Deposit pheromone on the floor when 'going home' ... They re-broadcast the message and set up a reverse path. ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 83
Provided by: gabriel65
Category:

less

Transcript and Presenter's Notes

Title: Modelling CellDEVS applications


1
Modelling Cell-DEVS applications
  • Cellular models implementation in CD

2
Nayfeh CA For Solving Mazes
  • Mazes described as a grid of walls and spaces
  • CA Rules
  • Wall cells always remain wall cells
  • Free cells become walls if surrounded by three
    walls (i.e., dead end)
  • Von-Neumann neighborhood

Becomes wall in 1st iteration
Becomes wall in 2nd iteration
Becomes wall in 3rd iteration
3
Cell-DEVS implementation
CD Implementation
Cell-DEVS Definition
  • CD lt X, Y, I, S, ?, N, d, dint, dext, t, ?, D gt
  • X Ø
  • Y Ø
  • S 0, 1
  • N neighborhood (-1,0), (0,-1), (0, 1), (1,
    0), (0,0)
  • d 100 ms
  • t N?S
  • S 1 if cell(0,0) 0 and of "wall neighbors
    3
  • S 0 if cell(0,0) 0 and of "wall neighbors
    lt3
  • S 1 if cell(0,0) 1
  • maze
  • type cell
  • dim (20, 20)
  • neighbors maze(-1,0)
  • neighbors maze(0,-1) maze(0,0) maze(0,1)
  • neighbors maze(1,0)
  • localtransition maze-rule
  • ()
  • maze-rule
  • rule 1 100 (0,0) 0 and (truecount 3 or
    truecount 4)
  • rule 0 100 (0,0) 0 and truecount lt 3
  • rule 1 100 t

4
Cell-DEVS results
(1) (2) (3)
  • Algorithm finds all potential solution paths
  • More processing needed if multiple paths exist
  • Empty output if no solution exists
  • Full knowledge of entire maze area required

5
Modeling Real Phenomena using Cell-DEVSVibrio
Parahaemolyticus bacteria
  • Marine germs
  • Transmitted to humans by consumption of raw or
    undercooked seafood
  • May cause gastroenteritis, wound or ear
    infections
  • Need a pH between 7.5 and 8.5 to survive
  • Need 20-30 mins to reproduce
  • Need 15ºC-43ºC to reproduce (optimal value 37ºC)
  • Die when exposed to gt60ºC for 10 mins
  • We analyze concentration of bacteria on the
    surface of a fish while temperature varies

6
Modeling Real Phenomena using Cell-DEVSVibrio
Parahaemolyticus bacteria (contd)
Temperature
Bacteria concentration
Fig. 3
Initial
After 1.5 hr
After 4 hrs
7
Modeling Real Phenomena using Cell-DEVSVibrio
Parahaemolyticus bacteria (contd)
  • CD definition of a DEVS model, which generates
    cold temperatures, and the cell space
  • Rules governing cell behavior are defined (not
    shown)
  • Two z-planes (1) temperatures, (2) bacteria
    concentration

top components contamination
Coldgenerator_at_Generator link
out_at_Coldgenerator inputCold_at_contamination   Col
dgenerator distribution exponential mean 3
initial 1   contamination type
cell dim (10, 10, 2) defaultDelayTime
100 neighbors (-1,-1,0) (-1,0,0) (-1,1,0)
(0,-1,0) ()
8
Modeling Real Phenomena using Cell-DEVSAnts
  • Goal Look for source of food return to anthill
  • A beautiful example of collective effort!
  • Behavior
  • Prefer path with pheromone, detected w/antennae
  • Deposit pheromone on the floor when going home
  • Avoid collision
  • We analyze the behavior of a colony of ants
    considering two sources of food and one anthill

9
Modeling Real Phenomena using Cell-DEVSAnts
(contd)
Ants seeking food
Ants found pheromone path
t1
t2
t3
t4
Fig. 4
Sources of food
Ants returning home
10
Modeling Real Phenomena using Cell-DEVSAnts
(contd)
  • Cell-DEVS model represents ground
  • Cell state codification, a particular cell
  • Has (or has not) an ant
  • If there is an ant DIRECTION (N, S, E, W) FOOD
  • Has a certain amount of pheromone
  • Has a certain amount of food

ant dim (20,20) neighbors (0,-2)
(-1,-1) (0,-1) rules rule (0,0) 2
1000 Macro(isAnt00) and Macro(dir00) 0 and
((Macro(isAnt19) and ) or (Macro(isAnt08) and
Macro(dir08) 2))
11
Ad-hoc Network simulations
  • Rapid diffusion of ad-hoc networking technologies
  • Wireless nodes (mobile or static) communicating
    with each other without an infrastructure.
  • Each node act as a router
  • Decentralized, with temporary interconnections,
    and arbitrary behavior of the nodes.
  • Simulation provides means to study network traffic

12
Some challenges
  • Routing algorithm for data transmission
  • between the nodes.
  • Some algorithms consider power a cost metric
    others, physical distance or shortest path
  • Routing algorithm must consider highly dynamic
    mobile nodes unreliable bandwidth-limited
    wireless links.
  • Different efforts based on Cellular Automata

13
Modeling Ad-hoc on Demand Distance Vector routing
  • AODV bi-directional links creates routes on
    demand.
  • A node needs to communicate broadcasts a Route
    Request message (RREQ) to its neighbors.
  • They re-broadcast the message and set up a
    reverse path.
  • When destination receives RREQ, it replies with
    Route Reply (RREP), which travels along
    reverse path set up by RREQ.

14
Modeling AODV routing
  • Network plane w/nodes spread at random.
  • No assumptions about physical location of nodes
    (each cell may represent different area size).
  • Data movement between two cells one hop.
  • Routing uses shortest hop count.
  • Each node communicate w/nodes to the N/S/E/W.
  • No nodes in neighbors dead cell (physical
    obstacles, absence of a communication link).
  • Assumption cost of communication between any
    two directly connected nodes is the same gt
    modeling AODV using Cell-DEVS involves finding
    shortest path between two nodes.

15
Modeling AODV routing
  • Variant of the classical Lees Algorithm.
  • S node D a destination black cells dead.
  • S broadcasts RREQ message to all its neighbors
    (wave nodes).
  • Wave nodes re-broadcast, and set up a reverse
    path to the sender.
  • Process continues until
  • message reaches
  • destination node D.
  • Shortest path selected

16
path type cell width 20 height 28
delay transport neighbors (-1,0) (0,-1)
(0,0) (0,1) (1,0) localtransition path-rule
border nowrapped   path-rule rule DR 100
(0,0) InitD and stateCount(PathU) gt 0 rule DR
100 (0,0) InitD and stateCount(PathD) gt
0 rule DR 100 (0,0) InitD and
stateCount(PathR) gt 0 rule DR 100 (0,0)
InitD and stateCount(PathL) gt 0 // RREQ message
sent // Current cell initial Cell up ready not
in the path rule WaveU 100 (0,0)Init
and(-1,0)gtDR and (-1,0)lt PathU rule WaveD 100
(0,0)Init and (1,0)gtDR and (1,0)ltPathU rule
WaveR 100 (0,0)Init and(0,1)gtDR and
(0,1)ltPathU rule WaveL 100 (0,0)Init
and(0,-1)gtDR and(0,-1)ltPathU // RREP // Current
cell initial Cell up ready not in the
path rule PathU 100 (0,0)WaveU and
stateCount(InitD) 1 rule PathD 100
(0,0)WaveD and stateCount(InitD) 1 rule
PathR 100 (0,0)WaveR and stateCount(InitD)
1 rule PathL 100 (0,0) WaveL and
stateCount(InitD) 1 rule PathU 100 (0,0)
WaveU and (0,-1) PathR
17
rule PathR 100 (0,0) WaveR and (0,-1)
PathR rule PathR 100 (0,0) WaveR and
(-1,0) PathD rule PathR 100 (0,0) WaveR
and (1,0) PathU rule PathL 100 (0,0)
WaveL and (0,1) PathL rule PathL 100 (0,0)
WaveL and (-1,0) PathD rule PathL 100
(0,0) WaveL and (1,0) PathU // Clear nodes
not in the shortest path rule clear 100 (0,0)
Init and stateCount(clear) gt 0 rule clear 100
(0,0)gtInitS and (0,0)ltPathU and
stateCount(clear) gt 0 rule clear 100
(0,0)gtInitS and (0,0)ltPathU and
stateCount(DR) gt 0 ... rule clear 100 (0,0) gt
InitS and (0,0) lt PathU and (0,-1)
gtWaveL and (0,-1)ltclear and (0,-1)!PathR rule
clear 100 (0,0) gt InitS and (0,0) lt PathU and
(0,1) gt WaveL and (0,1) lt clear and
(0,1)!PathL // Destination found rule found
100 (0,0)InitS and stateCount(PathU)gt0 rule
found 100 (0,0)InitS and stateCount(PathD)gt0 ru
le found 100 (0,0)InitS and stateCount(PathR)gt0
rule found 100 (0,0)InitS and
stateCount(PathL)gt0
18
Simulation results
19
Internetworking Routing
  • 3D Cell-DEVS model
  • Plane 1 wireless network, Plane 2 wired.

20
Optimal multicast trees
  • as the number of receiver and/or sender nodes on
    a plane increases, the number of states for
    each cell goes beyond practical limits
  • optimality (i.e., the
  • tree should duplicate
  • data as less as
  • possible)

21
Optimal multicast trees algorithm
  • Establish the shortest route as before.
  • All path nodes become tree nodes.
  • A new node wanting to join a multicast group
    broadcasts RREQ.
  • Path established between new node and nearest
    tree node (algorithm in step 1).
  • All non-optimal paths are purged.
  • Optimal path from new node to the tree gt this
    path becomes the tree.
  • For each subsequent node that wants to join a
    multicast group, steps 3 to 6 are repeated.

22
Model Specification
  • Cell-DEVS coupled model parameters
  • Cell-DEVS atomic models definition
  • Use the formal specification for each model
  • Definition of the local computing functions
    using a specification language.
  • Value Delay Condition
  • E.g.,
  • 0 1000 truecount() gt 3
  • 1 1000 truecount() lt 3

23
Simulation results
24
Modeling Mobile Nodes
  • Mobile nodes move in diagonal and bounce back
    when they reach to the edges of the plane.
  • Collision avoidance (reverse the direction of
    colliding mobile node).
  • There are both static and mobile nodes.
  • One or more gateways.
  • 20x20 cells, and the surrounding 25 cells will
    form the neighborhood.
  • mobilenode model implements all the desired
    behavior mobility, routing and coverage.

25
Model state variables
  • 0 (Empty)
  • 1 (Moves to SE)
  • 2 (Moves to NE)
  • 3 (Moves to SW)
  • 4 (Moves to NW)
  • 5 (Static Node)
  • 6 (Gateway)
  • 7 (within coverage)
  • 10 (1 hop)
  • 20 (2 hops)
  • 30 (3 hops)
  • 40 (4 hops)
  • 50 (5 hops)
  • 60 (cannot reach the gateway)

26
  • mobilenode
  • type cell width 20 length 20 height 3
  • delay transport border nowrapped
  • neighbors (-2,-2,0) (-2,-1,0) (-2,0,0) (-2,1,0)
  • ...
  • (0,1,-1) (0,2,-1) (1,-2,-1) (1,-1,-1) (1,0,-1)
    (1,1,-1) (1,2,-1) (2,-2,-1) (2,-1,-1) (2,0,-1)
    (2,1,-1) (2,2,-1)
  • zone cornerUL-rule (0,0)
  • zone cornerUR-rule (0,19)
  • zone cornerDL-rule (19,0)
  • zone cornerDR-rule (19,19)
  • zone top-rule (0,1)..(0,18)
  • zone bottom-rule (19,1)..(19,18)
  • zone left-rule (1,0)..(18,0)
  • zone right-rule (1,19)..(18,19)

27
mobility_CA-rule rule 1 1000 (0,0)4 and
((-1,-1)!0 or (-2,-2)1 or (-2,0)3 or
(0,-2)2) rule 4 1000 (0,0)1 and ((1,1) ! 0
or (0,2)3 or (2,2)4 or (2,0)2
) rule 3 1000 (0,0)2 and ((-1,1) ! 0 or
(-2,0)1 or (-2,2)3 or (0,2)4)
rule 2 1000 (0,0)3 and ((1,-1) ! 0 or
(2,-2)2 or (2,0)4 or
(0,-2)1) coverage-rule rule 7 1000
statecount(6) gt 0 rule 7 1000 statecount(10)
gt 0 rule 7 1000 statecount(20) gt 0 rule 7
1000 statecount(30) gt 0 rule 7 1000
statecount(40) gt 0 rule 0 1000
statecount(40)0 and statecount(30)0 and
statecount(20)0 and statecount(10)0 and
statecount(6) 0
28
Execution results
  • Static nodes and mobile nodes
  • 2 gateways, 22 static nodes, 4 mobile
  • mobility (to the left) and the hop count values
    (to the right).
  • Nodes within the neighborhood of gateways hop
    count 10. Then, all nodes within the
    neighborhood with value 10 set their value to 20,
    etc. At the fifth iteration, all nodes 5 hops
    away from the gateway set their values to 50.

29
Execution results

30
A Watershed formation model
  • Based on the original work by Moon, Zeigler, Ball
    and Guertin (1996).
  • Inertial delays to define different types of
    rain
  • Different delays used to show the influence of
    winds.
  • h altitude of a cell.
  • hi altitude of a neighbor
  • Si slope.

31
Watershed execution
Initial shape of the terrain
Terrain shape after rain
32
Modelling traffic models in ATLAS
33
Problem specification a city section
34
Problem definition
  • Traffic control and analysis problems
  • System complexity impossible to use analytical
    solutions
  • Microsimulations
  • Proposal based on cellular models
  • Discrete-event (improved performance)
  • Based on DEVS modelling formalism
  • Definition of a high-level specification language
  • Mapping into DEVS constructions
  • Avoide code writing high level model
    specifications
  • Detailed study of the microsimulations

35
Structure of ATLAS SW platform
36
Atlas constructions
  • Segments sections between two corners (one way
    segments) Segments (p1, p2, n, a, dir, max) /
    p1, p2 ? City ? n, max ? N ? a, dir ? 0,1 .
  • Crossings points in the plane connecting any
    number of segments

37
ATLAS constructions
  • RailNet Rail / Rail ? RailTrack , where
    RailTrack (s, d, seq) / s?Segments ? d?N ?
    seq?N
  • TLCrossings c / c ? Crossings
  • Tin s / s ? Segments ?
  • s (c1, c2, n, a, dir, max) ?
  • (c1 c ? dir 0 ) ? (c2 c ? dir 1)

38
ATLAS constructions
  • Jobsite (s, ni, d, n) / s ? Segments ?
  • s (c1, c2, n, a, dir, max) ? ni ? 0,
    n-1 ? d ? N ? n ? 1, n1-ni ? n ? 1
    mod 2
  • Control (s, t, d) / s ? Segments ? d ? N ? t
    ? bump, depression, school, pedestrian crossing,
    others

39
City Detail


c5
c1
rG
rA
rD
c2
c6
rI
rB
rH
rE
c3
rC
rF
c4
40
Map definitions
  • Crossings (examples)
  • c2 rA, rB, rD1, rD2 c3
    rB,rC
  • c6 rD1,rD2, rE, rG1, rG2, rH1, rH2, rI1, rI2
  • Road Sections
  • rA(0,0), (0,130), 1, 40, 0, 1
    rB(0,130), (0,200), 1, 40, 0, 1
  • rC(0,200), (0,300), 1, 40, 0, 1
  • rD1(0,130),(100,200),2,60,0, 1
    rD2(0,130),(100,200), 2, 60, 0, 0
  • rE(0,200), (100,200), 1, 40, 0, 0
    rF(0,300), (100,300), 1, 40, 0, 1
  • rG1(100,0),(100,130),4,60,0, 1
    rG2(100,0),(100,130),4,60,0, 0
  • rH1(100,130),(300,300),2,60,0,1
    rH2(100,130),(300,300),2,60,0,0
  • RailTrack
  • (rI1, 3, 1), (rI2, 5, 1), ...

41
Translation procedures
rB (0,130),(0,200),1,0,1,40 rB(k10,
max40 Km/h) lt Xlist, Ylist, I, X, Y, n,
t1,...,tn, h, N, C, B, Z gt lt (0,0),(0,9),
(0,0),(0,9), I, 0,1, 0,1, 1, t110, 3,
(0,-1),(0,0),(0,1), C, (0,0),(0,9), Z gt
42
Railtrack
43
Coupled model (segment rI1)
  • For every R ? RailNet station and TrainTrack
    models (ME and MR).
  • i.e., TrainTrack(8, Out) lt Xlist, Ylist, I, X,
    Y, n, t1,...,tn, h, N, C, B, Z, select gt
  • Every (s, d, seq) ? R generates the following
    influences IE MR , IR MrI1 . (rI1, 3,
    1)
  • ZE,R y-R-trainE Xh1(0,0)R
  • ZR,rI1 Yhj(0,1)R Xh3(j-1,3)rI1 ?j ? N, j ?
    1, 4
  • ZR,rI1 Yhnj(0,1)RXh3(j-1,4)rI1 ?j?N, j ? 1,
    4.

44
Crossing with traffic light
  • c6 ?TlCrossings
  • Sync(tl3) lt I, X, S, Y, dint, dext, l, D gt
  • 3 input segments for the crossing (Tin rG1,
    rH1, rD1 )
  • The synchronizer is in charge of changing between
    traffic lights in the corner.
  • Zsync,TLi (y-ligthi)sync (x-lighti)TLi, ? i?N,
    i?0,4
  • ZTli,s (y-s-lighth)Tli Xh2(h, k-1)s, ?(h?N,
    h?0, n-1) ? (s,j) ? In ? i ( (s,j) ?
    In / j lt j )

45
Men at work
46
Truck Segments
  • TruckSegments rG1, rG2, rD1, rD2

47
Definition of the cell-DEVS coupled model
  • SLrG1(20, 60, 4) lt Xlist, Ylist, I, X, Y, n,
    t1,...,tn, h, N, C, B, Z gt
  • Xlist Ylist (i,0) / i ? 0, 4 U (i,17)
    / i ? 0, 4
  • I ltPx, Pygt, with Px ltX?1(i,0), Ngt / i ?
    0, 4 U ltX?1(i,k-1), Ngt / i ? 0, 4 and Py
    ltY?1(i,0), Ngt / i ? 0, 4 U ltY?1(i,k-1),
    Ngt / i ? 0, 4.
  • X Y N
  • n 2 t1 4 t2 17
  • C Cij / i ? 0, 4-1 ? j ? 0, 17-1
  • B (i,j) / ? 0, 4-1 ? j ? 0, 5 U
    (i,j) / i ? 0, 4-1 ? j ? 17-2, 17-1 and
  • Z is built by following the definition for
    Cell-DEVS models.
  • The Border cells shrink/expand the trucks.

48
Truck Crossings
  • TruckXings c2, c6, ...
  • The rules for each cell should consider that
    there is space in the segment. A random number is
    used to define the vehicle routing.
  • Input cells Output cells

49
Coupled model for Crossing C6
  • TruckXingsC6(9, In, Out, Out_Cars,1, 30) lt
    Xlist, Ylist, I, X, Y, n, t1,...,tn, h, N, C,
    B, Z gt
  • Ylist Xlist (0,i) / i ? 0, 9
  • I ltPx, Pygt, PxltX?1(0,i),binarygt/i ?0,9,
    Py ltY?1(0,i),binarygt/i?0, 9.
  • X Y N n 1
    t1 9
  • C C0j / j ? 0, k-1 B ?
  • Z is built using the specification of Cell-DEVS
  • Ports-In-Out
  • I 1,2 I-C 5,6,7 InG1, H1
    In-CarsE1, D1, I1
  • O 3,4 O-C 8,9 OutG2,H2
    Out-CarsD2,I2

50
Structure of ATLAS SW platform
51
TSC constructions
  • Segments sections between two corners. begin
    segments and end segments. id p1, p2,
    lanes,shape,direction,speed,parkType, with
    shapecurvestraight,directiongoback
  • Parking border cells in a segment. parkType
    parkNoneparkLeftparkRightparkBoth
  • Crossings points where several segments
    intersect. begin crossings and end crossings. id
    p, speed, tLight, crossHole, pout
  • - Traffic lights qualifier added to a standard
    crossing definition tLight withTLwithoutTL.
  • - Railways sequence of level crossings
    overlapped with the city segments. begin railnets
    and end railnets act as separators. id (s1, d1)
    ,(si, di), si identifier of a segment crossed
    by the railway, di the distance to the segment
    si.

52
TSC constructions
  • - Men at work begin jobsites and end jobsites.
    Each jobsite is in t firstlane, distance,
    lanes.
  • - Traffic signs begin ctrElements and end
    ctrElements delimits the control elements in t
    ctrType, distance as the definition for each
    control sign. ctrType bump depression
    intersection saw stop school
  • Potholes.

53
Modelling example
54
TSC definitions
  • begin segments
  • t1(1,5),(1,1),2,straight,go,60, parkNone
  • t2(1,1),(5,1),2,straight,go,60, parkRight
  • t3(3,3),(5,1),1,straight,go,40, parkNone
  • t4(5,1),(10,1),1,straight,go,40, parkNone
  • t5(5,1),(8,4),1,curve,go,40, parkNone
  • t6(10,8),(10,1),2,straight,back,60, parkLeft
  • end segments
  • begin crossings
  • c1(1,1),20, withoutTL, withHole
  • c2(5,1),20, withTL, withoutHole
  • c3(10,1),30,withoutTL,withoutHole
  • end crossings
  • begin railnets
  • rn1 (t1,1),(t2,1),(t6,2)
  • end railnets
  • begin jobsites
  • in t1 1,2,1
  • end jobsites
  • begin holes
  • in t2 1,2
  • in t4 1,0
  • in t5 1,3
  • end holes
  • begin ctrElements
  • in t2 stop,0
  • in t4 school,2
  • end ctrElements

55
TSC structure
CodeStruct
Traffic
CodeGen
56
Translating to CD
  • TOP
  • components t1 t2 t3 t4 t5 t6 c1 c2 c3
  • components rn11_at_RailNet t2tl_at_TrafficLight
    t5Cons_at_Consumer t1Gen_at_Generator
  • components rn12_at_RailNet t6Cons_at_Consumer
    t3tl_at_TrafficLight t3Gen_at_Generator
  • components c2stl_at_SynchroTrafficLight
    rn1_at_SynchroRailNet rn10_at_RailNet
  • link y-t-train0bt_at_rn11 x-vt-train01_at_t2
  • ...
  • link y-vt-train2_at_rn1 x-if-train_at_rn12
  • ...
  • c3
  • type cell width 3
    height 1
  • delay transport border nowrapped
  • neighbors c3(0,-1) c3(0,0) c3(0,1)
  • in x-t-vehicle2 x-t-room0 x-t-room1 out
    y-t-room2 y-t-vehicle0 y-t-vehicle1
  • link x-t-vehicle2 x-t-vehicle_at_c3(0,2) link
    y-t-room_at_c3(0,2) y-t-room2
  • link x-t-room0 x-t-room_at_c3(0,0) link
    x-t-room1 x-t-room_at_c3(0,1)
  • link y-t-vehicle_at_c3(0,0) y-t-vehicle0 link
    y-t-vehicle_at_c3(0,1) y-t-vehicle1
  • localtransition c3-cellIn-rule

57
Modelling a city section
  • 24-line specification
  • 1000 lines of CD specifications automatically
  • generated

58
Structure of ATLAS SW platform
59
Describing a city section in MAPS
60
Defining a city section in MAPS
61
Exporting to TSC
62
Visualizing outputs
63
Fire spread model
In the domain

for an inert cell
?v ?v0 exp-?(t-tig)
for a burning cell
at the boundary
for the non burning cells at t 0
for the burning cells at t 0
64
Temperature curve of a point of the domain
C element has phases active, unburned, burning
and burned with corresponding sigmas of 0, 1, 1
and infinite.
65
Cell-DEVS application
?v ?v0 exp-?(t-tig)
Neighborhood list
66
Cell-DEVS application
include(rules.inc) top components
ForestFire ForestFire type cell dim
(100,100,2) delay transport defaultDelayTime
1 border nowrapped neighbors
ForestFire(-1,0,0) ForestFire(0,-1,0)
ForestFire(1,0,0) neighbors ForestFire(0,1,0)
ForestFire(0,0,0) ForestFire(0,0,-1)
ForestFire(0,0,1) initialValue
300.0 initialCellsValue init.val zone cst
(0,0,0)..(0,99,0) zone cst
(1,99,0)..(99,99,0) zone cst
(99,0,0)..(99,98,0) zone cst
(1,0,0)..(98,0,0) zone ti
(0,0,1)..(99,99,1) localTransition
FireBehavior
67
Cell-DEVS application
  ti rule time 0.01 1 (0,0,0) 1.0
AND (0,0,-1) gt 573 rule (0,0,0) 1 t
cst Constant border cells rule (0,0,0)
1 t FireBehavior  Unburned rule
macro(unburned) 1 (0,0,0) lt 573 AND (0,0,0)
! 209 AND ( macro(unburned) gt (0,0,0) OR time
lt 20 ) Burning rule macro(burning) 1
(0,0,0) ! 209 AND ( ( (0,0,0) gt
macro(burning) AND (0,0,0) gt 333) OR
(macro(burning) gt (0,0,0) AND (0,0,0) gt 573) )
Burned rule 209 1 (0,0,0) lt 333 AND
(0,0,0) ! 209 AND (0,0,0) gt macro(burning)
Stay Burned or constant rule (0,0,0) 1
t
68
Cell-DEVS application
rule macro(unburned) 1 (0,0,0) lt 573 AND
(0,0,0) ! 209 AND ( macro(unburned) gt (0,0,0)
OR time lt 20 )
rule 209 1 (0,0,0) lt 333 AND (0,0,0) !
209 AND (0,0,0) gt macro(burning)
69
(No Transcript)
70
Traditional Flow Injection Analysis (FIA)
  • Analytical methods for sample analysis
  • P pumps carrier solution A into valve I that
    connects to reactor R
  • By turning valve I, sample B is injected into R
  • Reactions in R between A and B are sensed by
    detector D

A FIA manifold. P pump A,B carrier and reagent
lines L sample injection I injection valve
R reactor coil D flow through detector W
waste line.
71
What happens inside the reactor?
  • Convective transport
  • Parabolic velocity profiles molecules in the
    center move
  • faster than those close to the walls
  • Radial diffusion
  • From highly concentrated areas near the walls
    to less concentrated areas near the center

72
Continuous flow monitoring
  • Traditional FIA one detector at the end of the
    reactor
  • Continuous flow monitoring (Iñon)
  • Two detection points A and B measure electricity
    conductance. Sample is water, which blocks
    electricity.
  • Restored conductivity ?

73
Modeling FIA using Cell-DEVS
  • Original model random walk difference
    equations. Difficulties in developing and
    maintaining the model. Execution speed problems.
  • Cell-DEVS more natural way to represent this
    behavior (half tube, assume symmetry)
  • Cells value concentration of cylindrical section
  • At time t0
  • Cells near the pump have concentration 0 (sample
    water)
  • Remaining cells concentration 0.8 ( carrier
    solution)
  • Transition rules
  • 1. Convection rule each row of cells has a
    different time delay, creating parabolic profile.
  • - 2. Diffusion rule Simulates radial diffusion.

74
Modeling FIA using Cell-DEVS
00 Top 01 components fia generator_at_ConstGener
ator 02 link out_at_generator diffuse_at_fia 03 04
generator 05 frequency 000000014
Generator (triggers diffusion rule)
Triggeringevent
05 fia 06 in diffuse 07 width 200 08
height 25 09 delay inertial 10 border
nowrapped 11 neighbors fia(-1,-1) fia(-1,0)
fia(-1,1) 12 neighbors fia(0,-1) fia(0,0)
fia(0,1) 13 neighbors fia(1,-1) fia(1,0)
fia(1,1) 14 localtransition convection
75
Rules
  • Convection rule

Value (0,-1) //The cells left
neighbor Delay 0.1 / (22.57878 ( 1 - power(
cellPos(0) 0.001 0.0005, 2) / 0.000625))
1000 Condition cellPos(1) ! 0 //Not a
border cell
The delay depends on the row! One simple
expression for convective transport
  • Diffusion rule

Value ((-1,0) (0,0) (1,0)) / 3
//Column average Delay 1 //(1 ms) Condition
cellPos(0) ! 0 AND cellPos(0) ! 24 //Not a
border cell Border cells are analogous, just
average 2 cells instead of 3.
76
Results
  • Execution stages

Restored conductivity (simulated)
  • Differences due to
  • - Model size accurate simulation requires models
    with higher levels of resolution. Larger number
    of cells, reduce activation times for diffusion
    rule.
  • Improvements
  • - Parallel simulation (no changes in the model
    needed).
  • - 5x speedups

77
Geometry translations
  • Different cellular model make use of different
    topologies. The most used types include
  • Rectangular
  • Pros Simple representation and visualization
  • Cons insufficient isotropy
  • Triangular
  • Pro reduced number of neighbors
  • Cons difficulties to represent and visualize
    models
  • Hexagonal
  • Pros high isotropy
  • Cons difficult to represent and visualize

78
Geometry Translations (cont.)
  • Tools to map the behavior of cells with square
    geometry
  • Mapping function from hexagonal to rectangular
  • Mapping function from triangular to rectangular

79
Translation into hexagonal meshes
  • Specification language extended to include
    triangular and hexagonal meshes. New neighbor
    referencing.
  • All CD functions can be used
  • Original border definition can be used
  • Translator external to the tool.

Rule 1 10 31 and statecount(9.99)3 Rule
1 10 (((0,1)1) and (if((statecount(9.99)-(if((-1
,1)9.99,1,0))-if((1,1)9.99,1,0))) lt 0,0,
(statecount(9.99) - (if((-1,1)9.99,1,0))-(if((1,1
)9.99,1,0))))3)) and even(cellpos(1)) Rule 1
10 (((0,1)1) and (if((statecount(9.99)-(if((-1,-
1)9.99,1,0))-(if((1,-1)9.99,1,0))) lt 0,0,
(statecount(9.99)-(if((-1,-1)9.99,1,0))-(if((1,-1
)9.99,1,0))))3)) and odd(cellpos(1))
80
Translation into hexagonal meshes
rule 1 100 0 1 and truecount 5   rule
1 100 even(cellpos(0)) and (0,0) 1 and
(truecount-(-1,1)-(1,1)) 5 rule 1 100
odd(cellpos(0) and (0,0) 1 and
(truecount-(-1,-1)-(1,-1)) 5)
81
Translation into triangular meshes
rule 1 100 2 0 and truecount 3 rule
1 100 (0,-1) 0 and odd(cellpos(0)cell
pos(1)) and (truecount-(-1,-1)-(-1,1)-
(1,-1)-(1,0)-(1,1) ) 3
82
Models using Margolus neighborhood
  • Based on partitioned CAs
  • Grid is divided in a finite, disjoint and uniform
    set of blocks.
  • Tule for the blocks defined using values of cells
    in the block. Cells updated in blocks.
  • Blocks do not overlap no information interchange
    between adjacent blocks.
  • Partitioning of grid changed in every step

83
Particle collision using the Margolus
neighborhood (cont.)
  • Generally used in reversible physical models.
  • Model defines uniform mechanism for uniform
    movement of particles.
  • Particles with identical mass and kinetic energy,
    move at same speed.

rule (1,1,0) 100 cellpos(2)0 and (
even(cellpos(0)) and even(cellpos(1) and
(0,0,1)0) or (odd(cellpos(0) and
odd(cellpos(1) and (0,0,1)1) ) rule
(1,-1,0) 100 cellpos(2)0 and (
(even(cellpos(0)) and odd(cellpos(1)) and
(0,0,1)0) or (odd(cellpos(0)) and
even(cellpos(1)) and (0,0,1)1))
Write a Comment
User Comments (0)
About PowerShow.com