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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user