Changelog¶
0.0.7.dev0¶
A custom seed can now be set for
Model.run()
by either passing an argument or defining a parameterseed
.Environment
has a new optional argumentagents
to add existing agents at the creation of the environment.AgentList.random()
andAgentList.shuffle()
have a new optional argumentgenerator
for custom instances ofrandom.Random
.
0.0.6 (January 2021)¶
A new demonstration model Segregation has been added.
All model objects now have a unique id number of type
int
. Methods that take an agent or environment as an argument can now take either the instance or id of the object. Thekey
attribute of environments has been removed.Extra keyword arguments to
Model
andExperiment
are now forwarded toModel.setup()
.Model.run()
now takes an optional argument steps.EnvDict
has been replaced byEnvList
, which has the same functionalities asAgentList
.Model objects now have a property
env
that returns the first environment of the object.Revision of
Network
. The argument map_to_nodes has been removed fromNetwork.add_agents()
. Instead, agents can be mapped to nodes by passing an AgentList to the agents argument ofModel.add_network()
. Direct forwarding of attribute calls toNetwork.graph
has been removed to avoid confusion.New and revised methods for
Grid
:Agent.move_to()
andAgent.move_by()
can be used to move agents.Grid.items()
returns an iterator of position and agent tuples.Grid.get_agents()
returns agents in selected position or area.Grid.position()
returns the position coordinates for an agent.Grid.positions()
returns an iterator of position coordinates.Grid.attribute()
returns a nested list with values of agent attributes.Grid.apply()
returns nested list with return values of a custom function.Grid.neighbors()
has new arguments diagonal and distance.
gridplot()
now takes a grid of values as an input and can convert them to rgba.animate()
now takes a model instance as an input instead of a class and parameters.sample()
andsample_saltelli()
will now return integer values for parameters if parameter ranges are given as integers. For float values, a new argument digits can be passed to round parameter values.The function
interactive()
has been removed, and is replaced by the new methodExperiment.interactive()
.sobol_sensitivity()
has been changed tosensitivity_sobol()
.
0.0.5 (December 2020)¶
Experiment.run()
now supports parallel processing.New methods
DataDict.arrange_variables()
andDataDict.arrange_measures()
, which generate a dataframe of recorded variables or measures and varied parameters.Major revision of
DataDict.arrange()
, see new description in the documentation.New features for
AgentList
: Arithmethic operators can now be used withAttrList
.
0.0.4 (November 2020)¶
First major release.