diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
 
+Version 6.0
+-----
+
+* Introduced the discrete event priorities.
+
 Version 5.9
 -----
 
diff --git a/Simulation/Aivika/IO/Event.hs b/Simulation/Aivika/IO/Event.hs
--- a/Simulation/Aivika/IO/Event.hs
+++ b/Simulation/Aivika/IO/Event.hs
@@ -19,7 +19,7 @@
 
 import Data.IORef
 
-import qualified Simulation.Aivika.PriorityQueue as PQ
+import qualified Simulation.Aivika.PriorityQueue.EventQueue as PQ
 
 import Simulation.Aivika.Trans.Ref.Base
 import Simulation.Aivika.Trans.DES
@@ -52,11 +52,11 @@
                            queueBusy = f,
                            queueTime = t }
 
-  {-# INLINE enqueueEvent #-}
-  enqueueEvent t (Event m) =
+  {-# INLINE enqueueEventWithPriority #-}
+  enqueueEventWithPriority t priority (Event m) =
     Event $ \p ->
     let pq = queuePQ $ runEventQueue $ pointRun p
-    in liftIO $ PQ.enqueue pq t m
+    in liftIO $ PQ.enqueue pq t priority m
 
   {-# INLINE runEventWith #-}
   runEventWith processing (Event e) =
@@ -87,7 +87,7 @@
            r  = pointRun p
        f <- liftIO $ PQ.queueNull pq
        unless f $
-         do (t2, c2) <- liftIO $ PQ.queueFront pq
+         do (t2, priority2, c2) <- liftIO $ PQ.queueFront pq
             let t = queueTime q
             t' <- liftIO $ readIORef t
             when (t2 < t') $ 
@@ -102,6 +102,7 @@
                      n2 = fromIntegral $ floor ((t2 - t0) / dt)
                  c2 $ p { pointTime = t2,
                           pointIteration = n2,
+                          pointPriority = priority2,
                           pointPhase = -1 }
                  call q p
 
diff --git a/Simulation/Aivika/Trans/Circuit.hs b/Simulation/Aivika/Trans/Circuit.hs
--- a/Simulation/Aivika/Trans/Circuit.hs
+++ b/Simulation/Aivika/Trans/Circuit.hs
@@ -480,7 +480,7 @@
 {-# INLINABLE iterateCircuitInPoints_ #-}
 iterateCircuitInPoints_ [] cir a = return ()
 iterateCircuitInPoints_ (p : ps) cir a =
-  enqueueEvent (pointTime p) $
+  enqueueEventWithPriority (pointTime p) (pointPriority p) $
   Event $ \p' ->
   do (a', cir') <- invokeEvent p $ runCircuit cir a
      invokeEvent p $ iterateCircuitInPoints_ ps cir' a'
@@ -492,7 +492,7 @@
 iterateCircuitInPoints ps cir a =
   do let loop [] cir a source = triggerSignal source a
          loop (p : ps) cir a source =
-           enqueueEvent (pointTime p) $
+           enqueueEventWithPriority (pointTime p) (pointPriority p) $
            Event $ \p' ->
            do (a', cir') <- invokeEvent p $ runCircuit cir a
               invokeEvent p $ loop ps cir' a' source
@@ -515,7 +515,7 @@
 {-# INLINABLE iterateCircuitInTimes_ #-}
 iterateCircuitInTimes_ ts cir a =
   Event $ \p ->
-  do let ps = map (pointAt $ pointRun p) ts
+  do let ps = map (\t -> pointAt (pointRun p) t 0) ts
      invokeEvent p $ 
        iterateCircuitInPoints_ ps cir a 
 
@@ -535,7 +535,7 @@
 {-# INLINABLE iterateCircuitInTimes #-}
 iterateCircuitInTimes ts cir a =
   Event $ \p ->
-  do let ps = map (pointAt $ pointRun p) ts
+  do let ps = map (\t -> pointAt (pointRun p) t 0) ts
      invokeEvent p $ 
        iterateCircuitInPoints ps cir a 
 
@@ -545,7 +545,7 @@
 {-# INLINABLE iterateCircuitInPointsMaybe #-}
 iterateCircuitInPointsMaybe [] cir a = return ()
 iterateCircuitInPointsMaybe (p : ps) cir a =
-  enqueueEvent (pointTime p) $
+  enqueueEventWithPriority (pointTime p) (pointPriority p) $
   Event $ \p' ->
   do (a', cir') <- invokeEvent p $ runCircuit cir a
      case a' of
@@ -569,7 +569,7 @@
 {-# INLINABLE iterateCircuitInTimesMaybe #-}
 iterateCircuitInTimesMaybe ts cir a =
   Event $ \p ->
-  do let ps = map (pointAt $ pointRun p) ts
+  do let ps = map (\t -> pointAt (pointRun p) t 0) ts
      invokeEvent p $ 
        iterateCircuitInPointsMaybe ps cir a
 
@@ -583,7 +583,7 @@
   do let loop [] cir ba source = triggerSignal source ba
          loop ps cir ba@(Left b) source = triggerSignal source ba 
          loop (p : ps) cir (Right a) source =
-           enqueueEvent (pointTime p) $
+           enqueueEventWithPriority (pointTime p) (pointPriority p) $
            Event $ \p' ->
            do (ba', cir') <- invokeEvent p $ runCircuit cir a
               invokeEvent p $ loop ps cir' ba' source
@@ -612,7 +612,7 @@
 {-# INLINABLE iterateCircuitInTimesEither #-}
 iterateCircuitInTimesEither ts cir a =
   Event $ \p ->
-  do let ps = map (pointAt $ pointRun p) ts
+  do let ps = map (\t -> pointAt (pointRun p) t 0) ts
      invokeEvent p $ 
        iterateCircuitInPointsEither ps cir a
 
diff --git a/Simulation/Aivika/Trans/Composite.hs b/Simulation/Aivika/Trans/Composite.hs
--- a/Simulation/Aivika/Trans/Composite.hs
+++ b/Simulation/Aivika/Trans/Composite.hs
@@ -80,15 +80,12 @@
 instance Monad m => Applicative (Composite m) where
 
   {-# INLINE pure #-}
-  pure = return
+  pure a = Composite $ \h0 -> pure (a, h0)
 
   {-# INLINE (<*>) #-}
   (<*>) = ap
 
 instance Monad m => Monad (Composite m) where
-
-  {-# INLINE return #-}
-  return a = Composite $ \h0 -> return (a, h0)
 
   {-# INLINE (>>=) #-}
   (Composite m) >>= k =
diff --git a/Simulation/Aivika/Trans/Event.hs b/Simulation/Aivika/Trans/Event.hs
--- a/Simulation/Aivika/Trans/Event.hs
+++ b/Simulation/Aivika/Trans/Event.hs
@@ -18,6 +18,7 @@
         runEventInStartTime,
         runEventInStopTime,
         -- * Event Queue
+        EventPriority(..),
         EventQueueing(..),
         enqueueEventWithCancellation,
         enqueueEventWithStartTime,
@@ -25,6 +26,7 @@
         enqueueEventWithTimes,
         enqueueEventWithIntegTimes,
         yieldEvent,
+        eventPriority,
         -- * Cancelling Event
         EventCancellation,
         cancelEvent,
diff --git a/Simulation/Aivika/Trans/Internal/Cont.hs b/Simulation/Aivika/Trans/Internal/Cont.hs
--- a/Simulation/Aivika/Trans/Internal/Cont.hs
+++ b/Simulation/Aivika/Trans/Internal/Cont.hs
@@ -49,6 +49,7 @@
         freezeContReentering,
         unfreezeCont,
         substituteCont,
+        substituteContPriority,
         contCanceled,
         contAwait,
         transferCont,
@@ -277,15 +278,6 @@
 
 instance MonadDES m => Monad (Cont m) where
 
-  {-# INLINE return #-}
-  return a = 
-    Cont $ \c ->
-    Event $ \p ->
-    do z <- invokeEvent p $ contCanceled c
-       if z 
-         then invokeEvent p $ cancelCont c
-         else invokeEvent p $ contCont c a
-
   {-# INLINE (>>=) #-}
   (Cont m) >>= k =
     Cont $ \c ->
@@ -365,7 +357,13 @@
 instance MonadDES m => Applicative (Cont m) where
 
   {-# INLINE pure #-}
-  pure = return
+  pure a = 
+    Cont $ \c ->
+    Event $ \p ->
+    do z <- invokeEvent p $ contCanceled c
+       if z 
+         then invokeEvent p $ cancelCont c
+         else invokeEvent p $ contCont c a
 
   {-# INLINE (<*>) #-}
   (<*>) = ap
@@ -753,7 +751,8 @@
   Event $ \p ->
   do let r = pointRun p
      rh <- invokeSimulation r $ newRef Nothing
-     rc <- invokeSimulation r $ newRef $ Just c
+     rc <- invokeSimulation r $ newRef $
+       Just $ substituteContPriority c (pointPriority p)  
      h <- invokeEvent p $
           handleSignal (contCancellationInitiating $
                         contId $
@@ -791,7 +790,8 @@
   Event $ \p ->
   do let r = pointRun p
      rh <- invokeSimulation r $ newRef Nothing
-     rc <- invokeSimulation r $ newRef $ Just c
+     rc <- invokeSimulation r $ newRef $
+       Just $ substituteContPriority c (pointPriority p)
      h <- invokeEvent p $
           handleSignal (contCancellationInitiating $
                         contId $ contAux c) $ \e ->
@@ -890,6 +890,34 @@
 substituteCont :: MonadDES m => ContParams m a -> (a -> Event m ()) -> ContParams m a
 {-# INLINE substituteCont #-}
 substituteCont c m = c { contCont = m }
+
+-- | Substitute the continuation priority.
+substituteContPriority :: MonadDES m => ContParams m a -> EventPriority -> ContParams m a
+{-# INLINABLE substituteContPriority #-}
+substituteContPriority c priority = c { contCont = cont,
+                                        contAux  = (contAux c) { contECont = econt,
+                                                                 contCCont = ccont } }
+  where cont a =
+          Event $ \p ->
+          if priority == pointPriority p
+          then invokeEvent p $ contCont c a
+          else invokeEvent p $
+               enqueueEventWithPriority (pointTime p) priority $
+               resumeCont c a
+        econt e =
+          Event $ \p ->
+          if priority == pointPriority p
+          then invokeEvent p $ contECont (contAux c) e
+          else invokeEvent p $
+               enqueueEventWithPriority (pointTime p) priority $
+               resumeECont c e
+        ccont e =
+          Event $ \p ->
+          if priority == pointPriority p
+          then invokeEvent p $ contCCont (contAux c) e
+          else invokeEvent p $
+               enqueueEventWithPriority (pointTime p) priority $
+               contCCont (contAux c) e
 
 -- | Await the signal.
 contAwait :: MonadDES m => Signal m a -> Cont m a
diff --git a/Simulation/Aivika/Trans/Internal/Dynamics.hs b/Simulation/Aivika/Trans/Internal/Dynamics.hs
--- a/Simulation/Aivika/Trans/Internal/Dynamics.hs
+++ b/Simulation/Aivika/Trans/Internal/Dynamics.hs
@@ -52,9 +52,6 @@
 
 instance Monad m => Monad (Dynamics m) where
 
-  {-# INLINE return #-}
-  return a = Dynamics $ \p -> return a
-
   {-# INLINE (>>=) #-}
   (Dynamics m) >>= k =
     Dynamics $ \p -> 
@@ -84,13 +81,13 @@
 runDynamicsInTime :: Double -> Dynamics m a -> Simulation m a
 {-# INLINABLE runDynamicsInTime #-}
 runDynamicsInTime t (Dynamics m) =
-  Simulation $ \r -> m $ pointAt r t
+  Simulation $ \r -> m $ pointAt r t 0
 
 -- | Run the 'Dynamics' computation in the specified time points.
 runDynamicsInTimes :: Monad m => [Double] -> Dynamics m a -> Simulation m [m a]
 {-# INLINABLE runDynamicsInTimes #-}
 runDynamicsInTimes ts (Dynamics m) =
-  Simulation $ \r -> return $ map (m . pointAt r) ts 
+  Simulation $ \r -> return $ map (\t -> m $ pointAt r t 0) ts 
 
 instance Functor m => Functor (Dynamics m) where
   
diff --git a/Simulation/Aivika/Trans/Internal/Event.hs b/Simulation/Aivika/Trans/Internal/Event.hs
--- a/Simulation/Aivika/Trans/Internal/Event.hs
+++ b/Simulation/Aivika/Trans/Internal/Event.hs
@@ -21,6 +21,7 @@
         runEventInStartTime,
         runEventInStopTime,
         -- * Event Queue
+        EventPriority(..),
         EventQueueing(..),
         enqueueEventWithCancellation,
         enqueueEventWithStartTime,
@@ -29,6 +30,7 @@
         enqueueEventWithPoints,
         enqueueEventWithIntegTimes,
         yieldEvent,
+        eventPriority,
         -- * Cancelling Event
         EventCancellation,
         cancelEvent,
@@ -80,9 +82,6 @@
 
 instance Monad m => Monad (Event m) where
 
-  {-# INLINE return #-}
-  return a = Event $ \p -> return a
-
   {-# INLINE (>>=) #-}
   (Event m) >>= k =
     Event $ \p -> 
@@ -242,6 +241,12 @@
 runEventInStopTime :: MonadDES m => Event m a -> Simulation m a
 {-# INLINE runEventInStopTime #-}
 runEventInStopTime = runDynamicsInStopTime . runEvent
+
+-- | Return the current event priority.
+eventPriority :: MonadDES m => Event m EventPriority
+{-# INLINE eventPriority #-}
+eventPriority =
+  Event $ return . pointPriority
 
 -- | Actuate the event handler in the specified time points.
 enqueueEventWithTimes :: MonadDES m => [Double] -> Event m () -> Event m ()
diff --git a/Simulation/Aivika/Trans/Internal/Parameter.hs b/Simulation/Aivika/Trans/Internal/Parameter.hs
--- a/Simulation/Aivika/Trans/Internal/Parameter.hs
+++ b/Simulation/Aivika/Trans/Internal/Parameter.hs
@@ -63,9 +63,6 @@
 
 instance Monad m => Monad (Parameter m) where
 
-  {-# INLINE return #-}
-  return a = Parameter $ \r -> return a
-
   {-# INLINE (>>=) #-}
   (Parameter m) >>= k =
     Parameter $ \r -> 
diff --git a/Simulation/Aivika/Trans/Internal/Process.hs b/Simulation/Aivika/Trans/Internal/Process.hs
--- a/Simulation/Aivika/Trans/Internal/Process.hs
+++ b/Simulation/Aivika/Trans/Internal/Process.hs
@@ -80,6 +80,8 @@
         catchProcess,
         finallyProcess,
         throwProcess,
+        -- * Process Priority
+        processWithPriority,
         -- * Utilities
         zipProcessParallel,
         zip3ProcessParallel,
@@ -118,12 +120,14 @@
 -- | Represents a process identifier.
 data ProcessId m = 
   ProcessId { processStarted :: Ref m Bool,
-              processReactCont     :: Ref m (Maybe (ContParams m ())), 
+              processReactCont     :: Ref m (Maybe (ContParams m ())),
+              processReactPriority :: Ref m Int,
               processContId  :: ContId m,
               processInterruptRef  :: Ref m Bool, 
               processInterruptCont :: Ref m (Maybe (ContParams m ())),
               processInterruptTime :: Ref m Double,
-              processInterruptVersion :: Ref m Int }
+              processInterruptVersion :: Ref m Int,
+              processInterruptPriority :: Ref m Int }
 
 -- | Specifies a discontinuous process that can suspend at any time
 -- and then resume later.
@@ -154,6 +158,7 @@
      invokeEvent p $ writeRef x $ Just c
      invokeEvent p $ writeRef (processInterruptRef pid) False
      invokeEvent p $ writeRef (processInterruptTime pid) t
+     invokeEvent p $ writeRef (processInterruptPriority pid) (pointPriority p)
      v <- invokeEvent p $ readRef (processInterruptVersion pid)
      invokeEvent p $
        enqueueEvent t $
@@ -174,10 +179,13 @@
      case a of
        Nothing -> return ()
        Just c ->
-         do invokeEvent p $ writeRef x Nothing
+         do priority <- invokeEvent p $ readRef (processInterruptPriority pid)
+            invokeEvent p $ writeRef x Nothing
             invokeEvent p $ writeRef (processInterruptRef pid) True
             invokeEvent p $ modifyRef (processInterruptVersion pid) $ (+) 1
-            invokeEvent p $ enqueueEvent (pointTime p) $ resumeCont c ()
+            invokeEvent p $
+              enqueueEventWithPriority (pointTime p) priority $
+              resumeCont c ()
             
 -- | Test whether the process with the specified identifier was interrupted.
 processInterrupted :: MonadDES m => ProcessId m -> Event m Bool
@@ -210,7 +218,8 @@
      a <- invokeEvent p $ readRef x
      case a of
        Just c ->
-         do invokeEvent p $ writeRef x Nothing
+         do priority <- invokeEvent p $ readRef (processInterruptPriority pid)
+            invokeEvent p $ writeRef x Nothing
             invokeEvent p $ writeRef (processInterruptRef pid) True
             invokeEvent p $ modifyRef (processInterruptVersion pid) $ (+) 1
             t <- invokeEvent p $ readRef (processInterruptTime pid)
@@ -220,7 +229,7 @@
                   invokeEvent p $
                   invokeCont c $
                   invokeProcess pid $
-                  holdProcess dt
+                  processWithPriority priority >> holdProcess dt
             invokeEvent p $
               reenterCont c' ()
        Nothing ->
@@ -243,8 +252,11 @@
   do let x = processReactCont pid
      a <- invokeEvent p $ readRef x
      case a of
-       Nothing -> invokeEvent p $ writeRef x $ Just c
-       Just _  -> error "Cannot passivate the process twice: passivateProcess"
+       Nothing ->
+         do invokeEvent p $ writeRef x $ Just c
+            invokeEvent p $ writeRef (processReactPriority pid) (pointPriority p)
+       Just _  ->
+         error "Cannot passivate the process twice: passivateProcess"
 
 -- | Passivate the process before performing some action.
 passivateProcessBefore :: MonadDES m => Event m () -> Process m ()
@@ -258,8 +270,10 @@
      case a of
        Nothing ->
          do invokeEvent p $ writeRef x $ Just c
+            invokeEvent p $ writeRef (processReactPriority pid) (pointPriority p)
             invokeEvent p m
-       Just _  -> error "Cannot passivate the process twice: passivateProcessBefore"
+       Just _  ->
+         error "Cannot passivate the process twice: passivateProcessBefore"
 
 -- | Test whether the process with the specified identifier is passivated.
 processPassive :: MonadDES m => ProcessId m -> Event m Bool
@@ -281,8 +295,11 @@
        Nothing -> 
          return ()
        Just c ->
-         do invokeEvent p $ writeRef x Nothing
-            invokeEvent p $ enqueueEvent (pointTime p) $ resumeCont c ()
+         do priority <- invokeEvent p $ readRef (processReactPriority pid)
+            invokeEvent p $ writeRef x Nothing
+            invokeEvent p $
+              enqueueEventWithPriority (pointTime p) priority $
+              resumeCont c ()
 
 -- | Reactivate a process with the specified identifier immediately.
 reactivateProcessImmediately :: MonadDES m => ProcessId m -> Event m ()
@@ -295,8 +312,13 @@
        Nothing -> 
          return ()
        Just c ->
-         do invokeEvent p $ writeRef x Nothing
-            invokeEvent p $ resumeCont c ()
+         do priority <- invokeEvent p $ readRef (processReactPriority pid)
+            invokeEvent p $ writeRef x Nothing
+            if priority == pointPriority p
+              then invokeEvent p $ resumeCont c ()
+              else invokeEvent p $
+                   enqueueEventWithPriority (pointTime p) priority $
+                   resumeCont c ()
 
 -- | Prepare the processes identifier for running.
 processIdPrepare :: MonadDES m => ProcessId m -> Event m ()
@@ -409,13 +431,17 @@
      z <- invokeSimulation r $ newRef Nothing
      t <- invokeSimulation r $ newRef 0
      v <- invokeSimulation r $ newRef 0
+     priority1 <- invokeSimulation r $ newRef 0
+     priority2 <- invokeSimulation r $ newRef 0
      return ProcessId { processStarted = y,
-                        processReactCont     = x, 
+                        processReactCont     = x,
+                        processReactPriority = priority1,
                         processContId  = c, 
                         processInterruptRef  = i,
                         processInterruptCont = z,
                         processInterruptTime = t,
-                        processInterruptVersion = v }
+                        processInterruptVersion = v,
+                        processInterruptPriority = priority2 }
 
 -- | Cancel a process with the specified identifier, interrupting it if needed.
 cancelProcessWithId :: MonadDES m => ProcessId m -> Event m ()
@@ -473,9 +499,6 @@
 
 instance MonadDES m => Monad (Process m) where
 
-  {-# INLINE return #-}
-  return a = Process $ \pid -> return a
-
   {-# INLINE (>>=) #-}
   (Process m) >>= k =
     Process $ \pid -> 
@@ -571,6 +594,19 @@
 throwProcess :: (MonadDES m, Exception e) => e -> Process m a
 {-# INLINABLE throwProcess #-}
 throwProcess = liftEvent . throwEvent
+
+-- | Proceed with the process that would use the specified event priority.
+processWithPriority :: MonadDES m => EventPriority -> Process m ()
+{-# INLINABLE processWithPriority #-}
+processWithPriority priority =
+  Process $ \pid ->
+  Cont $ \c ->
+  Event $ \p ->
+  if priority == pointPriority p
+  then invokeEvent p $ resumeCont c ()
+  else invokeEvent p $
+       enqueueEventWithPriority (pointTime p) priority $
+       resumeCont c ()
 
 -- | Execute the specified computations in parallel within
 -- the current computation and return their results. The cancellation
diff --git a/Simulation/Aivika/Trans/Internal/Simulation.hs b/Simulation/Aivika/Trans/Internal/Simulation.hs
--- a/Simulation/Aivika/Trans/Internal/Simulation.hs
+++ b/Simulation/Aivika/Trans/Internal/Simulation.hs
@@ -49,9 +49,6 @@
 
 instance Monad m => Monad (Simulation m) where
 
-  {-# INLINE return #-}
-  return a = Simulation $ \r -> return a
-
   {-# INLINE (>>=) #-}
   (Simulation m) >>= k =
     Simulation $ \r -> 
diff --git a/Simulation/Aivika/Trans/Internal/Specs.hs b/Simulation/Aivika/Trans/Internal/Specs.hs
--- a/Simulation/Aivika/Trans/Internal/Specs.hs
+++ b/Simulation/Aivika/Trans/Internal/Specs.hs
@@ -131,6 +131,7 @@
         point n  = Point { pointSpecs = sc,
                            pointRun = r,
                            pointTime = basicTime sc n 0,
+                           pointPriority = 0,
                            pointIteration = n,
                            pointPhase = 0 }
 
@@ -142,6 +143,7 @@
         point n  = Point { pointSpecs = sc,
                            pointRun = r,
                            pointTime = basicTime sc n 0,
+                           pointPriority = 0,
                            pointIteration = n,
                            pointPhase = 0 }
 
@@ -153,17 +155,18 @@
         point n  = Point { pointSpecs = sc,
                            pointRun = r,
                            pointTime = basicTime sc n 0,
+                           pointPriority = 0,
                            pointIteration = n,
                            pointPhase = 0 }
 
 -- | Return the simulation stop time point.
 simulationStopPoint :: Run m -> Point m
-simulationStopPoint r = pointAt r (spcStopTime $ runSpecs r)
+simulationStopPoint r = pointAt r (spcStopTime $ runSpecs r) 0
 
 -- | Return the point at the specified time.
-pointAt :: Run m -> Double -> Point m
+pointAt :: Run m -> Double -> EventPriority -> Point m
 {-# INLINABLE pointAt #-}
-pointAt r t = p
+pointAt r t priority = p
   where sc = runSpecs r
         t0 = spcStartTime sc
         dt = spcDT sc
@@ -171,10 +174,11 @@
         p = Point { pointSpecs = sc,
                     pointRun = r,
                     pointTime = t,
+                    pointPriority = priority,
                     pointIteration = n,
                     pointPhase = -1 }
 
--- | Return the integration time points startin from the specified iteration.
+-- | Return the integration time points starting from the specified iteration.
 integPointsStartingFrom :: Point m -> [Point m]
 integPointsStartingFrom p = points
   where r  = pointRun p
@@ -187,6 +191,7 @@
         point n  = Point { pointSpecs = sc,
                            pointRun = r,
                            pointTime = basicTime sc n 0,
+                           pointPriority = 0,
                            pointIteration = n,
                            pointPhase = 0 }
 
diff --git a/Simulation/Aivika/Trans/Internal/Types.hs b/Simulation/Aivika/Trans/Internal/Types.hs
--- a/Simulation/Aivika/Trans/Internal/Types.hs
+++ b/Simulation/Aivika/Trans/Internal/Types.hs
@@ -23,6 +23,7 @@
         Dynamics(..),
         Event(..),
         EventProcessing(..),
+        EventPriority(..),
         EventQueueing(..),
         invokeParameter,
         invokeSimulation,
@@ -59,6 +60,7 @@
 data Point m = Point { pointSpecs :: Specs m,      -- ^ the simulation specs
                        pointRun :: Run m,          -- ^ the simulation run
                        pointTime :: Double,        -- ^ the current time
+                       pointPriority :: EventPriority,  -- ^ the current priority
                        pointIteration :: Int,      -- ^ the current iteration
                        pointPhase :: Int           -- ^ the current phase
                      }
@@ -127,6 +129,9 @@
                        -- (do not use unless the documentation states the opposite)
                      deriving (Eq, Ord, Show)
 
+-- | The event priority (greater is higher).
+type EventPriority = Int
+
 -- | A type class of monads that allow enqueueing the events.
 class EventQueueing m where
 
@@ -136,8 +141,17 @@
   -- | Create a new event queue by the specified specs with simulation session.
   newEventQueue :: Specs m -> m (EventQueue m)
 
+  -- | Enqueue the event which must be actuated at the specified time
+  -- given the priority.
+  enqueueEventWithPriority :: Double -> EventPriority -> Event m () -> Event m ()
+
   -- | Enqueue the event which must be actuated at the specified time.
   enqueueEvent :: Double -> Event m () -> Event m ()
+  {-# INLINE enqueueEvent #-}
+  enqueueEvent t m =
+    Event $ \p ->
+    invokeEvent p $
+    enqueueEventWithPriority t (pointPriority p) m
 
   -- | Run the 'EventT' computation in the current simulation time
   -- within the 'DynamicsT' computation involving all pending
diff --git a/Simulation/Aivika/Trans/Process.hs b/Simulation/Aivika/Trans/Process.hs
--- a/Simulation/Aivika/Trans/Process.hs
+++ b/Simulation/Aivika/Trans/Process.hs
@@ -78,6 +78,8 @@
         catchProcess,
         finallyProcess,
         throwProcess,
+        -- * Process Priority
+        processWithPriority,
         -- * Utilities
         zipProcessParallel,
         zip3ProcessParallel,
diff --git a/Simulation/Aivika/Trans/Results.hs b/Simulation/Aivika/Trans/Results.hs
--- a/Simulation/Aivika/Trans/Results.hs
+++ b/Simulation/Aivika/Trans/Results.hs
@@ -1,5 +1,5 @@
 
-{-# LANGUAGE FlexibleContexts, FlexibleInstances, UndecidableInstances, ExistentialQuantification, MultiParamTypeClasses, FunctionalDependencies, OverlappingInstances #-}
+{-# LANGUAGE FlexibleContexts, FlexibleInstances, UndecidableInstances, ExistentialQuantification, MultiParamTypeClasses, FunctionalDependencies #-}
 
 -- |
 -- Module     : Simulation.Aivika.Trans.Results
diff --git a/aivika-transformers.cabal b/aivika-transformers.cabal
--- a/aivika-transformers.cabal
+++ b/aivika-transformers.cabal
@@ -1,5 +1,5 @@
 name:            aivika-transformers
-version:         5.9.1
+version:         6.0.0
 synopsis:        Transformers for the Aivika simulation library
 description:
     This package is a generalization of the aivika [1] simulation library
@@ -14,7 +14,6 @@
     .
     This method can be used not only for the parallel distributed simulation, but also for other 
     simulation models created with help of the generalized version of the Aivika simulation library.
-    Please consult the AivikaSoft [4] website for more details.
     .
     \[1] <http://hackage.haskell.org/package/aivika>
     .
@@ -22,15 +21,13 @@
     .
     \[3] <http://hackage.haskell.org/package/aivika-distributed>
     .
-    \[4] <http://www.aivikasoft.com>
-    .
 category:        Simulation
 license:         BSD3
 license-file:    LICENSE
-copyright:       (c) 2009-2018. David Sorokin <david.sorokin@gmail.com>
+copyright:       (c) 2009-2023. David Sorokin <davsor@mail.ru>
 author:          David Sorokin
-maintainer:      David Sorokin <david.sorokin@gmail.com>
-homepage:        http://www.aivikasoft.com
+maintainer:      David Sorokin <davsor@mail.ru>
+homepage:        https://gitflic.ru/project/dsorokin/aivika-transformers
 cabal-version:   >= 1.10
 build-type:      Simple
 tested-with:     GHC == 8.0.1
@@ -177,7 +174,7 @@
                      vector >= 0.10.0.1,
                      semigroups >= 0.10,
                      exceptions >= 0.9.0,
-                     aivika >= 5.9.1
+                     aivika >= 6.0.0
 
     other-extensions:   FlexibleContexts,
                         FlexibleInstances,
@@ -203,4 +200,4 @@
 source-repository head
 
     type:     git
-    location: https://github.com/dsorokin/aivika-transformers
+    location: https://gitflic.ru/project/dsorokin/aivika-transformers
