Exemplo n.º 1
0
INTERVAL_RATE = NumberGenerator(UNIFORM, a=3, b=6)

# Delay Random
DELAY_RATE_BAKER = NumberGenerator(UNIFORM, a=1, b=2)
DELAY_RATE_ABLE = NumberGenerator(TRIANGULAR, low=5, high=15, mode=10)

# DELAY_RATE_BAKER = NumberGenerator(RANDINT, a=1, b=7)
# DELAY_RATE_ABLE = NumberGenerator(RANDINT, a=1, b=5)

d1 = Disposer()
d1.logs = True

# 1 is Able's maximum simultanious clients
dl1 = Delay(d1, DELAY_RATE_ABLE.next, None, 1)
dl1.name = 'Able'
dl1.logs = True

# 1 is Baker's maximum simultanious clients
dl2 = Delay(d1, DELAY_RATE_BAKER.next, None, 1)
dl2.name = 'Baker'
dl2.logs = True

q1 = Queue([dl1, dl2])
q1.logs = True

pr1 = ActorProbe(q1)
pr1.name = 'Queue Probe'
q1.actorprobe = pr1

pr2 = ActorProbe(dl1)
pr2.name = 'Able Probe'
Exemplo n.º 2
0
INTERVAL_RATE = NumberGenerator(UNIFORM, a=3, b=6)

# Delay Random
DELAY_RATE_BAKER = NumberGenerator(UNIFORM, a=1, b=2)
DELAY_RATE_ABLE = NumberGenerator(TRIANGULAR, low=5, high=15, mode=10)

# DELAY_RATE_BAKER = NumberGenerator(RANDINT, a=1, b=7)
# DELAY_RATE_ABLE = NumberGenerator(RANDINT, a=1, b=5)

d1 = Disposer()
d1.logs = True

# 1 is Able's maximum simultanious clients
dl1 = Delay(d1, DELAY_RATE_ABLE.next, None, 1)
dl1.name = 'Able'
dl1.logs = True

# 1 is Baker's maximum simultanious clients
dl2 = Delay(d1, DELAY_RATE_BAKER.next, None, 1)
dl2.name = 'Baker'
dl2.logs = True

q1 = Queue([dl1, dl2])
q1.logs = True

pr1 = ActorProbe(q1)
pr1.name = 'Queue Probe'
q1.actorprobe = pr1

pr2 = ActorProbe(dl1)
pr2.name = 'Able Probe'
Exemplo n.º 3
0
INTERVAL_RATE = NumberGenerator(UNIFORM, a=3, b=6)

# Delay Random
DELAY_RATE_BAKER = NumberGenerator(UNIFORM, a=1, b=2)
DELAY_RATE_ABLE = NumberGenerator(TRIANGULAR, low=2, high=3, mode=6)

# DELAY_RATE_BAKER = NumberGenerator(RANDINT, a=1, b=7)
# DELAY_RATE_ABLE = NumberGenerator(RANDINT, a=1, b=5)

d1 = Disposer()
d1.logs = True

# 1 is Able's maximum simultanious clients
dl1 = Delay(d1, DELAY_RATE_ABLE.next, None, 1)
dl1.name = 'Delay'
dl1.logs = True


q1 = Queue([dl1])
q1.logs = True

pr1 = ActorProbe(q1)
pr1.name = 'Queue Probe'
q1.actorprobe = pr1

pr2 = ActorProbe(dl1)
pr2.name = 'Delay Probe'
dl1.actorprobe = pr2


g1 = AutomaticGenerator(q1, Entity, None, INTERVAL_RATE.next, 200)
Exemplo n.º 4
0
INTERVAL_RATE = NumberGenerator(UNIFORM, a=1, b=4)
DELAY_RATE_3 = NumberGenerator(TRIANGULAR, low=6, high=16, mode=10)
DELAY_RATE_2 = NumberGenerator(UNIFORM, a=2, b=4)
DELAY_RATE_1 = NumberGenerator(UNIFORM, a=0, b=4)

MAX_ENTITIES = 100000

d1 = Disposer()
d1.logs = False
d1.deleteentityfrommemory = False

########################################################

dl4 = Delay(d1, DELAY_RATE_1.next, None, 1)
dl4.name = "Delay 4"
dl4.logs = False

pr6 = ActorProbe(dl4)
pr6.name = "Probe Delay 4"
dl4.actorprobe = pr6

pr7 = ActorProbe(dl4)
pr7.name = "Global Probe"
pr7.calculatenumentities = True
dl4.actorleaveprobe = pr7


q4 = Queue([dl4])
q4.name = "Queue 4"
q4.logs = False