salabim 25.0.1__tar.gz → 25.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {salabim-25.0.1 → salabim-25.0.2}/PKG-INFO +1 -1
  2. {salabim-25.0.1 → salabim-25.0.2}/pyproject.toml +1 -1
  3. {salabim-25.0.1 → salabim-25.0.2}/salabim/salabim.py +21 -14
  4. {salabim-25.0.1 → salabim-25.0.2}/salabim.egg-info/PKG-INFO +1 -1
  5. {salabim-25.0.1 → salabim-25.0.2}/README.md +0 -0
  6. {salabim-25.0.1 → salabim-25.0.2}/salabim/DejaVuSansMono.ttf +0 -0
  7. {salabim-25.0.1 → salabim-25.0.2}/salabim/LICENSE.txt +0 -0
  8. {salabim-25.0.1 → salabim-25.0.2}/salabim/__init__.py +0 -0
  9. {salabim-25.0.1 → salabim-25.0.2}/salabim/calibri.ttf +0 -0
  10. {salabim-25.0.1 → salabim-25.0.2}/salabim/mplus-1m-regular.ttf +0 -0
  11. {salabim-25.0.1 → salabim-25.0.2}/salabim.egg-info/SOURCES.txt +0 -0
  12. {salabim-25.0.1 → salabim-25.0.2}/salabim.egg-info/dependency_links.txt +0 -0
  13. {salabim-25.0.1 → salabim-25.0.2}/salabim.egg-info/top_level.txt +0 -0
  14. {salabim-25.0.1 → salabim-25.0.2}/setup.cfg +0 -0
  15. {salabim-25.0.1 → salabim-25.0.2}/tests/test salabim.py +0 -0
  16. {salabim-25.0.1 → salabim-25.0.2}/tests/test_cap_now.py +0 -0
  17. {salabim-25.0.1 → salabim-25.0.2}/tests/test_componentgenerator.py +0 -0
  18. {salabim-25.0.1 → salabim-25.0.2}/tests/test_datetime.py +0 -0
  19. {salabim-25.0.1 → salabim-25.0.2}/tests/test_distributions.py +0 -0
  20. {salabim-25.0.1 → salabim-25.0.2}/tests/test_misc.py +0 -0
  21. {salabim-25.0.1 → salabim-25.0.2}/tests/test_monitor.py +0 -0
  22. {salabim-25.0.1 → salabim-25.0.2}/tests/test_process.py +0 -0
  23. {salabim-25.0.1 → salabim-25.0.2}/tests/test_queue.py +0 -0
  24. {salabim-25.0.1 → salabim-25.0.2}/tests/test_state.py +0 -0
  25. {salabim-25.0.1 → salabim-25.0.2}/tests/test_store.py +0 -0
  26. {salabim-25.0.1 → salabim-25.0.2}/tests/test_timeunit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: salabim
3
- Version: 25.0.1
3
+ Version: 25.0.2
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
@@ -10,7 +10,7 @@ authors = [
10
10
  { name = "Ruud van der Ham", email = "rt.van.der.ham@gmail.com" },
11
11
  ]
12
12
  description = "salabim - discrete event simulation in Python"
13
- version = "25.0.1"
13
+ version = "25.0.2"
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.7"
16
16
  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__ = "25.0.1"
10
+ __version__ = "25.0.2"
11
11
  import heapq
12
12
  import random
13
13
  import time
@@ -8121,7 +8121,7 @@ by adding:
8121
8121
  self,
8122
8122
  store: Union["Store", Iterable],
8123
8123
  filter: Callable = lambda c: True,
8124
- request_priority: Any = 0,
8124
+ request_priority: float = 0,
8125
8125
  fail_priority: float = 0,
8126
8126
  urgent: bool = True,
8127
8127
  fail_at: float = None,
@@ -8301,7 +8301,7 @@ by adding:
8301
8301
  self,
8302
8302
  store: Union["Store", Iterable],
8303
8303
  item: "Component",
