|
|
|
@ -331,7 +331,7 @@
|
|
|
|
|
},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"class ComportamientoBase(BaseNetworkAgent):\n",
|
|
|
|
|
"class BaseBehaviour(BaseNetworkAgent):\n",
|
|
|
|
|
" def __init__(self, environment=None, agent_id=0, state=()):\n",
|
|
|
|
|
" super().__init__(environment=environment, agent_id=agent_id, state=state)\n",
|
|
|
|
|
" self._attrs = {}\n",
|
|
|
|
@ -394,7 +394,7 @@
|
|
|
|
|
},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"class ControlModelM2(ComportamientoBase):\n",
|
|
|
|
|
"class ControlModelM2(BaseBehaviour):\n",
|
|
|
|
|
" #Init infected\n",
|
|
|
|
|
" init_states[random.randint(0,settings.number_of_nodes-1)] = {'id':1}\n",
|
|
|
|
|
" init_states[random.randint(0,settings.number_of_nodes-1)] = {'id':1}\n",
|
|
|
|
|