@@ -32,7 +32,7 @@ def average_arrival(rate, popularity, seg, seg_num):
32
32
format_trans_price = [i * (0.105 / 3600 ) for i in [0.5 , 0.45 , 0.39 , 0.37 ]] #0.105
33
33
trans_latency = [2.91 , 2.87 , 2.27 , 1.96 ]
34
34
storage_p = 0.0300 / 1000
35
-
35
+ resolutions = [ '1280_720' , '854_480' , '640_360' , '426_240' ]
36
36
37
37
r = redis .StrictRedis (host = 'localhost' , port = 6379 , db = 0 )
38
38
r .set ("content_num" , content_num )
@@ -55,7 +55,6 @@ def average_arrival(rate, popularity, seg, seg_num):
55
55
content = str (content )
56
56
new_dir = os .path .join (dest_path , content )
57
57
if not os .path .exists (new_dir ):
58
- #shutil.rmtree(new_dir)
59
58
os .makedirs (new_dir )
60
59
61
60
seg_num = seg_nums [0 ][i ];
@@ -85,7 +84,6 @@ def average_arrival(rate, popularity, seg, seg_num):
85
84
else :
86
85
shutil .copy2 (old_seg , new_seg )
87
86
88
- resolutions = ['1280_720' , '854_480' , '640_360' , '426_240' ]
89
87
90
88
for j in range (0 , format_num ):
91
89
for seg in range (seg_num ):
@@ -127,7 +125,7 @@ def average_arrival(rate, popularity, seg, seg_num):
127
125
/ total_seg_rate , "<=" , 10000000000 , "c1" )
128
126
m .optimize ()
129
127
130
- optimal_cost = m .objVal
128
+ optimal_cost = m .objVal
131
129
132
130
133
131
for v in m .getVars ():
0 commit comments