<jupyter_start><jupyter_text>SR41<jupyter_code>data_folder = os.path.join('..', '..', '..', 'data', 'input_files_SR41_fix')
nb = MNM_network_builder()
nb.load_from_folder(data_folder)
nb.config
whole_observable_list = list(map(lambda x: x.ID, filter(lambda x: x.ffs < 1000, nb.link_list)))
obserable_list = list(filter(lambda x: np.random.rand() < 0.2, whole_observable_list))
paths_list = range(39561)
x_real = np.random.rand(nb.config.config_dict['DTA']['max_interval'], len(obserable_list) ) * 100
data_dict = dict()
link_df = pd.DataFrame(index = range(nb.config.config_dict['DTA']['max_interval']), 
                       columns = obserable_list, data = x_real)
data_dict['link_flow'] = [link_df]
config = dict()
config['use_link_flow'] = True
config['use_link_tt'] = False
config['link_flow_weight'] = 1
config['link_tt_weight'] = 1
config['num_data'] = 1
config['observed_links'] = obserable_list
config['paths_list'] = paths_list
dode = DODE(nb, config)
dode.add_data(data_dict)
dode.estimate_path_flow()
f_e = dode.init_path_flow()
hash = hashlib.sha1()
hash.update(str(time.time()))
new_folder = str(hash.hexdigest())
nb.update_demand_path(f_e)
nb.dump_to_folder(new_folder)
a = MNMAPI.dta_api()
a.initialize(new_folder)
# shutil.rmtree(new_folder)
a.register_links(obserable_list)
a.register_paths(paths_list)
a.install_cc()
a.install_cc_tree()
a.run_whole()
nb.demand<jupyter_output><empty_output><jupyter_text>Speed<jupyter_code>dode = DODE(nb, config)
f_e = dode.init_path_flow()
dta = dode._run_simulation(f_e)
tt = dta.get_link_tt(np.arange(0, dode.num_loading_interval, dode.ass_freq))
tt.shape
config
tt
nb.get_link(3).get_fft()
from scipy.sparse import csr_matrix

csr_matrix()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1545138888888889, 'fraction_numerical': 0.013888888888888888, 'mean_word_length': 7.194312796208531, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '69033', 'license': 'MIT', 'n_tokens_mistral': 723, 'n_tokens_neox': 695, 'n_words': 99, 'path': 'src/examples/MNMAPI_test/libDODE.ipynb', 'repo_name': 'AlanPi1992/MAC-POSTS', 'size': '1728'}