salabim 24.0.11.post0__tar.gz → 24.0.12__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. {salabim-24.0.11.post0 → salabim-24.0.12}/PKG-INFO +1 -1
  2. {salabim-24.0.11.post0 → salabim-24.0.12}/pyproject.toml +1 -1
  3. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim/salabim.py +19 -13
  4. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim.egg-info/PKG-INFO +1 -1
  5. {salabim-24.0.11.post0 → salabim-24.0.12}/README.md +0 -0
  6. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim/DejaVuSansMono.ttf +0 -0
  7. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim/LICENSE.txt +0 -0
  8. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim/__init__.py +0 -0
  9. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim/calibri.ttf +0 -0
  10. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim/mplus-1m-regular.ttf +0 -0
  11. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim.egg-info/SOURCES.txt +0 -0
  12. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim.egg-info/dependency_links.txt +0 -0
  13. {salabim-24.0.11.post0 → salabim-24.0.12}/salabim.egg-info/top_level.txt +0 -0
  14. {salabim-24.0.11.post0 → salabim-24.0.12}/setup.cfg +0 -0
  15. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test salabim.py +0 -0
  16. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_cap_now.py +0 -0
  17. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_componentgenerator.py +0 -0
  18. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_datetime.py +0 -0
  19. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_distributions.py +0 -0
  20. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_misc.py +0 -0
  21. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_monitor.py +0 -0
  22. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_process.py +0 -0
  23. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_queue.py +0 -0
  24. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_state.py +0 -0
  25. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_store.py +0 -0
  26. {salabim-24.0.11.post0 → salabim-24.0.12}/tests/test_timeunit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: salabim
3
- Version: 24.0.11.post0
3
+ Version: 24.0.12
4
4
  Summary: salabim - discrete event simulation in Python
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://salabim.org
@@ -8,7 +8,7 @@ authors = [
8
8
  {name = "Ruud van der Ham", email = "rt.van.der.ham@gmail.com"}
9
9
  ]
10
10
  description = "salabim - discrete event simulation in Python"
11
- version = "24.0.11-0"
11
+ version = "24.0.12"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.7"
14
14
  dependencies = [
@@ -1,13 +1,13 @@
1
- # _ _ _ ____ _ _ ___ _ _
2
- # ___ __ _ | | __ _ | |__ (_) _ __ ___ |___ \ | || | / _ \ / |/ |
3
- # / __| / _` || | / _` || '_ \ | || '_ ` _ \ __) || || |_ | | | | | || |
4
- # \__ \| (_| || || (_| || |_) || || | | | | | / __/ |__ _| _ | |_| | _ | || |
5
- # |___/ \__,_||_| \__,_||_.__/ |_||_| |_| |_| |_____| |_| (_) \___/ (_)|_||_|
1
+ # _ _ _ ____ _ _ ___ _ ____
2
+ # ___ __ _ | | __ _ | |__ (_) _ __ ___ |___ \ | || | / _ \ / ||___ \
3
+ # / __| / _` || | / _` || '_ \ | || '_ ` _ \ __) || || |_ | | | | | | __) |
4
+ # \__ \| (_| || || (_| || |_) || || | | | | | / __/ |__ _| _ | |_| | _ | | / __/
5
+ # |___/ \__,_||_| \__,_||_.__/ |_||_| |_| |_| |_____| |_| (_) \___/ (_)|_||_____|
6
6
  # discrete event simulation
7
7
  #
8
8
  # see www.salabim.org for more information, the documentation and license information
9
9
 
10
- __version__ = "24.0.11"
10
+ __version__ = "24.0.12"
11
11
 
12
12
  import heapq
13
13
  import random
@@ -151,9 +151,11 @@ if Pythonista:
151
151
  inf = float("inf")
152
152
  nan = float("nan")
153
153
 
154
- _yieldless = not Pythonista # True, unless running under Pythonista
155
-
156
-
154
+ if Pythonista or AnacondaCode or PythonInExcel:
155
+ _yieldless = False
156
+ else:
157
+ _yieldless=True
158
+
157
159
  class QueueFullError(Exception):
158
160
  pass
159
161
 
@@ -5714,15 +5716,19 @@ class Queue:
5714
5716
 
5715
5717
 
5716
5718
  class Store(Queue):
5717
- def __init__(self, name: str = None, capacity: int = inf, env: "Environment" = None, *args, **kwargs):
5718
- super().__init__(name=name, capacity=capacity, env=env, *args, **kwargs)
5719
+ def __init__(self, name: str = None, monitor: Any = True, fill: Iterable = None, capacity: float = inf, env: "Environment" = None, *args, **kwargs) -> None:
5720
+ super().__init__(name=name, monitor=monitor,fill=None,capacity=capacity, env=env, *args, **kwargs)
5721
+
5719
5722
  with self.env.suppress_trace():
5720
5723
  self._to_store_requesters = Queue(f"{name}.to_store_requesters", env=env)
5721
5724
  self._to_store_requesters._isinternal = True
5722
5725
  self._from_store_requesters = Queue(f"{name}.from_store_requesters", env=env)
5723
5726
  self._from_store_requesters._isinternal = True
5724
5727
 
5725
- self.setup(*args, **kwargs)
5728
+ if fill is not None: # this cannot be done by Queue.__init__ as the requesters are not defined at that time
5729
+ with self.env.suppress_trace():
5730
+ for c in fill:
5731
+ c.enter(self)
5726
5732
 
5727
5733
  def set_capacity(self, cap: float) -> None:
5728
5734
  """
@@ -26796,7 +26802,7 @@ class ImageContainer:
26796
26802
  if not (0 <= t_from < t_to):
26797
26803
  raise ValueError(f"animation_from={t_from} not with 0 and animation_to={t_to}")
26798
26804
  if t_to > self._duration:
26799
- raise ValueError(f"animation_to={t_to} > duration={duration}")
26805
+ raise ValueError(f"animation_to={t_to} > duration={self._duration}")
26800
26806
  if pingpong:
26801
26807
  interval = 2 * (t_to - t_from)
26802
26808
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: salabim
3
- Version: 24.0.11.post0
3
+ Version: 24.0.12
4
4
  Summary: salabim - discrete event simulation in Python
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://salabim.org
File without changes
File without changes