1
0
mirror of https://github.com/gsi-upm/soil synced 2024-12-22 08:18:13 +00:00
Commit Graph

189 Commits

Author SHA1 Message Date
J. Fernando Sánchez
092591fb97 Fix bug agent df with multiple steps per timestamp 2023-05-24 17:54:40 +02:00
J. Fernando Sánchez
263b4e0e33 Minor fixes
* Add option to set scheduler and environment start times
* Add `Agent.env` method to ease migration of earlier code
2023-05-22 20:29:25 +02:00
J. Fernando Sánchez
189836408f Add rescheduling for received 2023-05-19 16:19:50 +02:00
J. Fernando Sánchez
ee0c4517cb Decouple activation and schedulers 2023-05-16 09:05:23 +02:00
J. Fernando Sánchez
3041156f19 WIP 2023-05-12 14:09:00 +02:00
J. Fernando Sánchez
f49be3af68 1.0pre4 2023-05-03 12:14:49 +02:00
J. Fernando Sánchez
5e93399d58 Initial benchmarking 2023-05-03 12:07:55 +02:00
J. Fernando Sánchez
eca4cae298 Update tutorial and fix plotting bug 2023-04-24 19:23:04 +02:00
J. Fernando Sánchez
47a67f6665 Add jupyter to test-requirements 2023-04-24 19:04:53 +02:00
J. Fernando Sánchez
c13550cf83 Tweak ipynb testing 2023-04-24 18:57:07 +02:00
J. Fernando Sánchez
55bbc76b2a Improve tutorial
* Improve text
* Move to docs
* Autogenerate with sphinx
* Fix naming issue `environment.run` (double name)
* Add to tests
2023-04-24 18:47:52 +02:00
J. Fernando Sánchez
d13e4eb4b9 Plot env without agent reporters 2023-04-24 18:06:37 +02:00
J. Fernando Sánchez
93d23e4cab Add tutorial test to CI/CD 2023-04-24 18:05:07 +02:00
J. Fernando Sánchez
3802578ad5 Use context manager to add source files 2023-04-24 17:40:00 +02:00
J. Fernando Sánchez
4e296e0cf1 Merge branch 'mesa' 2023-04-21 15:19:21 +02:00
J. Fernando Sánchez
302075a65d Fix bug Py3.11 2023-04-21 14:27:41 +02:00
J. Fernando Sánchez
fba379c97c Update readme 2023-04-21 13:31:00 +02:00
J. Fernando Sánchez
50bca88362 Fix pre-release version of v1.0.0rc1 2023-04-20 18:07:42 +02:00
J. Fernando Sánchez
cc238d84ec Pre-release version of v1.0 2023-04-20 17:57:18 +02:00
J. Fernando Sánchez
be65592055 Default parameters terroristnetwork 2023-04-14 20:25:16 +02:00
J. Fernando Sánchez
1d882dcff6 Update easy function 2023-04-14 20:21:34 +02:00
J. Fernando Sánchez
b3e77cbff5 Update python version in gitlab-ci 2023-04-14 20:07:16 +02:00
J. Fernando Sánchez
05748a3250 Update python version requirement 2023-04-14 20:03:47 +02:00
J. Fernando Sánchez
a3fc6a5efa Update README 2023-04-14 19:56:44 +02:00
J. Fernando Sánchez
4e95709188 Update README 2023-04-14 19:53:31 +02:00
J. Fernando Sánchez
feab0ba79e Large set of changes for v0.30
The examples weren't being properly tested in the last commit. When we fixed
that a lot of bugs in the new implementation of environment and agent were
found, which accounts for most of these changes.

