示例#1
0
from sim.server import Server
from sim.task import Task,TaskPattern

# Base system

# Display info
DEBUG=True

# Name of the configuration
NAME="Random Wifi Delay (std 37.5%)"

# Cloud added latency
cd=7.5

#Links
d2dlink=Link("D2D",50000000., 1.75, 50000000., 1.75)
ltelink=Link("LTE",30000000., 9.95, 30000000., 9.95)
ltecloudlink=Link("LTE2Cloud",30000000., 9.95+cd, 30000000., 9.95+cd)
wifilink=RandomLink("WiFi",100000000.,37500000, 1.85,0,100000000.,37500000, 1.85,0)
wificloudlink=RandomLink("WiFi2Cloud",100000000.,37500000, 1.85+cd,0,100000000.,37500000, 1.85+cd,0)

#Set the one way added delay to connect to the cloud
device1=Server("Device",200.)
edge1=Server("Edge1",1000.)
edge2=Server("Edge2",1000.)
cloud1=Server("Cloud1",5000.)
cloud2=Server("Cloud2",5000.)
cloud3=Server("Cloud3",5000.)


# Connect the devices with a given link
示例#2
0
from sim.server import Server
from sim.task import Task, TaskPattern

# Base system

# Display info
DEBUG = True

# Name of the configuration
NAME = "E2"

# Cloud added latency
cd = 7.5

#Links
d2dlink = Link("D2D", 50000000., 1.75, 50000000., 1.75)
ltelink = Link("LTE", 30000000., 9.95, 30000000., 9.95)
ltecloudlink = Link("LTE2Cloud", 30000000., 9.95 + cd, 30000000., 9.95 + cd)
wifilink = Link("WiFi", 100000000., 1.85, 100000000., 1.85)
wificloudlink = Link("WiFi2Cloud", 100000000., 1.85 + cd, 100000000.,
                     1.85 + cd)

#Set the one way added delay to connect to the cloud
device1 = Server("Device", 200.)
edge1 = Server("Edge1", 1000.)
edge2 = Server("Edge2", 1000.)
cloud1 = Server("Cloud1", 5000.)
cloud2 = Server("Cloud2", 5000.)
cloud3 = Server("Cloud3", 5000.)

# Connect the devices with a given link
示例#3
0
from sim.intermittentlink import IntermittentLink
from sim.link import Link
from sim.server import Server
from sim.task import Task, TaskPattern

# Base system
NAME = "Single Server LTE"

# Display info
DEBUG = True

# Cloud added latency
cd = 7.5

#Links
d2dlink = Link("D2D", 50000000., 1.75, 50000000., 1.75)
ltelink = RandomLink("LTE", 30000000., 15000000 * 15000000, 9.95, 1.29,
                     30000000., 15000000 * 15000000, 9.95, 1.29)
ltecloudlink = RandomLink("LTE2Cloud", 30000000., 15000000, 9.95 + cd, 1.29,
                          30000000., 15000000 * 15000000, 9.95 + cd, 1.29)
wifilink = IntermittentLink("WiFi", 100000000., 50000000, 1.85, 1.20,
                            100000000., 50000000, 1.85, 1.20, 0.7)
wificloudlink = IntermittentLink("WiFi2Cloud", 100000000., 50000000, 1.85 + cd,
                                 1.20, 100000000., 50000000, 1.85 + cd, 1.20,
                                 0.7)

#Set the one way added delay to connect to the cloud
device1 = Server("Device", 200.)
edge1 = Server("Edge1", 1000.)
edge2 = Server("Edge2", 1000.)
cloud1 = Server("Cloud1", 5000.)