Changelog¶
This documents changes for each Gridsim release. These can also be found with each Github release.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased (probably v0.5)¶
Added¶
World
now has the capability for probabilistic observations. For more information, see the World constructor documentation.New method
count_tags()
returns the number of tagged locations in the worldLogger
now supports logging dictionary parameters (including those saved from config files).When logging parameters with
log_param()
, you can now specify a subgroup ofparams
in which to save the data.Message
now has a methodset_all()
to replace the whole contents of the Message without creating a new message. (And as opposed to setting the contents key-by-key withset_all()
.)Documentation for profiling code (under Development)
Option in Viewer initialization to draw time as text within window
Option in Viewer initialization to draw the communication network between robots
Changed¶
comm_criteria()
andreceive_msg()
now have an argument of dist_sqr instead of dist. This is because the square root call in computing the distance is computationally expensive and is called for communication (an N^2) operation.For
tag()
, you can now passNone
instead of a color to remove an existing tag.[Under the hood] Convert World tagging to use 3D numpy array instead of list of Tuples. This also improves drawing speed ( it doesn’t slow down so much when more tags are added), and you don’t get gaps between tagged cells for certain window sizes.
Improve interpolation for resized environment images
Improved code documentation.
Add documentation of errors and warnings
Move constructor documentation from
__init__
to class documentation. (I think it looks nicer.)Move documentation from *.rst to *.py files, for the sake of having all the documentation in the same place.
Fixed¶
You can now no longer
tag()
cells that are outside of the World dimensions.An error is raised when trying to create a
Logger
aggregator (withadd_aggregator()
) using a reserved name (e.g.,params
ortime
).Fix Viewer bug that didn’t correctly display background color underneath Robots
0.4 (2020-08-20)¶
Added¶
You can now set the contents of a
Message
by key, without needing to create a new message.When creating a
ConfigParser
, you can now choose to show warnings when getting a value that isn’t in the config fileIf a data directory (in the path for a
Logger
filename) does not exist, it will be created.New method
log_system_info()
allows you to easily save information about the system on which the experiments are being run.Paths for both
Logger
andImageEnvironment
(used viaWorld
support using~
to indicate home directory
Changed¶
Trying to have a
Robot
sample outside of the arena now returnsNone
. Previously, this threw a lower-level error about an image index being out of range.Decrease
World
tag opacityFormatting: Changed to 100-character line limit (from 80).
[Under the hood] Renamed
WorldEnvironment
toImageEnvironment
Fixed¶
Previously, if you tried to
sample()
a negative position in the World, it would loop the index around and give you the value of a position on the other side of the environment. Now, this is considered out of bounds and returnsNone
.Improve performance for drawing large number of tags in the
Viewer
(by converting coordinates to integers).Trying to use the
Viewer
without an environment image in the World would cause a crash. Now it doesn’t.Return type and documentation for
sample()
now matches that of the environment (returns None if sampling outside boundaries).Fix broken
get_version()
function.Time in
Logger
is now stored as an integer (since it’s ticks). Previously, it was a float.
0.3 (2020-06-29)¶
Added¶
Grid cells in the World can now be tagged with a color by the
tag()
method. (The color tag is only used by theViewer
when it draws the World.)The Robot’s
sample()
method now includes an option to tag the sampled location in theWorld
with a color.Message
now has “truthiness”: null messages areFalse
and non-null messages areTrue
.Messages contents can be accessed by key with the
get()
method, as well as still being able to retrieve the entire message dictionary contents.Created this changelog
Changed¶
Message.tx_id()
has been renamed to the (more informative)sender()
.Robot’s
init()
isn’t run until the robot is placed in the World. This allows robots to have access toWorld
information (like the arena size) in theinit()
method.[Under the hood] World’s environments are abstracted to have empty and non-empty types, which cleans up code to get rid of reliance on checking for environments being
None
.[Under the hood] Reduce reliance on cheating and accessing private variables and methods (underscore-prefixed methods/variables)
Removed¶
Message.is_null
has been removed. Instead, directly use the boolean conversion described above.
Fixed¶
Order of commands run on the robot resulted in incorrect movements (robot-specific
move()
, then Robot controller/loop function, then collision/environment-aware_move
operation to move the robots which was using a different move command)Remove mypy/flake8 from requirements, since they’re for local development/linting.