Skip to content

Commit c640d61

Browse files
author
gaoguanyu
committedOct 5, 2014
dd
1 parent 7189572 commit c640d61

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎cvx_partial_caching.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def average_arrival(rate, popularity, seg, seg_num):
3232
format_trans_price = [i * (0.105 / 3600) for i in [0.5, 0.45, 0.39, 0.37]] #0.105
3333
trans_latency = [2.91, 2.87, 2.27, 1.96]
3434
storage_p = 0.0300 / 1000
35-
35+
resolutions = ['1280_720', '854_480', '640_360', '426_240']
3636

3737
r = redis.StrictRedis(host='localhost', port=6379, db=0)
3838
r.set("content_num", content_num)
@@ -55,7 +55,6 @@ def average_arrival(rate, popularity, seg, seg_num):
5555
content = str(content)
5656
new_dir = os.path.join(dest_path, content)
5757
if not os.path.exists(new_dir):
58-
#shutil.rmtree(new_dir)
5958
os.makedirs(new_dir)
6059

6160
seg_num = seg_nums[0][i];
@@ -85,7 +84,6 @@ def average_arrival(rate, popularity, seg, seg_num):
8584
else:
8685
shutil.copy2(old_seg, new_seg)
8786

88-
resolutions = ['1280_720', '854_480', '640_360', '426_240']
8987

9088
for j in range(0, format_num):
9189
for seg in range(seg_num):
@@ -127,7 +125,7 @@ def average_arrival(rate, popularity, seg, seg_num):
127125
/ total_seg_rate, "<=", 10000000000, "c1")
128126
m.optimize()
129127

130-
optimal_cost = m.objVal
128+
optimal_cost = m.objVal
131129

132130

133131
for v in m.getVars():

0 commit comments

Comments
 (0)
Please sign in to comment.