Modelado de Sistemas con Redes de Petri 3-LNS
Dr. Emmanuel López-NeriCentro de Investigación, Innovación y Desarrollo
Tecnológico
2
Resumen
La finalidad de esta presentación es proporcionar los fundamentos de las redes de Petri de tres niveles para su aplicación al modelado y análisis de sistemas de eventos discretos.
Se presentan los conceptos básicos de modelado.
Contenido
1. Sistemas de Eventos Discretos
2. Redes de Petri
3. Modelado de Sistemas
4. Extensiones PN (3-LNS)
5. Tráfico Urbano Modelado con 3-LNS
6. Sistemas Multi-agentes modelado con 3-LNS
4
1.1 Discrete event systems (DES)
The behavior is characterized by a sequence finite or infinite of states delimited by asynchronous events
Almost all DES are man made:-computer systems (operating, communication, data processing systems)-discrete production systems (manufacturing systems)
Some continuous systems can be dealt as DES if it is considered as events,-thresholds of continuous variables-the beginning and ending of the subsystem operation
Time
States
X1
X2
X3
X4
X5
X6
5
1.2 Modeling Formalisms
Importance of modeling
System development life cycle
MODEL VALIDATION
- Simulation- Formal tests(verification ofproperties
Adjustments
Requirements
SYSTEM
description(modeling)
implementation
6
Modeling formalismsCommon language
• Allows communication• Avoids ambiguities
Welcomed features Clearness Ability to describe
- States - Resource management- Events - Concurrency- Synchronization - Cyclic behavior- Decision
Compactness Simple mathematical support Analysis techniques
7
2 Petri net Basics
2.1 Net systems2.2 Modeling examples2.3 Properties of PN2.4 Analysis techniques
8
2.1 Net Systems2.1.1 THE NOTION OF PETRI NETS (PN)
A Petri net consists of :
- A net structure: a bipartite digraph
- A state description:the marking
- A transition rule: the token game
9
Components
PN structureBipartite digraph:Two kind of vertex:
- places: circles- transitions: bars or rectangles
(Weighted) directed arcs: (labeled) arrows
t5
p1 p2 p3
p4 p5 p6
t1
t2
t4
t3
10
Components
PN markingDistribution of marks or tokens (dots) into the places (notion of state in finite state machines)
- Initial marking: initial token allocation
Input/Output Places. The places whose arcs lead to (issue from) atransition tj are called input (output) places of tj.Notation. input places tj ,output places tj
pi
11
Components
Token evolution a two-part transition firing rule:- Enabled transition:
the input places must have at least as many tokens as the weight of the input arcs
- Transition firing: a) remove tokens of the input places (indicated by the weight of
the input arcs)b) add tokens to the output places (indicated by the weight of the output arcs)
2
t
12
Components
Token evolution a two-part transition rule:- Enabled transition:
the input places must have at least as many tokens as the weight of the input arcs
- Transition firing: a) remove tokens of the input places (indicated by the weight of
the input arcs)b) add tokens to the output places (indicated by the weight of the output arcs)
2
t
13
2.2 Modeling examples
2.2.1 INTERPRETED PETRI NETS (IPN)
Interpretation: to give a meaning to the elements of a
PN according to a given context.
- Places: resources, operations, partial states, buffers, mailboxes, ...
- Transitions: events, activities, conditions, ...
- Tokens: commands, parts, messages, ...
14
INTERPRETED PETRI NETS
Interpreted PN: associates
- inputs to the transitions
- outputs to the places
SYSTEM
Inputs
Output
s
15
2.2.2 INTRODUCTORY EXAMPLES
Two synchronized processes
Sequence:- The cars start (authorized by M)
simultaneously to the right;
- when end position is reached
the cars inverse its motion.
- When the initial position is
detected, every car stops.
- A new cycle starts when both
cars are stopped
abcdM
L1R1
L2R2
16
Two synchronized processes
t5
p1 p2 p3
p4 p5 p6
t1
t2
t4
t3R1
R2
L1
L2
M
ab
d c
17
Three processes
Sequence-Cars 1 and 2: the first one arriving to the right position waits to the other one to start the return together
-Car 3: independent cycle
M
I1 D1
a b1
I2 D2
c d2
I3 D3
e f3
M
D1 D2 D3
b d f
I1 I2 I3
a c e
18
State machine
D1,D2,D3 D1,D3
D1,D2,I3
D2,D3
b
d
f
I1,I2,D3
D2,I3
D1,I3
D1,D2e
d
f
b
d
a
I2,D3
I1,D3
I1,I2,I3
I1,I2
D2
D1
f
c
d
eb
e
b
d
d
b
I1,I3
I2,I3
D3c
f
a
f
Ma
c
e
1 2 1
2
I3
I1
I2
e.M
c.M
a.M
f
c
a
e
c
a
e.M
c.M
a.M
b
cm,a,c,e
f
f
f
d,b
b,d,f,
b,d
19
3 Modeling of Systems
3.1 Examples of DES models3.2 Modeling techniques
Curso COSNET 2002ESPECIFICACION Y ANALISIS FORMALES
DE SISTEMAS CON REDES DE PETRI
20
3.1 Examples of DES models
3.1.1 Typical structures Simple sequences
• • •
• • •
• • •
21
Typical structures ...
Parallel processes
• • •
• • •
• • •
Producer- Consumer (unbounded buffer)
• • •
• • •
cap
process 1
process 2
ta
tb
pa
pb
pc
tc
22
Typical structures ... Master - Slave
Resource Management
• • •
• • •
process 2
process 1
pc
tc
pb
pata
tb pd
process 1
process 2
ta
tb
pa
pb
pr
•
•
•
writers
readers
ta
tb
pa
pb
pr
•
n
n
n n
mutual exclusion one kind multiple resources
– single resource – reader / writers
23
Resource Management
ta tbpa pb
pr
••
•
- multiple processes; shared
resources: Philosophers problem
- sequential mutual exclusion
M1
T1 T5
T4
T3
T2
A1
M2
M3 M4
M5
A2
A3 A4
A5
24
3.1.2 Models of buffers Bounded buffer Two producers , Two kindwith capacity C two consumers of products
te
p1
ts
pcap Cpcap
p1
ts1te1
te2 ts2
C
FIFO buffer
tea
pcap
pa
pb
C
teb tsb
tsa
te ts
pnp1
•
p2
• •
• • •
t1 t2 tn-1
teb
pbnpb1
•
pb2
• •
• • •
t1b t2b tn-1b
tea
panpa1 pa2• • •
t1a t2a tn-1a tsa
tsb
FIFO buffer (two kind of products)
25
Models of buffers
te
p1
•
te1
p1
•
p2
•
pn
•
p3
•
• •
•
•
•
•
•
•
•
•
•
te2
te3
ten
ts1
ts2
ts3
tsn
Circular FIFO buffer LIFO buffer
•
•
•
•
•
•
p1
p2
p3
pn
te1 ts1
te2 ts2
te3 ts3
ten tsn
•
3.1.3 Models of miscellaneous DES
Chemical Batch Process
Product 1: A R1; B R1;Reaction;Discharge
Product 2: C R2;B R2;A R2;
Reaction;Discharge
27
Chemical Batch Process
A-R1
B-R1
Reacc 1
Desc 1
C-R2
B-R2
A-R2
Reacc 2
Desc 2
A disp
B disp
R1 vacio R2 vacio- PN model
28
A simple communication protocol
p1
p2
p3 p4
p5
p6 p7p8
t1
t2
t3t4
t5 t6
• •
Job Shop – routing and sequencing
M1 M2A1 A2 A3
Oper22
NP1
NP2
Oper12
Oper11 Oper21
• •
29
Traffic control
asd asd
TA TB
V0 V1 V2
V3V4V5
V6
•
•
• • •
V0 V1 V2 V3 V4 V5 V6 V0
T A0 T A1 T A2 T A3 T A4 T A5
T B0 T B1 T B2 T B3 T B4 T B5 T B6
T A6
30
4 PN extensions
4.1 Timed PN4.2 Coloured PN4.3 n-LNS (Hierarchical nets)
Curso COSNET 2002ESPECIFICACION Y ANALISIS FORMALES
DE SISTEMAS CON REDES DE PETRI
4.3 n-LNS Formalism
a
NET1
NET4(2)
NET3(1)
b
NET2(1
)
b a
NET4(1)
b
c2
c1 c3
c1
c2
c2
a
a, c
NET3(2)
NET2(2)
c
c NET3(3)
NET4(3)
NET3(4)
a
c3
c2
c2
c1
c3
x, y
x
.
.
.
x
y
.
.
.
y
x
<lab>
<lab><lab>
<lab>
<lab><lab><lab>
<lab>
<lab><lab>
<lab>
4.3 n-LNS Formalism
5. Sistema de Tráfico UrbanoModelado con PN 3-LNS.
5.1 Urban Traffic System(UTS)
Políticas de Tránsito y
Estrategias de Control MAX
50
INPUTS
Urban Traffic control
OUTS
Density
Flow
Average
Velocity
Travel Time
Average
Length
Queue
Level 3
Level 2
Level 1Street Network, Static Informative Objects
Intelligent Entities
Activities, Proccess,
Skills
MAX
50
5.2 UTS Hierarchical Functional Levels
5.2 Elementos del Modelo: SegmentoNivel 1
Red Vial, Objetos de Información estáticos
MAX
50Obji = (typei, valuei, wi)
(Oi, typeSi, ai, bi)
s1
si=
s2s5
s4s3
s6
s8 s9
s11 s12
s10
s7
Descripción de Segmento
5.2 Elementos del Modelo: SegmentoNivel 1
Red Vial, Objetos de Información estáticos
MAX
50Obji = (typei, valuei, wi)
(Oi, typeSi, ai, bi)
s1
si=
s2s5
s4s3
s6
s9
s11 s12
s10
s7
Descripción de Segmento
t4,3
t3,4
t3,2
t2,3
t0,3 t3,0
t3,6t6,3
p3
5.2 Elementos del Modelo: SegmentoNivel 1
Red Vial, Objetos de Información estáticos
MAX
50Obji = (typei, valuei, wi)
(Oi, typeSi, ai, bi)
s1
si=
s2s5
s3
s6
s8 s9
s11 s12
s10
s7
Descripción de Segmento
t11,7
t10,11
t11,10
p11
t7,11
39
( Environment net of type typeUrban1,1 )
Hidalgo_W
Alcalde_N
Hidalgo_EHidalgo_Alcalde
Alcalde_S
t6
t5
t2
t1
t4
t3
{t4}={cis4}
[cis3 ↓yi]
{t1}={ce}
{t5}={nci}
(Hidalgo_W)
(Alcalde_N)
(Hidalgo_E)
(Alcalde_S)
{t6}={nci}
{t2}={ce}
{t3}={cis3}
[nci↓x+yi][nci
↓x]
[nci↓x+yi]
[nci↓x]
[ce↓yi] [ce↓
yi]
[ce↓yi]
[ce↓yi]
[cis3 ↓yi]
[cis4 ↓yi]
[cis4 ↓yi]
(Hidalgo_Alcalde)
5.3. UTN modeled with 3-LNS.
{t1}={t2}={ce} {t4}={cis4}
{t3}={cis3} {t5}= {t6} = {nci}
(Hidalgo_W) = (Alcalde_N) =
(Hidalgo_E) =
(Hidalgo_Alcalde) =
(Alcalde_S) =
{ typeStreet2,1,typeCar2,1}.
Hidalgo_W
Hidalgo_E
Alc
ald
e_
N
Alc
ald
e_
S
((Hidalgo_W,t1), ce↓) = ((Alcalde_N,t2), ce↓) =
((Alcalde_S,t4), cis4↓) = ((Alcalde_S,t3), cis3↓)
= ((t1,Alcalde_S), ce↓) = ((t2,Alcalde_S), ce↓)
= ((t3,Hidalgo_E), cis3↓) =
((t4,Hidalgo_Alcalde), cis4↓) = yi
((t5,Hidalgo_W), nci↓) = ((t6,Alcalde_N), nci↓) =
x+yi
((Hidalgo_W,t5), nci↓) = ((Alcalde_N,t6), nci↓) =
x .
Net type typeCar2,2Net type typeStreet2,1
Nivel 2
Entidades
Inteligentes
5.4 Elementos del Modelo: EntityNET2,1
ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
t10t11
5.4 Elementos del Modelo: ProcessNET3,1
initArrivalSegment,
initSenseAdvancing,
initLeaveSegment,
initChangeLane
initArrivalLane
updatedProcess
t1
initSenseStopped
updatedProcess
t2
initStart,
initChangeLane
t3
initStop
t4
STOPPED
p2
ADVANCINGp1
entityi
entityi = (ATTRi, PARAMi, knowledgeBasei)
ProcessNET3,1
ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
Nivel 3
Actividades,
Habilidades,
Procesos
5.6 Elementos del Modelo: SkillFreeFollowNET3,11
t6
p4
(t6)={initSenseAdvancing≡}(t5)={initSenseStopped≡}
t5
p6
(t8) ={newStart↑}
t8
p7
t9
(t9)={newSenseAdvancing↑}
φ(t2)={searchObstacle}
p3
NO_OBSTACLE
t2t1
λ(t1)={useSkillFreeFlow↑}
p1
λ(t10)={updatedProcess↑≡}
λ(t11)={unUsedSkill↑}t11
p9
λ(t7)={useSkillCarFollowing↑}
t3 t4
OBSTACLE
p2
p5
p8
t10
t7
SkillFreeFollowNET3,11
φ:T→2LABELi,k
Mecanismo de toma
de decisión
asociado
ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
Nivel 3
Actividades,
Habilidades,
Procesos
5.7 Elementos del Modelo: SkillCarFollowingNET3,11
p2
t3
φ(t2)={evalStop}
p8
p6
φ(t5)={evalSafeBreak}
t1
λ(t1)={useSkillCarFollowing↑}
p1
NO_STOPSTOP
SAFE
NO_CHANGE
λ(t19)={updatedProcess,↑≡}
λ(t22)={unUsedSkill↑}
t19
p17
(t11)={newStop↑}
(t15)={newSenseStop, ↑}
(t12)={newCrash↑}
(t16)={newSenseCrash↑}
φ(t6)={evalChangeLane}
φ(t13)={evalSafeBreak}
SAFE
t21
p16(t20)={initSenseStopped≡}
t20
p18(t23)={newStart↑}
t23
p19
t24
(t24)={newSenseAdvancing↑}
(t21)={initSenseAdvancing≡}
λ(t14)={useSkillChangeLane↑}
CHANGE
t2
t4
p5p4
t6t5
NO_SAFE
p15
p12
t22
t15
t11
t7 t8
t9 t10
t12
t13
t14t16 t17
t18
p3
p7
p9
p10 p11
p13 p14
φ:T→2LABELi,k
Mecanismo de toma
de decisión
asociado
SkillCarFollowingNET3,11ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
Nivel 3
Actividades,
Habilidades,
Procesos
t2
φ(t2)={gapAcceptance}
p2 p3t1
λ(t1)={useSkillChangeLane↑}
NO_GAP
NO_SAFE_GAP
SAFE_GAP
p1
λ(t4)={initSenseStopped≡}
λ(t6)={newStartActivity↑}
λ(t5)={initSenseAdvancing≡}
λ(t7)={newChangeLaneActivity↑}
λ(t8)={newChangeLaneActivity↑}
λ(t9)={newArrivalLaneActivity↑}
λ(t10)={updatedProcess↑≡}λ(t11)={unUsedSkill↑}
t28
t12
t3
t4
t5
t6
t7
t8
t9
t10
t11
p25
p11
p4
p5
p6
p7
p8
p9
p10
φ(t29)={evalSituation}
φ(t13)={evalSituation}
t13p12
t23
p13
t14
p13
CARE
DON’T_CARE
t15 p14
t16 p15
p22
t19
p18
SAFE
NO_SAFE
p16 p17
p19 p20
t24
t25
t26
t27
p23p24
λ(t24)={initSenseStopped≡}
λ(t25)={initSenseAdvancing≡}
λ(t24)={newStartActivity↑}
λ(t26)={newChangeLaneActivity↑}
λ(t27)={newArrivalLaneActivity,↑}
(t17)={newStop↑}
(t18)={newSenseStop↑}
(t20)={newCrash↑}
(t21)={newSenseCrash↑}
p21
λ(t22)={newInConflict↑}
φ(t15)={safeBreak}
t30 p26
DON’T_CARE
p27 p28
(t31)={newCrash↑}
(t32)={newSenseCrash↑}
t17 t18
t20 t21
t22
t29 t31 t32
t33
p29
5.8 Elementos del Modelo: SkillChangeLaneNET3,12
φ:T→2LABELi,k
Mecanismo de toma
de decisión
asociado
SkillChangeLaneNET3,12.ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
Nivel 3
Actividades,
Habilidades,
Procesos
5.9 Elementos del Modelo: ActivityNET3 Nets
ActivityNET3,1
(t3)={useSkillFreeFlow↑}
END
(t4)={endActivity↑}
ENQUEUED EVENT
p2t1
(t1)={initStart↑}
p1 p3t2
σ(t2)={position}
t3
(t4)={useSkillFreeFlow↑}
END
(t5)={endActivity↑}
ENQUEUED EVENT
p3t1
(t1)={initStop↑}
p1 p4p5t3
t5
σ(t2)={velocity}
t4t2
σ(t3)={position}
p2
p4
t4
StartActivityNET3,2
StopActivityNET3,3
StartActivityNet3,2, StopActivityNet3,3, ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
Nivel 3
Actividades,
Habilidades,
Procesos
5.10 Metodología de Modelado
t0,1
t1,0
t1,4
t4,1
t5,4
t4,5
t9,5
t5,9
t7,9
t9,7
t11,7
t7,11
t4,3
t3,4
t7,6
t6,7
t10,6
t10,11
t6,10
t8,6
t6,8
t3,2
t2,3t2,8
t8,2
t0,3 t3,0
t3,6
t6,3 t7,4
t4,7
t11,10
p0 p1
p2p3 p4
p5
p8 p6 p7 p9
p10p11
MAX
50
s1
s2s5
s4s3
s6
s8 s9
s11 s12
s10
s7
47
5.11 Conclusion and Future work.
Phase 1.p2
p3
p4
p5
t6
t2
t4
t3
{t4}={cis5}
[cis5ci]
[cis5ci]
(p2)={typelight,typecar,typestreet}
(p3)={typelight,typecar,typestreet}
{t6}={nci}
[cis
3
c i]
[cis
3
c i]
[cis2ci]
[cis2ci] {t2}={cis2}
{t3}={cis5}
p1
t5
t1
{t1}={cis1}
[cis
1
c i]
[cis
1
c i]
{t5}={nci}
(p1)={typelight,typecar,typestreet}
AgentStreet_1CLOCK_1
AgentStreet_2CLOCK_2
AgentStreet_3CLOCK_3
AgentStreet_4CLOCK_4
Agentintersection_1CLOCK
6. Modelado de Sistemas Multi-agentes PN 3-LNS
Sistemas Multi-Agente
El ambiente del sistemaObjetos en el sistema (“pasivos” o agentes estacionarios)Agentes ( con su modelo de comportamiento y características)
Interacciones entre los agentes y el ambienteInteracciones entre los agentes y los objetosInteracciones entre agentes
Sistema Orientado a Eventos
Sistema
Evento 1
Evento 2
Evento 3Parámetros del Sistema
Tiempo Programado ATiempo Programado B
{Variable de estado cambiado}
{Variable de estado ∂ cambiado}
{Variable de estado α cammbiado}
Caso de Estudio
Estación de tren Colas
Colas
Colas
Tramo de vía
Vía Peatonal
Objetos Informativos Estacionarios
Entidad Inteligente (peatón)
Objetivo
Entidad Inteligente (tren)
1er Nivel de Abstracción
Estación de tren Colas
Colas
Colas
Tramo de vía
Vía Peatonal
Objetos Informativos Estacionarios
Objetivo
Nivel 1
Red Vial, Objetos de Información
Dinámicos y estáticos
2do Nivel de Abstracción
Estación de tren Colas
Colas
Colas
Entidad Inteligente (peatón)
Entidad Inteligente (tren)
Nivel 2
Entidades
Inteligentes
3er Nivel de Abstracción
Estación de tren Colas
Colas
Colas
Nivel 3
Actividades,
Procesos,
Habilidades
EnvironmentNet1
Obji = (typei, valuei, wi)
EntityNET2,1
(Oi, typeSi, ai, bi) si=
Descripción de Segmentodisplace
t21
t1
p9
p1
ESTACION1
p7
p8
displace
PUNTO_INFORMATIVO2
ESTACION2
ESTACION3
PUNTO_INFORMATIVO3PUNTO_INFORMATIVO4
ENTRADAPUNTO_INFORMATIVO1
PUNTO_INFORMATIVO5
t2
t3
t4
t5 t6 t7
t8
t9
t10t11
t12
t13
t14
t15
t16 t17
t18 t19
t20
p2p3
p4
p5
p6
displace
displace
displace
displace
displace
displacedisplace
displace
displace
displace
onBoard
unBoard
onBoard
unBoard
onBoard
unBoard
displace
displace
displace
EntityNET2,1ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
Entidades Inteligentes
ProcessNET3,1
entityi = (ATTRi, PARAMi, knowledgeBasei)
ProcessNET3,1
ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
initStop
t2
initWalk
t3
p2
WALKINGp1
TRAVELLING
p3
boardBus
t1
unboardBus
t4
STOPPED
Base de ConocimientoID Regla Condición Acción
R1A IF spatialSituation[actori] == trafficLight
AND Event[actori] == yellowToRed AND
temporalRelation[actori, yellowToRed] ==
After
THEN stop(actori.arrivalTime, actori.currentPosition +
actori.traveledDistance+ actori.safeDistance,segmenti,
actori), start (Event[actori].time +
actori.getDelayToStart,segmenti, actori)
R1B IF spatialSituation[actori] ==
trafficLight AND Event[actori] ==
yellowToRed AND temporalRelation[actori,
yellowToRed] == Before
THEN leaveLink(actori.arrivalTime,
actori.currentPosition + actori.traveledDistance,segmenti,
actori), arrivalLink (actori.arrivalTime, 0.0,segmenti,
actori)
R2A IF spatialSituation[actori] ==
trafficLight AND Event[actori] ==
greenToYellow AND
temporalRelation[actori, greenToYellow] ==
After
THEN stop(actori.arrivalTime, actori.currentPosition +
actori.traveledDistance+ actori.safeDistance,segmenti,
actori), start (Event[actori].time +
actori.getDelayToStart,segmenti, actori)
R2B IF spatialSituation[actori] ==
trafficLight AND Event[actori] ==
greenToYellow AND
temporalRelation[actori, greenToYellow] ==
Before
THEN leaveLink(actori.arrivalTime,
actori.currentPosition + actori.traveledDistance,segmenti,
actori), arrivalLink (actori.arrivalTime, 0.0,segmenti,
actori)
R3A IF spatialSituation[actori] ==
trafficLight AND Event[actori] ==
redToGreen AND temporalRelation[actori,
redToGreen] == After
THEN leaveLink(actori.arrivalTime,
actori.currentPosition + traveledDistance,segmenti, actori),
arrivalLink (actori.arrivalTime, 0.0,segmenti, actori)
R3B
IF spatialSituation[actori] ==
trafficLight AND Event[actori] ==
redToGreen AND temporalRelation[actori,
redToGreen] == Before
THEN stop(actori.arrivalTime, actori.currentPosition +
actori.traveledDistance+ actori.safeDistance,segmenti,
actori), start (Event[actori].time +
actori.getDelayToStart,segmenti, actori)
SkillFreeFollowNET3,11
t6
p4
(t6)={initSenseAdvancing≡}(t5)={initSenseStopped≡}
t5
p6
(t8) ={newStart↑}
t8
p7
t9
(t9)={newSenseAdvancing↑}
φ(t2)={searchObstacle}
p3
NO_OBSTACLE
t2t1
λ(t1)={useSkillFreeFlow↑}
p1
λ(t10)={updatedProcess↑≡}
λ(t11)={unUsedSkill↑}t11
p9
λ(t7)={useSkillCarFollowing↑}
t3 t4
OBSTACLE
p2
p5
p8
t10
t7
SkillFreeFollowNET3,11
φ:T→2LABELi,k
Mecanismo de toma
de decisión
asociado
ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
SkillTrainFollowingNET3,11
p2
t3
φ(t2)={evalStop}
p8
p6
φ(t5)={evalSafeBreak}
t1
λ(t1)={useSkillCarFollowing↑}
p1
NO_STOPSTOP
SAFE
NO_CHANGE
λ(t19)={updatedProcess,↑≡}
λ(t22)={unUsedSkill↑}
t19
p17
(t11)={newStop↑}
(t15)={newSenseStop, ↑}
(t12)={newCrash↑}
(t16)={newSenseCrash↑}
φ(t6)={evalChangeLane}
φ(t13)={evalSafeBreak}
SAFE
t21
p16(t20)={initSenseStopped≡}
t20
p18(t23)={newStart↑}
t23
p19
t24
(t24)={newSenseAdvancing↑}
(t21)={initSenseAdvancing≡}
λ(t14)={useSkillChangeLane↑}
CHANGE
t2
t4
p5p4
t6t5
NO_SAFE
p15
p12
t22
t15
t11
t7 t8
t9 t10
t12
t13
t14t16 t17
t18
p3
p7
p9
p10 p11
p13 p14
φ:T→2LABELi,k
Mecanismo de toma
de decisión
asociado
SkillTrainFollowingNET3,11
ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
ActivityNET3 Nets
ActivityNET3,1
(t3)={useSkillFreeFlow↑}
END
(t4)={endActivity↑}
ENQUEUED EVENT
p2t1
(t1)={initStart↑}
p1 p3t2
σ(t2)={position}
t3
(t4)={useSkillFreeFlow↑}
END
(t5)={endActivity↑}
ENQUEUED EVENT
p3t1
(t1)={initStop↑}
p1 p4p5t3
t5
σ(t2)={velocity}
t4t2
σ(t3)={position}
p2
p4
t4
StartActivityNET3,2
StopActivityNET3,3
StartActivityNet3,2, StopActivityNet3,3,
ACTIVITIESPROCESS
EXEC_ACTIVITY
PROTOCOLS
INTERACTINGinitInteraction
endInteraction
sendReceive
endActivity
t4
t2
t8
p2p1
p4
p5
p6
SKILLS
p3
t6
t7
t5
initDecisionMaking
endSkill
initActivity
t1 updatedProcess t3
DECISION_MAKING
p7
useSkill
endActivity
t5t1
updatedProcess
t9
¿Preguntas?
Dr. Emmanuel López-Neri
Centro de Investigación, Innovación y Desarrollo Tecnológico
UVM Campus Guadalajara Sur.