-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
waters experiments, and minor modifications to previous exps
- Loading branch information
Showing
24 changed files
with
589 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1.2 1.3 1.4 1.5 1.6 1.7 1.8 | ||
1000 1000 1000 1000 1000 1000 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import numpy as np | ||
import math | ||
import matplotlib.pyplot as plt | ||
import sys | ||
from scipy.interpolate import splrep, splev, make_interp_spline | ||
|
||
def get_smooth_x_y(list_x, list_y): | ||
bspl = splrep(list_x,list_y,s=3) | ||
bspl_y = splev(list_x,bspl) | ||
return bspl_y | ||
#X_Y_Spline = make_interp_spline(xticks, data[i]) | ||
#X_ = np.linspace(xticks.min(), xticks.max(), 50) | ||
#Y_ = X_Y_Spline(X_) | ||
|
||
def main(): | ||
|
||
strect_factors = [] | ||
data = [[], [], [], [], []] | ||
|
||
markers = ["s", "D", "o", "*", "v", "^"] | ||
linestyles = ['-', '--', ':', '--', '-', '--'] | ||
colors = ['#ff8080', '#ff9900', "#00cccc", 'r', 'blue', 'm', 'g'] | ||
patterns = ['o', 'x', '\\', '+', '.', 'O', '-'] | ||
|
||
with open("waters_ar.csv") as f: | ||
strect_factors = [float(x) for x in f.readline().strip().rstrip('\n').split(" ")] | ||
total_tasks = [int(x) for x in f.readline().strip().rstrip('\n').split(" ")] | ||
for i in range(len(data)): | ||
data[i] = [float(x) for x in f.readline().strip().rstrip('\n').split(" ")] | ||
|
||
for i in range(len(data)): | ||
data[i] = [100 * float(data[i][j]) / total_tasks[j] for j in range(len(total_tasks))] | ||
|
||
#print (data) | ||
fig = plt.figure(num=None, figsize=(6, 4.5), dpi=80, edgecolor='k') | ||
plt.xlim(1.2, 1.82) | ||
ax = fig.add_subplot(111) | ||
plt.ylim(0, 105) | ||
plt.xlabel("Normalized LBG", fontsize=18) | ||
plt.ylabel("Acceptance Ratio [AR] (%)", fontsize=18) | ||
labels = ["3 tasks", "5 tasks", "8 tasks", "10 tasks", "12 tasks", "15 tasks"] | ||
xticks = strect_factors | ||
plt.xticks(xticks) | ||
|
||
for i in range(len(data)): | ||
xticks = np.array(xticks) | ||
data[i] = get_smooth_x_y(xticks, np.array(data[i])) | ||
# X_Y_Spline = make_interp_spline(xticks, data[i]) | ||
# X_ = np.linspace(xticks.min(), xticks.max(), 50) | ||
# Y_ = X_Y_Spline(X_) | ||
ax.plot(xticks, data[i], color=colors[i], linestyle=linestyles[i], marker=markers[i], label=labels[i], linewidth=3.6, markersize=12) | ||
|
||
plt.tick_params(axis='both', which='major', labelsize=14) | ||
plt.tick_params(axis='both', which='minor', labelsize=14) | ||
|
||
ax.legend(loc='upper left', bbox_to_anchor=(0.0, 1.02), prop={'size': 18}) | ||
plt.grid() | ||
plt.tight_layout(pad=0.15) | ||
# plt.show() | ||
plt.savefig("increasing_task.pdf") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1.2 1.3 1.4 1.5 1.6 1.7 1.8 | ||
1000 1000 1000 1000 1000 1000 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import numpy as np | ||
import math | ||
import matplotlib.pyplot as plt | ||
import sys | ||
from scipy.interpolate import splrep, splev, make_interp_spline | ||
|
||
def get_smooth_x_y(list_x, list_y): | ||
bspl = splrep(list_x,list_y,s=3) | ||
bspl_y = splev(list_x,bspl) | ||
return bspl_y | ||
#X_Y_Spline = make_interp_spline(xticks, data[i]) | ||
#X_ = np.linspace(xticks.min(), xticks.max(), 50) | ||
#Y_ = X_Y_Spline(X_) | ||
|
||
def main(): | ||
|
||
strect_factors = [] | ||
data = [[], [], [], [], []] | ||
|
||
markers = ["s", "D", "o", "*", "v", "^"] | ||
linestyles = ['-', '--', ':', '--', '-', '--'] | ||
colors = ['#ff8080', '#ff9900', "#00cccc", 'r', 'blue', 'm', 'g'] | ||
patterns = ['o', 'x', '\\', '+', '.', 'O', '-'] | ||
|
||
with open("waters_avge2e.csv") as f: | ||
strect_factors = [float(x) for x in f.readline().strip().rstrip('\n').split(" ")] | ||
total_tasks = [int(x) for x in f.readline().strip().rstrip('\n').split(" ")] | ||
for i in range(len(data)): | ||
data[i] = [int(float(x)/1000000) for x in f.readline().strip().rstrip('\n').split(" ")] | ||
|
||
# for i in range(len(data)): | ||
# data[i] = [100 * float(data[i][j]) / total_tasks[j] for j in range(len(total_tasks))] | ||
|
||
#print (data) | ||
fig = plt.figure(num=None, figsize=(6, 4.5), dpi=80, edgecolor='k') | ||
plt.xlim(1.2, 1.82) | ||
ax = fig.add_subplot(111) | ||
plt.ylim(0, 105) | ||
plt.xlabel("Normalized LBG", fontsize=18) | ||
plt.ylabel("Avg E2E Delay (ms)", fontsize=18) | ||
labels = ["3 tasks", "5 tasks", "8 tasks", "10 tasks", "12 tasks", "15 tasks"] | ||
xticks = strect_factors | ||
plt.xticks(xticks) | ||
|
||
for i in range(len(data)): | ||
xticks = np.array(xticks) | ||
data[i] = get_smooth_x_y(xticks, np.array(data[i])) | ||
# X_Y_Spline = make_interp_spline(xticks, data[i]) | ||
# X_ = np.linspace(xticks.min(), xticks.max(), 50) | ||
# Y_ = X_Y_Spline(X_) | ||
ax.plot(xticks, data[i], color=colors[i], linestyle=linestyles[i], marker=markers[i], label=labels[i], linewidth=3.6, markersize=12) | ||
|
||
plt.tick_params(axis='both', which='major', labelsize=14) | ||
plt.tick_params(axis='both', which='minor', labelsize=14) | ||
|
||
ax.legend(loc='upper left', bbox_to_anchor=(0.0, 1.02), prop={'size': 18}) | ||
plt.grid() | ||
plt.tight_layout(pad=0.15) | ||
# plt.show() | ||
plt.savefig("waters_avge2e.pdf") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
388 0 0 0 194 196 0 0 158 8 6 9 17 11 12 12 0 0 0 0 0 0 0 119 6 9 6 11 10 11 12 50 42 37 43 18 0 0 0 41 17 37 0 6 11 6 11 12 20 18 19 55 49 34 16 0 0 0 0 0 0 16 7 11 11 11 12 12 41 44 6 15 13 13 14 13 43 44 38 43 58 0 140 93 93 87 0 0 150 142 136 0 0 0 209 205 214 0 0 0 385 290 281 0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
544683 784655 810448 905034 1024977 1086043 | ||
2298565 2589989 2840398 3159804 3345324 3601636 | ||
7587018 8152941 8396228 8717911 9223395 9511626 | ||
9948477 11797184 13010960 13693499 14135225 14576953 | ||
16786435 17691684 19012063 20121746 20770835 21419924 | ||
26959160 27359890 29848372 31297391 32306988 33316578 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
7 17 24 33 51 70 | ||
9 22 45 90 141 1000 | ||
27 42 101 196 1000 1000 | ||
14 50 137 1000 1000 1000 | ||
12 36 166 1000 1000 1000 | ||
10 45 236 1000 1000 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.