Salabim

Latest version: v25.0.8

Safety actively analyzes 723400 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 28

25.0.1

* A bug prevented salabim to run under Python <3.13. Fixed.

25.0.0

* Component.enter() now has an optional priority parameter. If the priority parameter is omitted, the component will enter at the tail of the queue,
while setting the sorting parameter to the value of the value of the priority of the tail component

* Queue.add() and Queue.append() now have an optional priority parameter (like Component.enter())

* Component.to_store() now has an optional request_priority parameter specifying in which order component will enter the requesters queue.

* Component.from_store() now has an optional request_priority parameter specifying in which order component will enter the requesters queue.

* Component.request() now has an optional request_priority parameter specifying in which order component will enter the requesters queue.
If a priority is specified with the resource spec, this parameter is ignored.

* Component.wait() now has an optional request_priority parameter specifying in which order component will enter the waiters queue.
If a priority is specified with the state spec, this parameter is ignored.

* The docstrings and the documentation now explicitly indicate that a priority should be float (although other types might work as well)

* Internal change: Component.request() and Component.wait() now explicitly specify keyword arguments rather than popping from kwarg

* AnimateText (and text in other Animatexxx classes), now support ANSI color escape sequences. This makes it possible to change color in the same call to AnimateText (et al). Note that salabim only support foreground colors.
In order to facilitate the build up of ANSI escape sequences, salabim has a class ANSI that can be used as sim.ANSI.red, sim.ANSI.dark_blue, etc. Supported colors are sim.ANSI.black, sim.ANSI.white, sim.ANSI.red, sim.ANSI.green, sim.ANSI.blue, sim.ANSI.cyan, sim.ANSI.magenta, sim.ANSI.yellow, sim.ANSI.dark_black, sim.ANSI.dark_white, sim.ANSI.dark_red, sim.ANSI.dark_green, sim.ANSI.dark_blue, sim.ANSI.dark_cyan, sim.ANSI.dark_magenta and sim.ANSI.dark_yellow. To reset to the textcolor, use sim.ANSI.reset.
E.g.


sim.AnimateRectangle(
(0, 0, 260, 40),
x=100,
y=100,
text=f"{sim.ANSI.blue}blue{sim.ANSI.white}blanc{sim.ANSI.red}rouge",
fillcolor="black",
text_anchor="sw",
fontsize=40,
)


will put this image on the animation canvas:

<img src="https://www.salabim.org/bleublancrouge.png">


- salabim used to apply a correction algorithm for fixing a Pillow bug that made characters (sometimes) look 'shadowed'. Apparently Pillow has fixed that bug now, so the special code has been removed from the salabim code base. This results in faster rendering of texts.
- Bug in Component.wait() with a specified priority fixed.

24.0.18

* Component now has a method `reset_monitors()`, which can be useful to prevent keeping statistics of the status and mode monitors. Apart from disabling monitoring completely, it is also possible to use stats_only.
Note that this functionality was already available for Queue, Store, Resource and State.

So by issuing `reset_monitors(False)` in the setup of all components, queues, stores, resources and states, memory consumption may be considerably less.

(inspired by a remark by 董江成 and a comment by Lukas Hollenstein)

24.0.17

- Bug in wait evaluation testing with all=True fixed.
(Inspired by a bug report by Marko Djogatovic)

24.0.16

- Bug in `Component.interrupt()` prevented interrupted components to be interrupted (and thus increasing the interrupt level). Fixed. The docstring has been changed to reflect this fix.
(Inspired by a comment by Michiel Luyken)

- Transparent videos (.gif and .webp) were actually saved as non transparent. Fixed.
- A bug in Pillow under Python 3.13 made it impossible to save animated gif/webp videos. Salabim now detects the problem and, if found, saves file non transparent. Hopefully, this will be fixed in an upcoming version of Pillow for Python 3.13.

24.0.15

- Introduced `Environment.minimized` method, which can be useful for real-time simulation without showing an animation window:

minimized

Parameters
----------
value : bool
if True, minimize the curent animation window
if False, (re)show the current animation window
if None (default): no action

Returns
-------
current state of the animation window : bool
True if current animation windows is minimized
False otherwise


- Realtime simulation is now covered in section Miscellaneous/Realtime simulation of the documentation.

- The changelog for version 24.0.14 mentioned a new way of installing 3D support for Python 3.13. The instructions
have been changed (again) and the result is a more stable and better documented installation. Refer to the Overview
section of the documentation for details.

Page 2 of 28

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.