Published October 25, 2024 | Version v1

Simulation Dataset: Collective anti-predator escape manoeuvres through optimal attack and avoidance strategies

  • 1. ROR icon Humboldt-Universität zu Berlin
  • 2. ROR icon University of Cambridge
  • 3. ROR icon Leibniz Institute of Freshwater Ecology and Inland Fisheries
  • 4. Consiglio Nazionale delle Ricerche

Description

This is a supplementary simulation dataset to reproduce Fig. 3C,D of the manuscript "Collective anti-predator escape manoeuvres through optimal attack and avoidance strategies" by Bartashevich et al.

The zip folder contains the following 3 files in h5 format: front attack (out_Npred1_pred_angle0.0.h5), side attack (out_Npred1_pred_angle1.5707963267948966.h5), back attack (out_Npred1_pred_angle3.141592653589793.h5).

Each file has the following "keys": KeysViewHDF5 ['circ_seg', 'end', 'endD', 'end_PosVel', 'fount', 'part', 'partD', 'pavas', 'pred', 'predD', 'start', 'start_fountain', 'start_pred', 'swarm', 'swarm_pred0', 'swarm_predD'].

The key necessary to reproduce Fig. 3C,D of the aforementioned paper is "fount" (<HDF5 dataset "fount": shape (40, 1200, 100, 8), type "<f8">). Namely, "fount" data array consists of 40 simulation runs, 1200 time points, 100 agents, and 8 metrics. The metric with index "0" depicts the value of the Euclidean distance from the agent i to the simulated predator. The metric with index "1" depicts the value of the position angle (theta 1 in rad) of the agent i relative to the simulated predator. The metric with index "2" depicts the value of the flee angle (theta 2 in rad) of the agent i relative to the simulated predator.

To estimate the start and the end of the fountain evasion, one can use the following script in Python:

import numpy as np

m = h5py.File(filename, "r")

for key in m.keys():
   print(key)

fount_runs = m[key]["fount"]

for j in range(40):
   fnt_start[j]  =   np.where(fount_runs[j, 0:1200, 0:100,5]==1)[0][0]  
   fnt_end[j]   =   np.where(fount_runs[j, 0:1200, 0:100,5]==1)[0][-1]

Files

simulation_data.zip

Files (11.9 GB)

Name Size
md5:c3b7521dc4030c8c6017ae4bdf20172c
11.9 GB Preview Download

Additional details

Related works

Is supplement to
10.1101/2024.03.26.586812 (DOI)