1
0
mirror of https://github.com/gsi-upm/soil synced 2025-08-24 03:52:20 +00:00

Decouple activation and schedulers

This commit is contained in:
J. Fernando Sánchez
2023-05-16 09:05:23 +02:00
parent 3041156f19
commit ee0c4517cb
5 changed files with 115 additions and 67 deletions

View File

@@ -1,12 +1,9 @@
from soil import Evented, FSM, state, default_state, BaseAgent, NetworkAgent, Environment, parameters, report, TimedOut
import math
from soilent import Scheduler
class RabbitsImprovedEnv(Environment):
prob_death: parameters.probability = 1e-3
schedule_class = Scheduler
def init(self):
a1 = self.add_node(Male)
@@ -174,4 +171,4 @@ class RandomAccident(BaseAgent):
self.debug("Rabbits alive: {}".format(num_alive))
RabbitsImprovedEnv.run(max_time=1000, seed="MySeed", iterations=1)
RabbitsImprovedEnv.run(max_time=1000, seed="MySeed", iterations=1)