add application to clients
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-12-03 22:56:19 +01:00
parent a9f473e2d9
commit 079e887c6a
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
3 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,6 @@
from pprint import pprint
from scenarioplanner import Scenarioplanner
from src import scenarioplanner
def preparesimulation() -> Scenarioplanner:
@ -9,6 +8,8 @@ def preparesimulation() -> Scenarioplanner:
scenarioplanner.simulationLength = 120
scenarioplanner.createapplications()
scenarioplanner.createclients(1000)
print("Number of Birbnetes clients: " + str(scenarioplanner.statsModule.birbnetesClients))
print("Number of Videochat clients: " + str(scenarioplanner.statsModule.videochatClients))
return scenarioplanner

View File

@ -56,6 +56,7 @@ class Scenarioplanner:
currentclient: Client = Client()
currentclient.lengthOfTransmission = random.randint(1, self.maxLengthofTransmission)
numoftransmissions: int = random.randint(1, 10)
currentclient.application = self.pickapplicationforclient()
for j in range(numoftransmissions):
currentclient.startSlices.append(
random.randint(1, self.simulationLength - self.maxLengthofTransmission))