8304
- request_priority: float = None,
8304
+ request_priority: float = 0,
8305
8305
  priority: float = 0,
8306
8306
  fail_priority: float = 0,
8307
8307
  urgent: bool = True,
@@ -8324,6 +8324,9 @@ by adding:
8324
8324
  request_priority: float
8325
8325
  put component in to_store_requesters according to the given priority (default 0)
8326
8326
 
8327
+ priority : float
8328
+ put component in the store according to this priority (default 0)
8329
+
8327
8330
  fail_priority : float
8328
8331
  priority of the fail event
8329
8332
 
@@ -8471,7 +8474,7 @@ by adding:
8471
8474
  mode: Any = None,
8472
8475
  urgent: bool = False,
8473
8476
  request_priority: float = 0,
8474
- schedule_priority: float = 0,
8477
+ priority: float = 0,
8475
8478
  cap_now: bool = None,
8476
8479
  oneof: bool = False,
8477
8480
  called_from: str = "request",
@@ -8615,7 +8618,7 @@ by adding:
8615
8618
  scheduled_time = fail_at + self.env._offset
8616
8619
  else:
8617
8620
  raise ValueError("both fail_at and fail_delay specified")
8618
-
8621
+ schedule_priority=priority
8619
8622
  self.set_mode(mode)
8620
8623
 
8621
8624
  self._failed = False
@@ -8914,7 +8917,6 @@ by adding:
8914
8917
  self._release(r)
8915
8918
 
8916
8919
  def wait_for(self, cond, states, request_priority=0, priority=0, urgent=False, mode=None, fail_delay=None, fail_at=None, cap_now=None):
8917
- schedule_priority = priority
8918
8920
  """
8919
8921
  wait for any or all of the given state values are met
8920
8922
 
@@ -9017,6 +9019,7 @@ by adding:
9017
9019
  raise ValueError("both fail_at and fail_delay specified")
9018
9020
 
9019
9021
  self.set_mode(mode)
9022
+ schedule_priority=priority
9020
9023
 
9021
9024
  self._cond = cond # add test ***
9022
9025
  for state in states:
@@ -9048,7 +9051,7 @@ by adding:
9048
9051
  mode: Any = None,
9049
9052
  urgent: bool = False,
9050
9053
  request_priority: float = 0,
9051
- schedule_priority: float = 0,
9054
+ priority: float = 0,
9052
9055
  cap_now: bool = None,
9053
9056
  ) -> None:
9054
9057
  """
@@ -9219,10 +9222,11 @@ by adding:
9219
9222
  scheduled_time = fail_at + self.env._offset
9220
9223
  else:
9221
9224
  raise ValueError("both fail_at and fail_delay specified")
9222
-
9225
+ schedule_priority=priority
9223
9226
  self.set_mode(mode)
9224
9227
 
9225
9228
  for arg in args:
9229
+
9226
9230
  value = True
9227
9231
  priority = request_priority
9228
9232
  if isinstance(arg, State):
@@ -9232,8 +9236,10 @@ by adding:
9232
9236
  if not isinstance(state, State):
9233
9237
  raise TypeError("incorrect specifier", arg)
9234
9238
  if len(arg) >= 2:
9235
- priority = arg[1]
9239
+ value = arg[1]
9236
9240
  if len(arg) >= 3:
9241
+ priority = arg[2]
9242
+ if len(arg) >= 4:
9237
9243
  raise TypeError("incorrect specifier", arg)
9238
9244
  else:
9239
9245
  raise TypeError("incorrect specifier", arg)
@@ -9256,6 +9262,7 @@ by adding:
9256
9262
  if not self._waits:
9257
9263
  raise TypeError("no states specified")
9258
9264
 
9265
+
9259
9266
  self._remaining_duration = scheduled_time - self.env._now
9260
9267
 
9261
9268
  self._trywait()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: salabim
3
- Version: 25.0.1
3
+ Version: 25.0.2
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes