Copyright (c) Chair of Communication Networks, Technical University of Munich ''' import numpy as np import matplotlib import scipy as sp import scipy.stats import matplotlib.pyplot as plt import ci from preprocessing import compile_results, remove_simdata # --- throughput --- # compile_results('fig5_throughput', 'Throughput', 'Fig5') f = open("../export/fig5_throughput_data") lines = f.read().split(' ') # --- accesses --- # compile_results('fig5_access', 'Access', 'Fig5') f1 = open("../export/fig5_access_data") lines1 = f1.read().split(' ') # --- collisions --- # compile_results('fig5_collisions', 'Collisions', 'Fig5') f2 = open("../export/fig5_collisions_data") lines2 = f2.read().split(' ') # --- parameters --- # n_s = [2*x for x in range(1, 21)]
import numpy as np import matplotlib import scipy as sp import scipy.stats import matplotlib.pyplot as plt import ci import os from preprocessing import compile_results, remove_simdata # variance_mean = [] # variance_ci = [] variance_box = [] # preprocess the data compile_results("fig3", "errVar", "Fig3") # open results of preprocessing f = open("../export/fig3_data") lines = f.read().split(" ") # --- 2-24 subsystems --- # n_s = [2 * x for x in range(1, 13)] n_rep = 30 i = 0 fig, ax = plt.subplots(figsize=(8.5, 5)) for i_s in n_s:
Copyright (c) Chair of Communication Networks, Technical University of Munich ''' import numpy as np import scipy as sp import scipy.stats import matplotlib.pyplot as plt import ci import matplotlib from preprocessing import compile_results, remove_simdata # --- preprocessing --- # compile_results('fig4', 'errVar', 'Fig4') lines = [] with open("../export/fig4_data") as f: for line in f: lines = line.split(' ') # --- setting parameters --- # n_s = [10, 16, 20] n_rep = 30 lmb = [(0.0+.1*x) for x in range(41)]
variance_nab_mean = [] variance_nab_ci = [] variance_nab_box = [] n_s = [4, 10, 14] n_rep = 100 p_g = [0.1+float(x)/10 for x in range(10)] fig, ax = plt.subplots(figsize=(8.5, 5)) p = [] # plots for i_s in n_s: # every number of subsystems compile_results('fig8n' + str(i_s), 'errVar', 'Fig8N'+str(i_s)) f = open("../export/fig8n" + str(i_s) + '_data') lines = f.read().split(' ') i = 0 variance_mean = [] variance_na_mean = [] for value in [False, True]: for p_g_i in p_g: var = [] diff = []
# --- variables --- # variance_mean = [] variance_ci = [] variance_box = [] variance_na_mean = [] variance_na_ci = [] variance_na_box = [] variance_nab_mean = [] variance_nab_ci = [] variance_nab_box = [] # --- preprocessing --- # compile_results('fig7adapt', 'errVar', 'Fig7Adapt') f = open("../export/fig7adapt_data") # f = open("../export/fig7_adapt_data-1.csv") lines = f.read().split(' ') compile_results('fig7nadapt_a', 'errVar', 'Fig7NonAdaptA') f1 = open("../export/fig7nadapt_a_data") # f1 = open("../export/fig7_nadapt_a_data-1.csv") lines1 = f1.read().split(' ') compile_results('fig7nadapt_b', 'errVar', 'Fig7NonAdaptB') f2 = open("../export/fig7nadapt_b_data") # f2 = open("../export/fig7_nadapt_b_data-1.csv") lines2 = f2.read().split(' ') n_s = [4, 6, 8, 10, 12, 14, 16]