Salabim

Latest version: v24.0.13

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

Scan your dependencies

Page 14 of 26

2.3.4.1

===========================
Bug fixes
---------
Joren van Lindert showed that the percentile calculation for (timestamped) monitors was incorrect.
A new algorithm is implemented.

Bug in merging (timestamped)monitors fixed.

2.3.4

=========================
New functionality
-----------------
From this version, salabim supports so called period monitors with the class PeriodMonitor.
These period monitors can be used to get statistics about (timestamped) monitors per specific period.
For instance if the time unit is hours a period monitor with 24 periods of 1, will give 24 monitors
containing data about hour 0-1, 1-2, ... 23-24 (modulo 24).
It is not necessary that the durations are all the same.
The most obvious use case of this new functionality is to get period information about the builtin
queue monitors length and length_of_stay.
qlength_per_hours= sim.PeriodMonitor(q.length, periods=24 * [1])
q_length_of_stay_per_hour = sim.PeriodMonitor(q.length_of_stay, periods=24 * [1])
Then after a run, the histogram of the length of stay for hour 0-1 (modulo 24) can be printed with
q_length_of_stay_per_hour[0].print_histogram()
And the mean length for hour 2-3 (modulo 24) can be retrieved with
q_length_per_hour[2].mean()
Have a look at the sample program 'Demo periodmonitor.py' for an example, and the docstring or the
latest documentation for the exact API specification.
Please note that this class is still experimental functionality that might change in a future version.


It is now possible to indicate that after a specific component returns control to the event scheduler,
standby component should not be activated. This is particularly useful when a data collection component
becomes current every so often. In that case, activating standby component is not useful and will just
consume processing power.
There are two ways to indicate that a component should skip standby activation:
- Component.skip_standby()
- at initialization of a component, with the skip_standby parameter.
Component.skip_standby() can also be used to query the current value.


New methods
-----------
Added the methods
- Environment.user_to_screen_coordinates_x()
- Environment.user_to_screen_coordinates_y()
- Environment.user_to_screen_coordinates_size()
- Environment.screen_to_usercoordinates_x()
- Environment.screen_to_usercoordinates_y()
- Environment.screen_to_usercoordinates_size()
to convert between user and screen coordinates and vice versa.
These methods are particularly useful for position and sizing AnimateButtons, AnimateSliders or AnimateEntries.


Improved functionality
----------------------
It is no longer required that a process of a component contains a yield statement.
So now ordinary methods (non generators) can now be activated.
This is particularly useful for decision processes that do not consume any time.
Note that these non generator methods can also be called with (keyword) parameters.


Implementation notes
--------------------
Check for hasprocess() changed.
Substantial refactoring to allow for non generator processes to be supported, particularly
with respect to proper tracing.

Process as defined in Component inititalization and Component.activate are no longer assessed
by eval(), but by getattr(), resulting in more stable code.


Bug fixes
---------
Bug in MonitorTimestamp.xduration() fixed.


Announcement
------------
Python 2.7 will no longer be supported as from 31 December 2018.
Please upgrade to Python 3.x as soon as possible.

2.3.3.2

===========================
Changed functionality
---------------------
If Environment.run() is given a till or a duration, main will become active at the specified time.
If not, main will become active when there are no more events on the event list. This will be shown
in the trace with 'ends on no events left'.
So, if you don't want a simulation to stop at the moment the event list becomes empty, issue
env.run(sim.inf)
This can particularly be useful if you don't want to stop an animation when there are no events left.


The placement of the title of AnimateQueue() and Queue.animate() when the direction is 'n' or 's' has
been changed. Now the title is always displayed horizontally.


Implementation note
-------------------
Error reporting for AnimateEntry on Pythonista now only when actually animating.


Big fix
-------
On Pythonista, setting env.video parameter without animating, caused a crash. Fixed.

2.3.3.1

===========================

Implementation note
-------------------
Not documented tkinter_init and tkinit_exit code removed.

Bug fix
-------
From version 2.3.3 main will be reactivated once there are no more events. This functionality was not
supported when running animated. Fixed.

Sometimes an animation object was not removed correctly (under tkinter). Fixed.

2.3.3

=========================
New functionality
-----------------
The class AnimateEntry adds a new UI element to salabim. With this, it is possible to ask for the user to
enter a text. The Enter key will call an action function, which can be used to get the entered text.
In most cases, the entry animation will have to be removed then. See the manual or docstring for details.
AnimateEntry is not supported under Pythonista.
Note that the API of this class is still experimental and might change in future releases.

Improved functionality
----------------------
AnimateQueue() and Queue.animate() can now display a title near the start of the queue animation.
This makes it very easy to show the contents of a queue, with just one line of code
By default, the name of the queue will be displayed next to the queue. There are several parameters
to control the text placement and appearance. See the manual or docstring for details.

Changed functionality
---------------------
When there are no more events on the event chain, main was activated at time=inf, which made it
difficult to get useful time stamped statistics.
Therefore, from this version on main will become active at the time of the last event, when there are no more events. This condition is also properly traced now.

Bug fixes
---------
When a timestamped monitor was run till inf, the print_histogram method did not work properly. Fixed.

The linenumber in trace for 'request honor' or 'wait honor' was not correct. Fixed.

2.3.2.6

===========================

Bug fix
-------
Under Python 2.7 autoscaling histogram sometimes did result into a TypeError. Fixed.

The wrong line number was displayed when tracing request honor and request wait. Fixed.

Page 14 of 26

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.