config.py 1.27 KB
Newer Older
Gonzalo Belcredi's avatar
Gonzalo Belcredi committed
1 2 3 4 5 6 7 8 9 10 11
import numpy as np

# SAMPLING
t_start = 0.
t_end = 80.                             # units of time
step = .01                             

SimulationTimeslots = int(t_end / step)
time = np.arange(t_start,t_end,step)

# NUMBER NODES AND GATEWAYS
Gonzalo Belcredi's avatar
Gonzalo Belcredi committed
12
NumberNodes = 500
Gonzalo Belcredi's avatar
Gonzalo Belcredi committed
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 43 44 45 46 47 48
NumberGateways = NumberNodes / 20

# Problem data.
mu = .003                               # Processing Rate (tasks per time step)
lda = .004                             # Incoming Rate (tasks per time step)
RxRate = lda
v = 1.                                  # Tasks per Bit
alfa = .1                              # Processing Factor

#Channel
Cg = .1                                 # Gateway Maximum Throughput
M = 15                                  # Each Gateway can service M users in linear zone
c = Cg * NumberGateways / NumberNodes   # Maximum Throughput per user
C = Cg * NumberGateways                 # Total Maximum Thoughput
k = Cg / M                              # Linear Slope     
k1 = .1 * k                             # Saturated Slope

# QoS
epsilon = .1
epsilon_energy = .2
beta = .1
delta = 1.
eta = .1

#Energy
energy_model = 1
MinLevel = 0
gamma = NumberNodes * .15
energy_harvesting = 1
energy_tx = 1
energy_pl = 1

if not energy_model:
    energy_harvesting = 0
    energy_tx = 0
    energy_pl = 0