예제 #1
0
파일: baseline2.py 프로젝트: pchuanvn/MUB
        cost[4][i]=dc.dcCosti(1)
        cost[5][i]=dc.dcCosti(2)
        cost[6][i]=bk.bgCost()
        
    totalcost[t]=hvac.userComfCost()+dc.dcCost()+bk.bgCost()
    
    

################################################
#plt.plot(totalcost)
nmub.saveFile('baseline2.p',totalcost)
baseline1=np.zeros(100)
baseline2=np.zeros(100)
dane=np.zeros(100)

baseline1=nmub.loadFile('baseline1.p',baseline1)
baseline2=nmub.loadFile('baseline2.p',baseline2)
dane=nmub.loadFile('DANE.p',dane)
plt.plot(baseline1,label='Baseline 1')
plt.plot(baseline2,label='Baseline 2')
plt.plot(dane,label='DANE')
plt.legend(loc=1)


def plot_lines(datas, numb_of_line, markerstyle, labels, title ):
   for line in range(numb_of_line):
       plt.plot(datas[line], marker = markerstyle, markersize=4, label=labels[line])
   plt.legend(loc=1)
   plt.title(title)
   plt.show()
예제 #2
0
import numpy as np
from scipy import optimize
from scipy.optimize import fsolve
import matplotlib.pyplot as plt

import  unNormalizedMUB as umub

baseline1=np.zeros(100)
DANE=np.zeros(100)

baseline1=umub.loadFile('baseline.p',baseline1)
DANE=umub.loadFile('DANE.p',baseline1)
baesline2=umub.loadFile('baseline2.p',baseline2)

plt.plot(baseline1,marker = '+', markersize=4, label='Baseline 1')
plt.plot(DANE,color='r',marker = 'o', markersize=4, label='DANE 1')
plt.plot(baseline2,marker = '+', markersize=4, label='Baselin 2')
plt.legend(loc=1)
예제 #3
0
파일: plot_conv.py 프로젝트: pchuanvn/MUB
    #     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,2)
    #     [hvac0,dc0,bk0,energy0,cost0,total]=nmub.MUB([lamb[0][i],lamb[1][i],lamb[2][i]],0,hvac,dc,bk,mub)
    #     DANE_trace[i]=total[runTime-1]
    #     [hvac0,dc0,bk0,energy0,cost0,total]=nmub.MUB([lamb[0][i],lamb[1][i],lamb[2][i]],1,hvac,dc,bk,mub)
    #     baseline1_trace[i]=total[runTime-1]
    #     [hvac0,dc0,bk0,energy0,cost0,total]=nmub.MUB([lamb[0][i],lamb[1][i],lamb[2][i]],2,hvac,dc,bk,mub)
    #     baseline2_trace[i]=total[runTime-1]
    data=[DANE_trace,baseline1_trace,baseline2_trace]
    #data=nmub.saveFile('data_plot.p',data)
    # nmub.saveFile('DANE_trace.p',DANE_trace)
    # nmub.saveFile('baseline1_trace.p',baseline1_trace)
    # nmub.saveFile('base2.p',baseline2_trace)
    # DANE_trace=nmub.loadFile('DANE_trace.p',DANE_trace)
    # baseline1_trace=nmub.loadFile('baseline2_trace.p',baseline1_trace)
    # baseline2_trace=nmub.loadFile('base2.p',baseline2_trace)

    data=nmub.loadFile('data_plot.p',data)
    print(data)
    ls=['-','--','--']
    markerstyle=['^','d','o']
    title=''
    labels=['DANE','Baseline 1','Baseline 2']

    pltmub.plot_lines(data, 3, ls,markerstyle,6, title, labels, 'Time slots', 'Total cost',1,'total_trace')