示例#1
0
import queue_simulation

pmin = 0.5
pmax = 1.5
step = 0.1
L = float(12000)
C = float(1000000)
K = [5, 10, 40]

for k in K:
    queue_simulation.main([pmin, pmax, step, L, C, 'Q6_1', k])
示例#2
0
import queue_simulation

pmin = 0.25
pmax = 0.95
step = 0.1
L = float(12000)
C = float(1000000)

queue_simulation.main([pmin, pmax, step, L, C, 'Q3'])
示例#3
0
import queue_simulation
import time

TICKS = 1000000
L = 2000
C = 1000000

f = open("result/q2_{}.csv".format(int((time.time() - 1507925570) / 30)), 'w')
f.write("p,E[N],E[T],P_IDLE")

for i in range(2, 10):
    p = i / 10
    LAM = p * C / L
    print('simulating p =', p)
    EN, ET, P_LOSS, P_IDLE = queue_simulation.main([TICKS, LAM, L, C])
    f.write("\n{},{},{},{}".format(p, EN, ET, P_IDLE))

f.close()
示例#4
0
import queue_simulation

pmin = [0.4, 2, 5]
pmax = [1.9, 4.8, 9.8]
step = [0.1, 0.2, 0.4]
L = float(12000)
C = float(1000000)
K = [5, 10, 40]

for k in K:
    for i in range(len(pmin)):
        p_min = pmin[i]
        p_max = pmax[i]
        step_size = step[i]
        queue_simulation.main([p_min, p_max, step_size, L, C, 'Q6_2', k])