aivika-lattice 0.6.2 → 0.7
raw patch · 6 files changed
+21/−21 lines, 6 filesdep ~aivikadep ~aivika-transformersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aivika, aivika-transformers
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Simulation/Aivika/Lattice/Internal/Estimate.hs +0/−3
- Simulation/Aivika/Lattice/Internal/Event.hs +6/−5
- Simulation/Aivika/Lattice/Internal/LIO.hs +2/−5
- Simulation/Aivika/Lattice/Internal/Lattice.hs +1/−1
- aivika-lattice.cabal +7/−7
CHANGELOG.md view
@@ -1,4 +1,9 @@ +Version 0.7+-----++* Introduced the discrete event priorities.+ Version 0.6 -----
Simulation/Aivika/Lattice/Internal/Estimate.hs view
@@ -57,9 +57,6 @@ instance Monad m => Monad (Estimate m) where - {-# INLINE return #-}- return a = Estimate $ \p -> return a- {-# INLINE (>>=) #-} (Estimate m) >>= k = Estimate $ \p ->
Simulation/Aivika/Lattice/Internal/Event.hs view
@@ -21,7 +21,7 @@ import Control.Monad import Control.Monad.Trans -import qualified Simulation.Aivika.PriorityQueue.Pure as PQ+import qualified Simulation.Aivika.PriorityQueue.EventQueue.Pure as PQ import Simulation.Aivika.Trans import Simulation.Aivika.Trans.Internal.Types@@ -52,11 +52,11 @@ queueBusy = f, queueTime = t } - enqueueEvent t (Event m) =+ enqueueEventWithPriority t priority (Event m) = Event $ \p -> let pq = queuePQ $ runEventQueue $ pointRun p in invokeEvent p $- R.modifyRef pq $ \x -> PQ.enqueue x t m+ R.modifyRef pq $ \x -> PQ.enqueue x t priority m runEventWith processing (Event e) = Dynamics $ \p ->@@ -104,8 +104,8 @@ f <- invokeLIO ps $ fmap PQ.queueNull $ R.readRef0 pq unless f $- do (t2, c2) <- invokeLIO ps $- fmap PQ.queueFront $ R.readRef0 pq+ do (t2, priority2, c2) <- invokeLIO ps $+ fmap PQ.queueFront $ R.readRef0 pq let t = queueTime q t' <- invokeLIO ps $ R.readRef0 t@@ -118,6 +118,7 @@ dt = spcDT sc n2 = fromIntegral $ floor ((t2 - t0) / dt) p2 = p { pointTime = t2,+ pointPriority = priority2, pointIteration = n2, pointPhase = -1 } invokeLIO ps $
Simulation/Aivika/Lattice/Internal/LIO.hs view
@@ -70,9 +70,6 @@ instance Monad LIO where - {-# INLINE return #-}- return = LIO . const . return- {-# INLINE (>>=) #-} (LIO m) >>= k = LIO $ \ps -> m ps >>= \a ->@@ -81,7 +78,7 @@ instance Applicative LIO where {-# INLINE pure #-}- pure = return+ pure = LIO . const . pure {-# INLINE (<*>) #-} (<*>) = ap@@ -224,7 +221,7 @@ latticePoint = Parameter $ \r -> do t <- invokeParameter r latticeTime- return $ pointAt r t+ return $ pointAt r t 0 -- | Return the lattice time step. latticeTimeStep :: Parameter LIO Double
Simulation/Aivika/Lattice/Internal/Lattice.hs view
@@ -36,7 +36,7 @@ -- from the right parent. newRandomLatticeWithProb :: Double -> Int -> IO LIOLattice newRandomLatticeWithProb p m =- do g <- MWC.withSystemRandom (return :: MWC.GenIO -> IO MWC.GenIO)+ do g <- MWC.createSystemRandom xss0 <- forM [0 .. m] $ \i -> do xs0 <- forM [0 .. i] $ \k -> if k == 0
aivika-lattice.cabal view
@@ -1,5 +1,5 @@ name: aivika-lattice-version: 0.6.2+version: 0.7 synopsis: Nested discrete event simulation module for the Aivika library using lattice description: This experimental package extends the aivika-transformers [1] library and allows @@ -11,10 +11,10 @@ category: Simulation license: BSD3 license-file: LICENSE-copyright: (c) 2016-2017. David Sorokin <david.sorokin@gmail.com>+copyright: (c) 2016-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-lattice cabal-version: >= 1.10 build-type: Simple tested-with: GHC == 7.10.3@@ -56,8 +56,8 @@ containers >= 0.4.0.0, random >= 1.0.0.3, mwc-random >= 0.13.1.0,- aivika >= 5.9.1,- aivika-transformers >= 5.9.1+ aivika >= 6.0.0,+ aivika-transformers >= 6.0.0 other-extensions: TypeFamilies, MultiParamTypeClasses,@@ -71,4 +71,4 @@ source-repository head type: git- location: https://github.com/dsorokin/aivika-lattice+ location: https://gitflic.ru/project/dsorokin/aivika-lattice