-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswarm_types.py
More file actions
45 lines (35 loc) · 3.04 KB
/
swarm_types.py
File metadata and controls
45 lines (35 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from collections import namedtuple
Rectangle = namedtuple('Rectangle', 'xmin ymin width height')
Lateral_Conditions = namedtuple('Lateral_Conditions', [ 'idx'
, 'overlap'
, 'locations'
, 'clashes'
, 'aversion'
, 'trouble'
, 'tension'
, 'relaxed_connection'])
Participant = namedtuple('Participant', [ 'idx' # str
, 'connections' # namedtuple
, 'xmin' # int
, 'ymin' # int
, 'width' # int
, 'height' # int
, 'clashes' # namedtuple # Initialized with all ids and zeros
, 'aversions' # namedtuple # Initialized with all ids and zeros
, 'interference' # float
, 'overlap_with_idx' # set of ids
, 'turmoil' # float
, 'relaxed_connections' # int
, 'protrusion_status' # str
, 'protrusion_extend' # tuple
, 'protruded_zone_edges' # set of tuples
, 'healthy' # boolean
, 'compliant' # boolean
, 'yield_polygon' # Rectangle
, 'freespace' # Rectangle
, 'secondary_freespace_north_east' # Rectangle
, 'secondary_freespace_south_east' # Recatngle
, 'secondary_freespace_south_west' # Rectangle
, 'secondary_freespace_north_west' # Rectangle
, 'last_move' # str
, 'color']) # str