Salabim

Latest version: v24.0.13

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

Scan your dependencies

Page 26 of 26

0.9.0

=========================
This version has a number of changes compared to previous versions.

Salabim does not rely on SimPy anymore.

The statuses now comply more with Must and Prosim than with Tomas, in order to achieve a more consistent interface.

State transition diagram


from\to | data| current| scheduled| passive| standby|
---------+------------+----------+----------------+---------------+-------------+
data | - | activate| activate| -| -|
| | 1)| | | |
---------+------------+----------+----------------+---------------+-------------+
current | action end| -| yield hold|yield passivate|yield standby|
|yield cancel| |yield reschedule| | |
---------+------------+----------+----------------+---------------+-------------+
scheduled| cancel|next event| reschedule| passivate| -|
| | | | | |
---------+------------+----------+----------------+---------------+-------------+
passive | cancel|reactivate| reactivate| -| -|
| | 1)| reschedule| | |
---------+------------+----------+----------------+---------------+-------------+
standby | cancel|next event| reschedule| -| -|
| | | | | |
---------+------------+----------+----------------+---------------+-------------+
1) via scheduled

The method activate now has an optional parameter for the action. If omitted, action will be assumed. So if the action of the component
description is just called action, then the component can be started with component.activate(), which is functionally the
equivalent to component.activate(component.action()).

The method hold now supports 'duration' as well as 'till' parameters (even both are permitted)
activate, reactivate and reschedule now support 'at' as well 'delay' (even both are permitted)
All transitions to current are via scheduled now.

It is now possible to issue a new action in activate, reactivate and reschedule, even for the current component via reschedule.

The methods reactivate, activate, reschedule and hold now have an 'urgent' parameter, which, if True, will schedule
this component before each component with the same scheduled time. When urgent=False (default), component are scheduled after all
components with the same scheduled time.

The method run now supports 'duration' as well as 'till' parameters (even both are permitted).

The scheduled time is now accessible for all component via scheduled_time. If the component is data or passive, inf will be returned.
The creation time is now available via creation_time.


Many functions without parameters are now a property.

New naming:
q.components (was q.iterate)
q.mean_length (was q.average_length)
q.mean_length_of_stay (was q.average_length_of_stay)
q.add_in_front_of (was q.add_before)
q.add_behind (was q.add_after)
c.enter_in_front_of (was c.enter_before)
c.enter_behind (was c.enter_after)

Names for queues and components are serialized separately now, if the name end with a period.

Introduced statistical distribution sampling.
Exponential
Normal
Uniform
Triangular
Constant
Table
Discrete
Distribution_from_string

Note that these distributions are not yet fully documented.

Improved trace functionality.


All functions and classes are now fully documented in the source code. Use help(...) to obtain information.

Page 26 of 26

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.