10.05.2013 Views

Texto base de la asignatura - UNED

Texto base de la asignatura - UNED

Texto base de la asignatura - UNED

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DEVS PARALELO<br />

Así pues, el estado <strong>de</strong>l sistema está caracterizado por <strong>la</strong>s siguientes cinco variables:<br />

(fase, σ, almacena, almacena1, Sw). El conjunto <strong>de</strong> posibles estados viene<br />

<strong>de</strong>finido por el producto cartesiano <strong>de</strong> los posibles valores <strong>de</strong> cada una <strong>de</strong> estas<br />

variables: S = {“pasivo”,“activo”} × R + 0 × {Secuencia finita <strong>de</strong> valores R} ×<br />

{Secuencia finita <strong>de</strong> valores R} × {true, false}. La <strong>de</strong>scripción <strong>de</strong>l sistema es <strong>la</strong><br />

siguiente:<br />

DEVS∆ = 〈X, S, Y, δint, δext, λ, ta〉 (4.17)<br />

don<strong>de</strong> los conjuntos <strong>de</strong> entrada y salida son los siguientes:<br />

XM = { (p, v) | p ∈ InPorts = {in, in1}, v ∈ Xp } , con Xin = Xin1 = R<br />

YM = { (p, v) | p ∈ OutPorts = {out, out1}, v ∈ Yp } , con Yout = Yout1 = R<br />

(4.18)<br />

Supongamos que simultáneamente se reciben eventos en los dos puertos <strong>de</strong> entrada.<br />

L<strong>la</strong>memos Xb in a <strong>la</strong> bolsa <strong>de</strong> eventos recibida en el puerto in y Xb in1 a <strong>la</strong><br />

recibida en el puerto in1. Si en alguno <strong>de</strong> estos puertos no se recibieran eventos, <strong>la</strong><br />

correspondiente bolsa sería igual al conjunto vacío. Las funciones <strong>de</strong> transición son:<br />

<br />

b<br />

δext S, e, XM =<br />

<br />

b “activo”, ∆, Xin , Xb in1 , !Sw si fase =“pasivo”<br />

(fase, σ − e, almacena, almacena1, Sw) en caso contrario<br />

δint (S) = (“pasivo”, ∞, almacena, almacena1, Sw)<br />

<br />

b<br />

δcon S, e, XM = δext δint (S) , 0, Xb <br />

M<br />

La función <strong>de</strong> salida es:<br />

λ (S) =<br />

<br />

(out, almacena) , (out1, almacena1) si Sw = true<br />

(out, almacena1) , (out1, almacena) si Sw = false<br />

(4.19)<br />

(4.20)<br />

Si <strong>la</strong> bolsa <strong>de</strong> eventos asociada a un puerto está vacía, no se produce ningún<br />

evento <strong>de</strong> salida por el correspondiente puerto. Finalmente, <strong>la</strong> función <strong>de</strong> avance <strong>de</strong>l<br />

tiempo es:<br />

ta (S) = σ (4.21)<br />

225

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!