The main difference is the mechanism to load simulations from a configuration
file. For that to work, we had to rework our module loading code in
`serialization` and add a `source_file` attribute to configurations (and
simulations, for that matter).
2023-04-14 19:41:24 +02:00
J. Fernando Sánchez
73282530fd Big refactor v0.30
All test pass, except for the TestConfig suite, which is not too critical as the
plan for this version onwards is to avoid configuration as much as possible.
2023-04-09 04:19:24 +02:00
J. Fernando Sánchez
bf481f0f88 v0.20.8 fix bugs 2023-03-23 14:49:09 +01:00
J. Fernando Sánchez
2869b1e1e6 Clean-up
* Removed old/unnecessary models
* Added a `simulation.{iter_}from_py` method to load simulations from python
files
* Changed tests of examples to run programmatic simulations
* Fixed programmatic examples
2022-11-13 20:31:05 +01:00
J. Fernando Sánchez
d3cee18635 Add seed to cars example 2022-10-20 14:47:28 +02:00
J. Fernando Sánchez
9a7b62e88e Release 0.30.0rc3 2022-10-20 14:12:34 +02:00
J. Fernando Sánchez
c09e480d37 black formatting 2022-10-20 14:12:10 +02:00
J. Fernando Sánchez
b2d48cb4df Add test cases for 'ASK' 2022-10-20 14:10:34 +02:00
J. Fernando Sánchez
a1262edd2a Refactored time
Treating time and conditions as the same entity was getting confusing, and it
added a lot of unnecessary abstraction in a critical part (the scheduler).

The scheduling queue now has the time as a floating number (faster), the agent
id (for ties) and the condition, as well as the agent. The first three
elements (time, id, condition) can be considered as the "key" for the event.

To allow for agent execution to be "randomized" within every step, a new
parameter has been added to the scheduler, which makes it add a random number to
the key in order to change the ordering.

`EventedAgent.received` now checks the messages before returning control to the
user by default.
2022-10-20 12:15:25 +02:00
J. Fernando Sánchez
cbbaf73538 Fix bug EventedEnvironment 2022-10-20 12:07:56 +02:00
J. Fernando Sánchez
2f5e5d0a74 Black formatting 2022-10-18 17:03:40 +02:00
J. Fernando Sánchez
a2fb25c160 Version 0.30.0rc2
* Fix CLI arguments not being used when easy is passed a simulation instance
* Docs for `examples/events_and_messages/cars.py`
2022-10-18 17:02:12 +02:00
J. Fernando Sánchez
5fcf610108 Version 0.30.0rc1 2022-10-18 15:02:05 +02:00
J. Fernando Sánchez
159c9a9077 Add events 2022-10-18 13:11:01 +02:00
J. Fernando Sánchez
3776c4e5c5 Refactor
* Removed references to `set_state`
* Split some functionality from `agents` into separate files (`fsm` and
`network_agents`)
* Rename `neighboring_agents` to `neighbors`
* Delete some spurious functions
2022-10-17 21:49:31 +02:00
J. Fernando Sánchez
880a9f2a1c black formatting 2022-10-17 20:23:57 +02:00
J. Fernando Sánchez
227fdf050e Fix conditionals 2022-10-17 19:29:39 +02:00
J. Fernando Sánchez
5d759d0072 Add conditional time values 2022-10-17 13:58:14 +02:00
J. Fernando Sánchez
77d08fc592 Agent step can be a generator 2022-10-17 08:58:51 +02:00
J. Fernando Sánchez
0efcd24d90 Improve exporters 2022-10-16 21:57:30 +02:00
J. Fernando Sánchez
78833a9e08 Formatted with black 2022-10-16 17:58:19 +02:00
J. Fernando Sánchez
d9947c2c52 WIP: all tests pass
Documentation needs some improvement

The API has been simplified to only allow for ONE topology per
NetworkEnvironment.
This covers the main use case, and simplifies the code.
2022-10-16 17:56:23 +02:00
J. Fernando Sánchez
cd62c23cb9 WIP: all tests pass 2022-10-13 22:43:16 +02:00
J. Fernando Sánchez
f811ee18c5 WIP 2022-10-06 15:49:19 +02:00
J. Fernando Sánchez
0a9c6d8b19 WIP: removed stats 2022-09-16 18:14:16 +02:00