Commit Graph

15 Commits (6690b6ee5f9d8345bb7b29862330fea7c8d41210)

Author SHA1 Message Date
J. Fernando Sánchez 6690b6ee5f Fix incompatibility and bug in get_agents 5 years ago
J. Fernando Sánchez d1006bd55c WIP: exporters 5 years ago
J. Fernando Sánchez 9bc036d185 WIP: exporters 5 years ago
J. Fernando Sánchez a3ea434f23 0.13.8 5 years ago
J. Fernando Sánchez 65f6aa72f3 fix timeout in FSM. Improve logs 5 years ago
J. Fernando Sánchez 9749f4ca14 Fix multithreading
Multithreading needs pickling to work.
Pickling/unpickling didn't work in some situations, like when the
environment_agents parameter was left blank.
This was due to two reasons:

1) agents and history didn't have a setstate method, and some of their
attributes cannot be pickled (generators, sqlite connection)
2) the environment was adding generators (agents) to its state.

This fixes the situation by restricting the keys that the environment exports
when it pickles, and by adding the set/getstate methods in agents.

The resulting pickles should contain enough information to inspect
them (history, state values, etc), but very limited.
6 years ago
J. Fernando Sánchez 2e28b36f6e Python3.7, testing and bug fixes
* Upgrade to python3.7 and pandas 0.3.4 because pandas has dropped support for
python 3.4 -> There are some API changes in pandas, and I've update the code
accordingly.
* Set pytest as the default test runner
6 years ago
J. Fernando Sánchez ff1df62eec All tests pass 6 years ago
J. Fernando Sánchez 5420501d36 Fix state and networkx dynamic attributes 6 years ago
J. Fernando Sánchez fc48ed7e09 Added history class
Now the environment does not deal with history directly, it delegates it to a
specific class. The analysis also uses history instances instead of either
using the database directly or creating a proxy environment.

This should make it easier to change the implementation in the future.

In fact, the change was motivated by the large size of the csv files in previous
versions. This new implementation only stores results in deltas, and it fills
any necessary values when needed.
6 years ago
J. Fernando Sánchez 7d1c800490 Parallelism and granular exporting options
* Graphs are not saved by default (not backwards compatible)
* Modified newsspread examples
* More granular options to save results (exporting to CSV and GEXF are now
optional)
* Updated tutorial to include exporting options
* Removed references from environment to simulation
* Added parallelism to simulations (can be turned off with a flag or argument).
7 years ago
J. Fernando Sánchez a7c51742f6 Improved docs
Fixed several bugs
Added convenience methods in soil.analysis
7 years ago
J. Fernando Sánchez 78364d89d5 Fix gephi representation. Add sqlite 7 years ago
J. Fernando Sánchez af76f54a28 Added rabbits 7 years ago
J. Fernando Sánchez e1be3a730e WIP soil
* Pandas integration
* Improved environment
* Logging and data dumps
* Tests
* Added Finite State Machine models
* Rewritten ipython notebook and documentation
7 years ago