-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimBoxProfile.py
More file actions
20 lines (15 loc) · 840 Bytes
/
SimBoxProfile.py
File metadata and controls
20 lines (15 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from Imsi import Imsi
from Imsi import s_factor
import random
class SimBoxProfile(object):
def generate_imsi(self, id: int, imsi_per_cust: int = 0):
activity_factor = random.randint(30, 50) / 100 # 0.3 - 0.5
mobility_factor = random.randint(0, 10) / 10000 # 0 - 0.001
international_activity_factor = random.randint(0, 10) / 10000 # 0 - 0.001
social_factor = s_factor(0.1, 0.1)
location = random.randint(1000, 2000)
if imsi_per_cust == 0:
imsi_per_cust = random.randint(50, 100)
return Imsi(id=id, activity_factor=activity_factor, mobility_factor=mobility_factor,
international_activity_factor=international_activity_factor, social_factor=social_factor,
initial_location=location, imsi_per_cust=imsi_per_cust, trusted=0)