mirror of
				https://github.com/balkian/gists.git
				synced 2025-10-30 23:28:27 +00:00 
			
		
		
		
	This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							afebf97965
						
					
				
				
					commit
					2798757188
				
			| @@ -8,7 +8,7 @@ class ControlModelM2(BaseBehaviour): | ||||
|       self.infected_behaviour() | ||||
|     … | ||||
|   def infected_behaviour(self): | ||||
|     neutral_neighbors = self.get_neighboring_agents(state_id=0) | ||||
|     neutral_neighbors = self.get_neighboring_agents(state_id=self.NEUTRAL) | ||||
|     for neighbor in neutral_neighbors: | ||||
|       if random.random() < self.prob_infect: | ||||
|         neighbor.state['id'] = self.INFECTED | ||||
|   | ||||
		Reference in New Issue
	
	Block a user