2020-04-16 01:07:05 +00:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2020-04-16 22:41:16 +00:00
"[{'N': 3, 'T': range(0, 182), 'M': {'block_time': 30, 'i_storage': 500, 'i_in_bandwidth': 500, 'i_out_bandwidth': 140, 'j_storage': 500, 'j_in_bandwidth': 400, 'j_out_bandwidth': 100, 'p_storage': 4000, 'p_in_bandwidth': 400, 'p_out_bandwidth': 600, 'k_storage': 8000, 'k_in_bandwidth': 400, 'k_out_bandwidth': 80, 'j_avail_to_i': 0.9, 'k_avail_to_i': 0.8, 'j_avail_to_k': 0.7, 'p_avail_to_i': 0.6, 'depth': 15}}, {'N': 3, 'T': range(0, 182), 'M': {'block_time': 30, 'i_storage': 500, 'i_in_bandwidth': 1234, 'i_out_bandwidth': 140, 'j_storage': 500, 'j_in_bandwidth': 400, 'j_out_bandwidth': 100, 'p_storage': 4000, 'p_in_bandwidth': 400, 'p_out_bandwidth': 600, 'k_storage': 8000, 'k_in_bandwidth': 400, 'k_out_bandwidth': 80, 'j_avail_to_i': 0.9, 'k_avail_to_i': 0.8, 'j_avail_to_k': 0.7, 'p_avail_to_i': 0.6, 'depth': 15}}]\n",
"[{'N': 3, 'T': range(0, 182), 'M': {'block_time': 30, 'i_storage': 500, 'i_in_bandwidth': 500, 'i_out_bandwidth': 140, 'j_storage': 500, 'j_in_bandwidth': 400, 'j_out_bandwidth': 100, 'p_storage': 4000, 'p_in_bandwidth': 400, 'p_out_bandwidth': 600, 'k_storage': 8000, 'k_in_bandwidth': 400, 'k_out_bandwidth': 80, 'j_avail_to_i': 0.9, 'k_avail_to_i': 0.8, 'j_avail_to_k': 0.7, 'p_avail_to_i': 0.6, 'depth': 15}}, {'N': 3, 'T': range(0, 182), 'M': {'block_time': 30, 'i_storage': 500, 'i_in_bandwidth': 1234, 'i_out_bandwidth': 140, 'j_storage': 500, 'j_in_bandwidth': 400, 'j_out_bandwidth': 100, 'p_storage': 4000, 'p_in_bandwidth': 400, 'p_out_bandwidth': 600, 'k_storage': 8000, 'k_in_bandwidth': 400, 'k_out_bandwidth': 80, 'j_avail_to_i': 0.9, 'k_avail_to_i': 0.8, 'j_avail_to_k': 0.7, 'p_avail_to_i': 0.6, 'depth': 15}}]\n"
2020-04-16 01:07:05 +00:00
]
}
],
"source": [
"from src.sim import run\n",
"import matplotlib.pyplot as plt\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" __________ ____ \n",
" ________ __ _____/ ____/ | / __ \\\n",
" / ___/ __` / __ / / / /| | / / / /\n",
" / /__/ /_/ / /_/ / /___/ ___ |/ /_/ / \n",
" \\___/\\__,_/\\__,_/\\____/_/ |_/_____/ \n",
" by BlockScience\n",
" \n",
2020-04-16 22:41:16 +00:00
"Execution Mode: multi_proc: [<cadCAD.configuration.Configuration object at 0x00000255875CDA58>, <cadCAD.configuration.Configuration object at 0x00000255875CDA90>]\n",
"Configurations: [<cadCAD.configuration.Configuration object at 0x00000255875CDA58>, <cadCAD.configuration.Configuration object at 0x00000255875CDA90>]\n"
2020-04-16 01:07:05 +00:00
]
}
],
"source": [
"experiments = run.run()"
]
},
{
"cell_type": "code",
2020-04-16 22:41:16 +00:00
"execution_count": 3,
2020-04-16 01:07:05 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2020-04-16 22:41:16 +00:00
"<class 'src.model.utils.Event'>: {'sending_node': 'i', 'receiving_node': 'j', 'hash_file': 2, 'size': 3, 'block_init': 4, 'reward': 5, 'block_end': None, 'storing_node': None, 'proving_node': None, 'time': None}\n"
]
}
],
"source": [
"print(experiments.dataset[0]['event'][4])"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'src.model.utils.History'>: {'active': [<src.model.utils.Event object at 0x000002558AF62E10>], 'routed': [], 'solved': []}\n"
2020-04-16 01:07:05 +00:00
]
}
],
"source": [
2020-04-16 22:41:16 +00:00
"print(experiments.dataset[0]['history'][4])"
2020-04-16 01:07:05 +00:00
]
2020-04-16 22:41:16 +00:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
2020-04-16 01:07:05 +00:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}