Simulation

Event Modeling Risk Assessment using Linked Diagrams

The EMRALD simulation or solve engine is based on three-phase discrete event simulation which has no fixed time steps. All probabilistic conditions are dynamically sampled when specific conditions arise. Once all state events are analyzed; actions of the model are executed; and current sampling is performed, the simulation jumps to the next event in time. The simulation processing steps are as follows:
  1. While there are States in the New States list, for each State:
    • Add the Events to the Time Queue or Conditional List.
    • Execute any Immediate Actions.
  2. If any Conditional Events criteria is met:
    • Execute that event’s actions.
    • (Go to Step 1.)
  3. Jump to the next chronological event:
    • Process that event’s actions.
    • (Go to Step 1.)

External simulations or codes can be used in the simulation through either one or two-way coupling.  For one way coupling, any locally installed application can be executed when running an EMRALD model.  This is done by assigning the path of the executable to an event.  Next, a user defined script can prepare input data. Finally, another script can process results of the executable to adjust conditions in the EMRALD simulation. 

Two–way coupling uses loose coupling methods and can be done with any code running on the same network.  This requires the other application, or a wrapper, to implement an open communication protocol for message transfer. Messages are then used to both adjust the external simulation or modify the EMRALD simulation.

Messaging Protocol

Two way coupling with EMRALD is done through XMPP messaging. An expandable protocol has been developed to allow for standard messages of “Actions” and “Events” to govern what happens both on the EMRALD server and the simulation clients. A XMPP server is run as part of the EMRALD solve engine which handles all the message passing. This allows EMRALD and the simulation codes to run on different machines or even different networks. These messages are JSON strings and a schema has been defined to allow validation of messages.  

Actions

Actions are sent by EMRALD to a client simulation stating an action to perform.  The following are the actions that can be sent:

  • Component Modify (atCompModify) – Modify a components properties according to the specified data.
  • Open Simulation (atOpenSim) – Open the specified simulation or file.
  • Cancel Simulation (atCancelSim) – Cancel the currently running simulation.
  • Pause Simulation (atPauseSim) – Pause the current simulation.
  • Continue Simulation (atContinue) – Continue the simulation after an event was sent, a new simulation was open, or a pause was sent.
  • Timer (atTimer) – Pause at the given time and check back with the EMRALD simulation at the given time for any changes.
  • Reset (atReset) – Reset the simulation back to the beginning.
  • Restart at a given time (atRestartAtTime) – Back up the current simulation back to the given time.
  • Ping (atPing) – Check to see if a client is still connected, client simulation must respond back to a ping.
  • Status (atStatus) – Check to see if client simulation is still running, client must respond.

Events

Events are sent by a client indicating something has happened on the client that may affect the EMRALD simulation.These include the following:

  • Component Event (etCompEv) – A property of a component of interest has changed in the coupled simulation.
  • Timer (etTimer) – The time of the coupled simulation has reached the designated callback time.
  • Simulation Started (etSimStarted) – The coupled simulation has started.
  • Simulation Ended (etEndSim) – The coupled simulation has ended.
  • Status (etStatus) – Return of a status request action.

Running and Results

An EMRALD simulation is run repeatedly according to a value specified by the user. The results from these runs are gathered. For each repeated evaluation, any key end states in the current state list, along with the time paths for those states, is logged in the results.  The compilation of these results allows us to determine the probability of any outcome with an uncertainty depending on the number of simulation runs.  When using equivalent models with no time related items, the results from the state model evaluation converges on the same result as traditional PRA methods.

No complex convolution adjustments are needed for time based relationships; the state diagram run automatically takes this into account.  EMRALD evaluation also allows the user to determine the average or mean time of a particular outcome, or provides data for statistical evaluation for critical failure time ranges.

Idaho National Laboratory