Example #1
0
def createObject(type):
    hvac= nmub.HVAC(25,omega[0])
    Tnhat=[2.0,4.0,5.0,2.0,5.0]
    hvac.setTn(Tnhat)
    bk=nmub.bkGen(omega[2])
    dc =nmub.DC([2.5,4.,4.],[2000,2000,2000],omega[1],omega_sla,omega_wat)
    mub=nmub.operator([1,2,3],[1,2,3],100,[1,2,3],[1,2,3],200,omega,type)
    return hvac,dc,bk,mub
Example #2
0
File: Main.py Project: pchuanvn/MUB
nmub.I=I
nmub.rho=rho
#hvac.userComfCost()
#hvac.enReduc()
#hvac.optimizeOfficei(1,5)
#initialize the datacenter with services rate of each tenant per s and max server
#nmub.DC(mu,S,omega)
dc =nmub.DC([3.0, 3.0, 3.0,3.5, 4.5],[2000,2000,2000,2000,2000],omega[1],omega_sla)

#arrival rate
dc.setlamb([1100.0,1200.0,1300.0,1500.0,1600.0])
#dc.setSwitchSever([200,100,100,200,100])
#dc.minServer()
#dc.solx()
#def __init__(self,sigmai,sigman,e_i,e_n,e_z):
mub=nmub.operator([1,2,3,4,5],[1,2,3,4,5],100,[1,2,3,4,5],[1,2,3,4,5],200)
#mub.calv()
#    def updateEn(self,sigman,en_):
runTime = 200
#
#
#
#
bk_totalcost= np.zeros(runTime)
T=np.ones((3,runTime))
s=np.ones((3,runTime))
energy = np.ones((7,runTime))
sigma = np.ones((7,runTime))
cost = np.ones((7,runTime))

Tnhat1=np.zeros(runTime)
Example #3
0
nmub.I=I
nmub.rho=rho
#hvac.userComfCost()
#hvac.enReduc()
#hvac.optimizeOfficei(1,5)
#initialize the datacenter with services rate of each tenant per s and max server
#nmub.DC(mu,S,omega)
dc =nmub.DC([2.5,4.,4.],[2000,2000,2000],omega[1],omega_sla,omega_wat)

#arrival rate
dc.setlamb([1100.0,1100.0,1100.0])
#dc.setSwitchSever([200,100,100,200,100])
#dc.minServer()
#dc.solx()
#def __init__(self,sigmai,sigman,e_i,e_n,e_z):
mub=nmub.operator([1,2,3],[1,2,3],100,[1,2,3],[1,2,3],200,omega)
#mub.calv()
#    def updateEn(self,sigman,en_):
runTime = 500
#
#
#
#
bk_totalcost= np.zeros(runTime)
T=np.ones((3,runTime))
s=np.ones((3,runTime))
energy = np.ones((7,runTime))
sigma = np.ones((7,runTime))
cost = np.ones((7,runTime))

Tnhat1=np.zeros(runTime)
Example #4
0
stride=2
###########################################
#create objects
df_Tn=25
Tnhat=[2.0,4.0,5.0,2.0,5.0]
df_lamb=[1100.0,1100.0,1100.0]
df_mu=[2.5,4.,4.]
df_S=[2000,2000,2000]
df_sigma=[1,2,3]
df_ehat=[1,2,3]
df_bk=200
hvac= nmub.HVAC(df_Tn,omega[0])
hvac.setTn(Tnhat)
bk=nmub.bkGen(omega[2])
dc =nmub.DC(df_mu,df_S,omega[1],omega_sla,omega_wat)
mub=nmub.operator([1,2,3],[1,2,3],100,[1,2,3],[1,2,3],200,omega,0)

#########################################
nmub.omega_wat=omega_wat
nmub.Q=Q
nmub.n=n
nmub.I=I
nmub.rho=rho
nmub.omega=omega
nmub.omega_sla=omega_sla
nmub.omega_wat=omega_wat
nmub.runTime=runTime

pltmub.maxtimeslot=maxtimeslot
pltmub.runTime=runTime
pltmub.stride=stride