From 00f5d53888f79b6431c47751d62da471bd2ebd44 Mon Sep 17 00:00:00 2001 From: Markus Date: Fri, 15 Feb 2019 14:33:55 -0200 Subject: [PATCH 1/6] renaming some user-facing terms --- cadCAD/configuration/__init__.py | 14 +++++++------- cadCAD/configuration/utils/__init__.py | 6 +++--- cadCAD/engine/simulation.py | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cadCAD/configuration/__init__.py b/cadCAD/configuration/__init__.py index ed6e6ce..1c8cd75 100644 --- a/cadCAD/configuration/__init__.py +++ b/cadCAD/configuration/__init__.py @@ -10,17 +10,17 @@ from cadCAD.configuration.utils import exo_update_per_ts class Configuration(object): def __init__(self, sim_config={}, initial_state={}, seeds={}, env_processes={}, - exogenous_states={}, partial_state_updates={}, policy_ops=[foldr(dict_elemwise_sum())], **kwargs): + exogenous_states={}, partial_state_update_blocks={}, policy_ops=[foldr(dict_elemwise_sum())], **kwargs): self.sim_config = sim_config self.initial_state = initial_state self.seeds = seeds self.env_processes = env_processes self.exogenous_states = exogenous_states - self.partial_state_updates = partial_state_updates + self.partial_state_updates = partial_state_update_blocks self.policy_ops = policy_ops -def append_configs(sim_configs, initial_state, seeds, raw_exogenous_states, env_processes, partial_state_updates, _exo_update_per_ts=True): +def append_configs(sim_configs, initial_state, seeds, raw_exogenous_states, env_processes, partial_state_update_blocks, _exo_update_per_ts=True): if _exo_update_per_ts is True: exogenous_states = exo_update_per_ts(raw_exogenous_states) else: @@ -35,7 +35,7 @@ def append_configs(sim_configs, initial_state, seeds, raw_exogenous_states, env_ seeds=seeds, exogenous_states=exogenous_states, env_processes=env_processes, - partial_state_updates=partial_state_updates + partial_state_updates=partial_state_update_blocks ) ) elif isinstance(sim_configs, dict): @@ -46,7 +46,7 @@ def append_configs(sim_configs, initial_state, seeds, raw_exogenous_states, env_ seeds=seeds, exogenous_states=exogenous_states, env_processes=env_processes, - partial_state_updates=partial_state_updates + partial_state_updates=partial_state_update_blocks ) ) @@ -84,7 +84,7 @@ class Processor: self.apply_identity_funcs = id.apply_identity_funcs def create_matrix_field(self, partial_state_updates, key): - if key == 'states': + if key == 'variables': identity = self.state_identity elif key == 'policies': identity = self.policy_identity @@ -121,7 +121,7 @@ class Processor: if len(partial_state_updates) != 0: bdf = self.create_matrix_field(partial_state_updates, 'policies') - sdf = self.create_matrix_field(partial_state_updates, 'states') + sdf = self.create_matrix_field(partial_state_updates, 'variables') sdf_values, bdf_values = no_update_handler(bdf, sdf) zipped_list = list(zip(sdf_values, bdf_values)) else: diff --git a/cadCAD/configuration/utils/__init__.py b/cadCAD/configuration/utils/__init__.py index 084f7ae..229a738 100644 --- a/cadCAD/configuration/utils/__init__.py +++ b/cadCAD/configuration/utils/__init__.py @@ -11,7 +11,7 @@ class TensorFieldReport: def __init__(self, config_proc): self.config_proc = config_proc - def create_tensor_field(self, partial_state_updates, exo_proc, keys=['policies', 'states']): + def create_tensor_field(self, partial_state_updates, exo_proc, keys=['policies', 'variables']): dfs = [self.config_proc.create_matrix_field(partial_state_updates, k) for k in keys] df = pd.concat(dfs, axis=1) for es, i in zip(exo_proc, range(len(exo_proc))): @@ -52,7 +52,7 @@ def time_step(dt_str, dt_format='%Y-%m-%d %H:%M:%S', _timedelta = tstep_delta): ep_t_delta = timedelta(days=0, minutes=0, seconds=1) def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = ep_t_delta): - if s['sub_step'] == 0: + if s['substep'] == 0: return time_step(dt_str, fromat_str, _timedelta) else: return dt_str @@ -114,7 +114,7 @@ def sweep_states(state_type, states, in_config): def exo_update_per_ts(ep): @curried def ep_decorator(f, y, var_dict, sub_step, sL, s, _input): - if s['sub_step'] + 1 == 1: + if s['substep'] + 1 == 1: return f(var_dict, sub_step, sL, s, _input) else: return y, s[y] diff --git a/cadCAD/engine/simulation.py b/cadCAD/engine/simulation.py index 9e3a153..96f43e9 100644 --- a/cadCAD/engine/simulation.py +++ b/cadCAD/engine/simulation.py @@ -51,7 +51,7 @@ class Executor: self.apply_env_proc(env_processes, last_in_copy, last_in_copy['timestep']) # not time_step - last_in_copy["sub_step"], last_in_copy["time_step"], last_in_copy['run'] = sub_step, time_step, run + last_in_copy['substep'], last_in_copy['timestep'], last_in_copy['run'] = sub_step, time_step, run sL.append(last_in_copy) del last_in_copy @@ -62,7 +62,7 @@ class Executor: sub_step = 0 states_list_copy = deepcopy(states_list) genesis_states = states_list_copy[-1] - genesis_states['sub_step'], genesis_states['time_step'] = sub_step, time_step + genesis_states['substep'], genesis_states['timestep'] = sub_step, time_step states_list = [genesis_states] sub_step += 1 @@ -93,7 +93,7 @@ class Executor: states_list_copy = deepcopy(states_list) head, *tail = self.run_pipeline(var_dict, states_list_copy, configs, env_processes, time_seq, run) genesis = head.pop() - genesis['sub_step'], genesis['time_step'], genesis['run'] = 0, 0, run + genesis['substep'], genesis['timestep'], genesis['run'] = 0, 0, run first_timestep_per_run = [genesis] + tail.pop(0) pipe_run += [first_timestep_per_run] + tail del states_list_copy From ffd90b9ecdeebf2a8e70239af9cbf45d6639cf76 Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 18 Feb 2019 10:17:42 -0300 Subject: [PATCH 2/6] bug fix to match the renamed argument in Configuration constructor --- cadCAD/configuration/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cadCAD/configuration/__init__.py b/cadCAD/configuration/__init__.py index 1c8cd75..b5cd4d3 100644 --- a/cadCAD/configuration/__init__.py +++ b/cadCAD/configuration/__init__.py @@ -35,7 +35,7 @@ def append_configs(sim_configs, initial_state, seeds, raw_exogenous_states, env_ seeds=seeds, exogenous_states=exogenous_states, env_processes=env_processes, - partial_state_updates=partial_state_update_blocks + partial_state_update_blocks=partial_state_update_blocks ) ) elif isinstance(sim_configs, dict): @@ -46,7 +46,7 @@ def append_configs(sim_configs, initial_state, seeds, raw_exogenous_states, env_ seeds=seeds, exogenous_states=exogenous_states, env_processes=env_processes, - partial_state_updates=partial_state_update_blocks + partial_state_update_blocks=partial_state_update_blocks ) ) From 2c4b775d86ff884aa7d1924acc8000bd4f7db91b Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 18 Feb 2019 10:28:51 -0300 Subject: [PATCH 3/6] tests --- simulations/example_run.ipynb | 1856 +----------------------- simulations/validation/config1.py | 12 +- simulations/validation/config2.py | 12 +- simulations/validation/sweep_config.py | 12 +- 4 files changed, 89 insertions(+), 1803 deletions(-) diff --git a/simulations/example_run.ipynb b/simulations/example_run.ipynb index 8f8415a..41456f2 100644 --- a/simulations/example_run.ipynb +++ b/simulations/example_run.ipynb @@ -10,9 +10,9 @@ "from tabulate import tabulate\n", "\n", "# The following imports NEED to be in the exact order\n", - "from SimCAD.engine import ExecutionMode, ExecutionContext, Executor\n", - "from validation import config1, config2\n", - "from SimCAD import configs\n", + "from cadCAD.engine import ExecutionMode, ExecutionContext, Executor\n", + "from validation import config1, config2, config3\n", + "from cadCAD import configs\n", "\n", "exec_mode = ExecutionMode()" ] @@ -26,761 +26,105 @@ "name": "stdout", "output_type": "stream", "text": [ - "Simulation Execution 1\n", "\n", - "single_proc: []\n" - ] - } - ], - "source": [ - "print(\"Simulation Execution 1\")\n", - "print()\n", - "first_config = [configs[0]] # from config1\n", - "single_proc_ctx = ExecutionContext(context=exec_mode.single_proc)\n", - "run1 = Executor(exec_context=single_proc_ctx, configs=first_config)\n", - "run1_raw_result, raw_tensor_field = run1.main()\n", - "result = pd.DataFrame(run1_raw_result)\n", - "tensor_field = pd.DataFrame(raw_tensor_field)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Tensor Field:\n" + "config[0]\n", + "single_proc: []\n", + " run s1 s2 s3 s4 substep timestep\n", + "0 1 0 0 1 1 0 0\n", + "1 1 1 4 5 1.178862847343031816649272514 1 1\n", + "2 1 ab 6 5 1.178862847343031816649272514 2 1\n", + "3 1 [c, d] [30, 300] 5 1.178862847343031816649272514 3 1\n", + "4 1 1 4 5 1.230321371869816411424320371 1 2\n", + "\n", + "config[1]\n", + "single_proc: []\n", + " run s1 s2 s3 \\\n", + "0 1 0 0 1 \n", + "1 1 1 0 0.9583242152594528828757347583 \n", + "2 1 a 0 0.9583242152594528828757347583 \n", + "3 1 [c, d] [30, 300] 0.9583242152594528828757347583 \n", + "4 1 1 [30, 300] 0.9529320289547716885340867310 \n", + "\n", + " s4 substep timestep \n", + "0 1 0 0 \n", + "1 1.178862847343031816649272514 1 1 \n", + "2 1.178862847343031816649272514 2 1 \n", + "3 1.178862847343031816649272514 3 1 \n", + "4 1.230321371869816411424320371 1 2 \n", + "\n", + "config[2]\n", + "single_proc: []\n", + " run s1 s2 s3 s4 substep timestamp timestep\n", + "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", + "1 1 [1] 0 1 1 1 2018-10-01 15:16:24 1\n", + "2 1 [1] 0 1 1 1 2018-10-01 15:16:24 2\n", + "3 1 [1] 0 1 1 1 2018-10-01 15:16:24 3\n", + "4 1 [1] 0 1 1 1 2018-10-01 15:16:24 4\n" ] }, { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
b1b2s1s2es1es2es3m
0<function b1m1 at 0x109f25d90><function b2m1 at 0x10a2fda60><function s1m1 at 0x10a2fdd08><function s2m1 at 0x10a2fdd90><function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...1
1<function b1m2 at 0x10a2fdae8><function b2m2 at 0x10a2fdb70><function s1m2 at 0x10a2fde18><function s2m2 at 0x10a2fdea0><function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...2
2<function b1m3 at 0x10a2fdbf8><function b2m3 at 0x10a2fdc80><function s1m3 at 0x10a2fdf28><function s2m3 at 0x10a308048><function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...3
\n", - "
" - ], - "text/plain": [ - " b1 b2 \\\n", - "0 \n", - "1 \n", - "2 \n", - "\n", - " s1 s2 \\\n", - "0 \n", - "1 \n", - "2 \n", - "\n", - " es1 \\\n", - "0 ._curried at 0x10a30... \n", - "1 ._curried at 0x10a30... \n", - "2 ._curried at 0x10a30... \n", - "\n", - " es2 \\\n", - "0 ._curried at 0x10a30... \n", - "1 ._curried at 0x10a30... \n", - "2 ._curried at 0x10a30... \n", - "\n", - " es3 m \n", - "0 ._curried at 0x10a30... 1 \n", - "1 ._curried at 0x10a30... 2 \n", - "2 ._curried at 0x10a30... 3 " - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", + " FutureWarning)\n" + ] } ], "source": [ - "print(\"Tensor Field:\")\n", - "tensor_field" + "for idx, c in enumerate(configs):\n", + " print()\n", + " print(f\"config[{idx}]\")\n", + " single_proc_ctx = ExecutionContext(context=exec_mode.single_proc)\n", + " run1 = Executor(exec_context=single_proc_ctx, configs=[c])\n", + " run1_raw_result, raw_tensor_field = run1.main()\n", + " result = pd.DataFrame(run1_raw_result)\n", + " print(result.head())\n", + "# tensor_field = pd.DataFrame(raw_tensor_field)" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Output:\n" + "multi_proc: [, , , , ]\n" ] }, { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
mech_stepruns1s2s3s4time_steptimestamp
001001102018-10-01 15:16:24
1111451012018-10-01 15:16:25
221ab651012018-10-01 15:16:25
331[c, d][30, 300]51012018-10-01 15:16:25
41114510.4365098505119902050353175622018-10-01 15:16:26
521ab6510.4365098505119902050353175622018-10-01 15:16:26
631[c, d][30, 300]510.4365098505119902050353175622018-10-01 15:16:26
71114510.5372195281202876186024801332018-10-01 15:16:27
821ab6510.5372195281202876186024801332018-10-01 15:16:27
931[c, d][30, 300]510.5372195281202876186024801332018-10-01 15:16:27
10111458.57361635768008949978322321242018-10-01 15:16:28
1121ab658.57361635768008949978322321242018-10-01 15:16:28
1231[c, d][30, 300]58.57361635768008949978322321242018-10-01 15:16:28
13111458.33579435462959645300709321652018-10-01 15:16:29
1421ab658.33579435462959645300709321652018-10-01 15:16:29
1531[c, d][30, 300]58.33579435462959645300709321652018-10-01 15:16:29
1602001102018-10-01 15:16:24
17121451012018-10-01 15:16:25
1822ab651012018-10-01 15:16:25
1932[c, d][30, 300]51012018-10-01 15:16:25
20121459.91725851851753992249882685422018-10-01 15:16:26
2122ab659.91725851851753992249882685422018-10-01 15:16:26
2232[c, d][30, 300]59.91725851851753992249882685422018-10-01 15:16:26
23121459.29544573818278309896721217232018-10-01 15:16:27
2422ab659.29544573818278309896721217232018-10-01 15:16:27
2532[c, d][30, 300]59.29544573818278309896721217232018-10-01 15:16:27
26121459.25471479697655613481958888342018-10-01 15:16:28
2722ab659.25471479697655613481958888342018-10-01 15:16:28
2832[c, d][30, 300]59.25471479697655613481958888342018-10-01 15:16:28
29121458.81306312028134610425625981852018-10-01 15:16:29
3022ab658.81306312028134610425625981852018-10-01 15:16:29
3132[c, d][30, 300]58.81306312028134610425625981852018-10-01 15:16:29
\n", - "
" - ], - "text/plain": [ - " mech_step run s1 s2 s3 s4 \\\n", - "0 0 1 0 0 1 1 \n", - "1 1 1 1 4 5 10 \n", - "2 2 1 ab 6 5 10 \n", - "3 3 1 [c, d] [30, 300] 5 10 \n", - "4 1 1 1 4 5 10.43650985051199020503531756 \n", - "5 2 1 ab 6 5 10.43650985051199020503531756 \n", - "6 3 1 [c, d] [30, 300] 5 10.43650985051199020503531756 \n", - "7 1 1 1 4 5 10.53721952812028761860248013 \n", - "8 2 1 ab 6 5 10.53721952812028761860248013 \n", - "9 3 1 [c, d] [30, 300] 5 10.53721952812028761860248013 \n", - "10 1 1 1 4 5 8.573616357680089499783223212 \n", - "11 2 1 ab 6 5 8.573616357680089499783223212 \n", - "12 3 1 [c, d] [30, 300] 5 8.573616357680089499783223212 \n", - "13 1 1 1 4 5 8.335794354629596453007093216 \n", - "14 2 1 ab 6 5 8.335794354629596453007093216 \n", - "15 3 1 [c, d] [30, 300] 5 8.335794354629596453007093216 \n", - "16 0 2 0 0 1 1 \n", - "17 1 2 1 4 5 10 \n", - "18 2 2 ab 6 5 10 \n", - "19 3 2 [c, d] [30, 300] 5 10 \n", - "20 1 2 1 4 5 9.917258518517539922498826854 \n", - "21 2 2 ab 6 5 9.917258518517539922498826854 \n", - "22 3 2 [c, d] [30, 300] 5 9.917258518517539922498826854 \n", - "23 1 2 1 4 5 9.295445738182783098967212172 \n", - "24 2 2 ab 6 5 9.295445738182783098967212172 \n", - "25 3 2 [c, d] [30, 300] 5 9.295445738182783098967212172 \n", - "26 1 2 1 4 5 9.254714796976556134819588883 \n", - "27 2 2 ab 6 5 9.254714796976556134819588883 \n", - "28 3 2 [c, d] [30, 300] 5 9.254714796976556134819588883 \n", - "29 1 2 1 4 5 8.813063120281346104256259818 \n", - "30 2 2 ab 6 5 8.813063120281346104256259818 \n", - "31 3 2 [c, d] [30, 300] 5 8.813063120281346104256259818 \n", - "\n", - " time_step timestamp \n", - "0 0 2018-10-01 15:16:24 \n", - "1 1 2018-10-01 15:16:25 \n", - "2 1 2018-10-01 15:16:25 \n", - "3 1 2018-10-01 15:16:25 \n", - "4 2 2018-10-01 15:16:26 \n", - "5 2 2018-10-01 15:16:26 \n", - "6 2 2018-10-01 15:16:26 \n", - "7 3 2018-10-01 15:16:27 \n", - "8 3 2018-10-01 15:16:27 \n", - "9 3 2018-10-01 15:16:27 \n", - "10 4 2018-10-01 15:16:28 \n", - "11 4 2018-10-01 15:16:28 \n", - "12 4 2018-10-01 15:16:28 \n", - "13 5 2018-10-01 15:16:29 \n", - "14 5 2018-10-01 15:16:29 \n", - "15 5 2018-10-01 15:16:29 \n", - "16 0 2018-10-01 15:16:24 \n", - "17 1 2018-10-01 15:16:25 \n", - "18 1 2018-10-01 15:16:25 \n", - "19 1 2018-10-01 15:16:25 \n", - "20 2 2018-10-01 15:16:26 \n", - "21 2 2018-10-01 15:16:26 \n", - "22 2 2018-10-01 15:16:26 \n", - "23 3 2018-10-01 15:16:27 \n", - "24 3 2018-10-01 15:16:27 \n", - "25 3 2018-10-01 15:16:27 \n", - "26 4 2018-10-01 15:16:28 \n", - "27 4 2018-10-01 15:16:28 \n", - "28 4 2018-10-01 15:16:28 \n", - "29 5 2018-10-01 15:16:29 \n", - "30 5 2018-10-01 15:16:29 \n", - "31 5 2018-10-01 15:16:29 " - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "print(\"Output:\")\n", - "result" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", + "name": "stderr", "output_type": "stream", "text": [ - "Simulation Execution 2: Pairwise Execution\n", - "\n", - "multi_proc: [, ]\n" + "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", + " FutureWarning)\n" ] } ], "source": [ - "print(\"Simulation Execution 2: Pairwise Execution\")\n", - "print()\n", + "from validation import sweep_config\n", "multi_proc_ctx = ExecutionContext(context=exec_mode.multi_proc)\n", "run2 = Executor(exec_context=multi_proc_ctx, configs=configs)\n", "results = []\n", "tensor_fields = []\n", "for raw_result, raw_tensor_field in run2.main():\n", " results.append(pd.DataFrame(raw_result))\n", - " tensor_fields.append(pd.DataFrame(raw_tensor_field))" + " tensor_fields.append(pd.DataFrame(raw_tensor_field))\n", + "\n", + "for idx, r in enumerate(results):\n", + " print()\n", + " print(f\"result[{idx}]\")\n", + " print(r.head())" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Tensor Field A:\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
b1b2s1s2es1es2es3m
0<function b1m1 at 0x109f25d90><function b2m1 at 0x10a2fda60><function s1m1 at 0x10a2fdd08><function s2m1 at 0x10a2fdd90><function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...1
1<function b1m2 at 0x10a2fdae8><function b2m2 at 0x10a2fdb70><function s1m2 at 0x10a2fde18><function s2m2 at 0x10a2fdea0><function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...2
2<function b1m3 at 0x10a2fdbf8><function b2m3 at 0x10a2fdc80><function s1m3 at 0x10a2fdf28><function s2m3 at 0x10a308048><function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...3
\n", - "
" - ], - "text/plain": [ - " b1 b2 \\\n", - "0 \n", - "1 \n", - "2 \n", - "\n", - " s1 s2 \\\n", - "0 \n", - "1 \n", - "2 \n", - "\n", - " es1 \\\n", - "0 ._curried at 0x10a30... \n", - "1 ._curried at 0x10a30... \n", - "2 ._curried at 0x10a30... \n", - "\n", - " es2 \\\n", - "0 ._curried at 0x10a30... \n", - "1 ._curried at 0x10a30... \n", - "2 ._curried at 0x10a30... \n", - "\n", - " es3 m \n", - "0 ._curried at 0x10a30... 1 \n", - "1 ._curried at 0x10a30... 2 \n", - "2 ._curried at 0x10a30... 3 " - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "\n", "print(\"Tensor Field A:\")\n", @@ -789,479 +133,9 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Output A:\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
mech_stepruns1s2s3s4time_steptimestamp
001001102018-10-01 15:16:24
1111451012018-10-01 15:16:25
221ab651012018-10-01 15:16:25
331[c, d][30, 300]51012018-10-01 15:16:25
41114510.8846223804995845263476894622018-10-01 15:16:26
521ab6510.8846223804995845263476894622018-10-01 15:16:26
631[c, d][30, 300]510.8846223804995845263476894622018-10-01 15:16:26
71114511.8439037891546010592859424032018-10-01 15:16:27
821ab6511.8439037891546010592859424032018-10-01 15:16:27
931[c, d][30, 300]511.8439037891546010592859424032018-10-01 15:16:27
101114513.8687056777981817566008678242018-10-01 15:16:28
1121ab6513.8687056777981817566008678242018-10-01 15:16:28
1231[c, d][30, 300]513.8687056777981817566008678242018-10-01 15:16:28
131114513.9380958635320972504792206852018-10-01 15:16:29
1421ab6513.9380958635320972504792206852018-10-01 15:16:29
1531[c, d][30, 300]513.9380958635320972504792206852018-10-01 15:16:29
1602001102018-10-01 15:16:24
17121451012018-10-01 15:16:25
1822ab651012018-10-01 15:16:25
1932[c, d][30, 300]51012018-10-01 15:16:25
20121459.45464005238046967249943008922018-10-01 15:16:26
2122ab659.45464005238046967249943008922018-10-01 15:16:26
2232[c, d][30, 300]59.45464005238046967249943008922018-10-01 15:16:26
23121457.99250141557961352525319763532018-10-01 15:16:27
2422ab657.99250141557961352525319763532018-10-01 15:16:27
2532[c, d][30, 300]57.99250141557961352525319763532018-10-01 15:16:27
26121458.77765872647237926847033398342018-10-01 15:16:28
2722ab658.77765872647237926847033398342018-10-01 15:16:28
2832[c, d][30, 300]58.77765872647237926847033398342018-10-01 15:16:28
29121457.81117913728395304481061202852018-10-01 15:16:29
3022ab657.81117913728395304481061202852018-10-01 15:16:29
3132[c, d][30, 300]57.81117913728395304481061202852018-10-01 15:16:29
\n", - "
" - ], - "text/plain": [ - " mech_step run s1 s2 s3 s4 \\\n", - "0 0 1 0 0 1 1 \n", - "1 1 1 1 4 5 10 \n", - "2 2 1 ab 6 5 10 \n", - "3 3 1 [c, d] [30, 300] 5 10 \n", - "4 1 1 1 4 5 10.88462238049958452634768946 \n", - "5 2 1 ab 6 5 10.88462238049958452634768946 \n", - "6 3 1 [c, d] [30, 300] 5 10.88462238049958452634768946 \n", - "7 1 1 1 4 5 11.84390378915460105928594240 \n", - "8 2 1 ab 6 5 11.84390378915460105928594240 \n", - "9 3 1 [c, d] [30, 300] 5 11.84390378915460105928594240 \n", - "10 1 1 1 4 5 13.86870567779818175660086782 \n", - "11 2 1 ab 6 5 13.86870567779818175660086782 \n", - "12 3 1 [c, d] [30, 300] 5 13.86870567779818175660086782 \n", - "13 1 1 1 4 5 13.93809586353209725047922068 \n", - "14 2 1 ab 6 5 13.93809586353209725047922068 \n", - "15 3 1 [c, d] [30, 300] 5 13.93809586353209725047922068 \n", - "16 0 2 0 0 1 1 \n", - "17 1 2 1 4 5 10 \n", - "18 2 2 ab 6 5 10 \n", - "19 3 2 [c, d] [30, 300] 5 10 \n", - "20 1 2 1 4 5 9.454640052380469672499430089 \n", - "21 2 2 ab 6 5 9.454640052380469672499430089 \n", - "22 3 2 [c, d] [30, 300] 5 9.454640052380469672499430089 \n", - "23 1 2 1 4 5 7.992501415579613525253197635 \n", - "24 2 2 ab 6 5 7.992501415579613525253197635 \n", - "25 3 2 [c, d] [30, 300] 5 7.992501415579613525253197635 \n", - "26 1 2 1 4 5 8.777658726472379268470333983 \n", - "27 2 2 ab 6 5 8.777658726472379268470333983 \n", - "28 3 2 [c, d] [30, 300] 5 8.777658726472379268470333983 \n", - "29 1 2 1 4 5 7.811179137283953044810612028 \n", - "30 2 2 ab 6 5 7.811179137283953044810612028 \n", - "31 3 2 [c, d] [30, 300] 5 7.811179137283953044810612028 \n", - "\n", - " time_step timestamp \n", - "0 0 2018-10-01 15:16:24 \n", - "1 1 2018-10-01 15:16:25 \n", - "2 1 2018-10-01 15:16:25 \n", - "3 1 2018-10-01 15:16:25 \n", - "4 2 2018-10-01 15:16:26 \n", - "5 2 2018-10-01 15:16:26 \n", - "6 2 2018-10-01 15:16:26 \n", - "7 3 2018-10-01 15:16:27 \n", - "8 3 2018-10-01 15:16:27 \n", - "9 3 2018-10-01 15:16:27 \n", - "10 4 2018-10-01 15:16:28 \n", - "11 4 2018-10-01 15:16:28 \n", - "12 4 2018-10-01 15:16:28 \n", - "13 5 2018-10-01 15:16:29 \n", - "14 5 2018-10-01 15:16:29 \n", - "15 5 2018-10-01 15:16:29 \n", - "16 0 2018-10-01 15:16:24 \n", - "17 1 2018-10-01 15:16:25 \n", - "18 1 2018-10-01 15:16:25 \n", - "19 1 2018-10-01 15:16:25 \n", - "20 2 2018-10-01 15:16:26 \n", - "21 2 2018-10-01 15:16:26 \n", - "22 2 2018-10-01 15:16:26 \n", - "23 3 2018-10-01 15:16:27 \n", - "24 3 2018-10-01 15:16:27 \n", - "25 3 2018-10-01 15:16:27 \n", - "26 4 2018-10-01 15:16:28 \n", - "27 4 2018-10-01 15:16:28 \n", - "28 4 2018-10-01 15:16:28 \n", - "29 5 2018-10-01 15:16:29 \n", - "30 5 2018-10-01 15:16:29 \n", - "31 5 2018-10-01 15:16:29 " - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "print(\"Output A:\")\n", "results[0]" @@ -1269,127 +143,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Tensor Field B:\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
b1b2s1s2es1es2es3m
0<function b1m1 at 0x10a308488><bound method Identity.b_identity of <SimCAD.c...<function s1m1 at 0x10a308950><function Identity.state_identity.<locals>.<la...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...1
1<function b1m2 at 0x10a308730><bound method Identity.b_identity of <SimCAD.c...<function s1m2 at 0x10a308a60><function Identity.state_identity.<locals>.<la...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...2
2<function b1m3 at 0x10a308840><function b2m3 at 0x10a3088c8><function s1m3 at 0x10a308b70><function s2m3 at 0x10a308bf8><function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...<function curried.<locals>._curried at 0x10a30...3
\n", - "
" - ], - "text/plain": [ - " b1 \\\n", - "0 \n", - "1 \n", - "2 \n", - "\n", - " b2 \\\n", - "0 \n", - "\n", - " s1 \\\n", - "0 \n", - "1 \n", - "2 \n", - "\n", - " s2 \\\n", - "0 .. \n", - "\n", - " es1 \\\n", - "0 ._curried at 0x10a30... \n", - "1 ._curried at 0x10a30... \n", - "2 ._curried at 0x10a30... \n", - "\n", - " es2 \\\n", - "0 ._curried at 0x10a30... \n", - "1 ._curried at 0x10a30... \n", - "2 ._curried at 0x10a30... \n", - "\n", - " es3 m \n", - "0 ._curried at 0x10a30... 1 \n", - "1 ._curried at 0x10a30... 2 \n", - "2 ._curried at 0x10a30... 3 " - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "print(\"Tensor Field B:\")\n", "tensor_fields[1]" @@ -1397,479 +153,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Output B:\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
mech_stepruns1s2s3s4time_steptimestamp
001001102018-10-01 15:16:24
11110101012018-10-01 15:16:25
221a0101012018-10-01 15:16:25
331[c, d][30, 300]101012018-10-01 15:16:25
4111[30, 300]9.94373317277366997046783581010.4365098505119902050353175622018-10-01 15:16:26
521a[30, 300]9.94373317277366997046783581010.4365098505119902050353175622018-10-01 15:16:26
631[c, d][30, 300]9.94373317277366997046783581010.4365098505119902050353175622018-10-01 15:16:26
7111[30, 300]7.81955677476886926528452637110.5372195281202876186024801332018-10-01 15:16:27
821a[30, 300]7.81955677476886926528452637110.5372195281202876186024801332018-10-01 15:16:27
931[c, d][30, 300]7.81955677476886926528452637110.5372195281202876186024801332018-10-01 15:16:27
10111[30, 300]9.1021758460007533121249253318.57361635768008949978322321242018-10-01 15:16:28
1121a[30, 300]9.1021758460007533121249253318.57361635768008949978322321242018-10-01 15:16:28
1231[c, d][30, 300]9.1021758460007533121249253318.57361635768008949978322321242018-10-01 15:16:28
13111[30, 300]7.4697592395088619727980957658.33579435462959645300709321652018-10-01 15:16:29
1421a[30, 300]7.4697592395088619727980957658.33579435462959645300709321652018-10-01 15:16:29
1531[c, d][30, 300]7.4697592395088619727980957658.33579435462959645300709321652018-10-01 15:16:29
1602001102018-10-01 15:16:24
171210101012018-10-01 15:16:25
1822a0101012018-10-01 15:16:25
1932[c, d][30, 300]101012018-10-01 15:16:25
20121[30, 300]10.502881417158043131365730019.91725851851753992249882685422018-10-01 15:16:26
2122a[30, 300]10.502881417158043131365730019.91725851851753992249882685422018-10-01 15:16:26
2232[c, d][30, 300]10.502881417158043131365730019.91725851851753992249882685422018-10-01 15:16:26
23121[30, 300]9.1949701067745045497220664269.29544573818278309896721217232018-10-01 15:16:27
2422a[30, 300]9.1949701067745045497220664269.29544573818278309896721217232018-10-01 15:16:27
2532[c, d][30, 300]9.1949701067745045497220664269.29544573818278309896721217232018-10-01 15:16:27
26121[30, 300]8.2221862040910078929039996589.25471479697655613481958888342018-10-01 15:16:28
2722a[30, 300]8.2221862040910078929039996589.25471479697655613481958888342018-10-01 15:16:28
2832[c, d][30, 300]8.2221862040910078929039996589.25471479697655613481958888342018-10-01 15:16:28
29121[30, 300]7.4747832170044870609731757978.81306312028134610425625981852018-10-01 15:16:29
3022a[30, 300]7.4747832170044870609731757978.81306312028134610425625981852018-10-01 15:16:29
3132[c, d][30, 300]7.4747832170044870609731757978.81306312028134610425625981852018-10-01 15:16:29
\n", - "
" - ], - "text/plain": [ - " mech_step run s1 s2 s3 \\\n", - "0 0 1 0 0 1 \n", - "1 1 1 1 0 10 \n", - "2 2 1 a 0 10 \n", - "3 3 1 [c, d] [30, 300] 10 \n", - "4 1 1 1 [30, 300] 9.943733172773669970467835810 \n", - "5 2 1 a [30, 300] 9.943733172773669970467835810 \n", - "6 3 1 [c, d] [30, 300] 9.943733172773669970467835810 \n", - "7 1 1 1 [30, 300] 7.819556774768869265284526371 \n", - "8 2 1 a [30, 300] 7.819556774768869265284526371 \n", - "9 3 1 [c, d] [30, 300] 7.819556774768869265284526371 \n", - "10 1 1 1 [30, 300] 9.102175846000753312124925331 \n", - "11 2 1 a [30, 300] 9.102175846000753312124925331 \n", - "12 3 1 [c, d] [30, 300] 9.102175846000753312124925331 \n", - "13 1 1 1 [30, 300] 7.469759239508861972798095765 \n", - "14 2 1 a [30, 300] 7.469759239508861972798095765 \n", - "15 3 1 [c, d] [30, 300] 7.469759239508861972798095765 \n", - "16 0 2 0 0 1 \n", - "17 1 2 1 0 10 \n", - "18 2 2 a 0 10 \n", - "19 3 2 [c, d] [30, 300] 10 \n", - "20 1 2 1 [30, 300] 10.50288141715804313136573001 \n", - "21 2 2 a [30, 300] 10.50288141715804313136573001 \n", - "22 3 2 [c, d] [30, 300] 10.50288141715804313136573001 \n", - "23 1 2 1 [30, 300] 9.194970106774504549722066426 \n", - "24 2 2 a [30, 300] 9.194970106774504549722066426 \n", - "25 3 2 [c, d] [30, 300] 9.194970106774504549722066426 \n", - "26 1 2 1 [30, 300] 8.222186204091007892903999658 \n", - "27 2 2 a [30, 300] 8.222186204091007892903999658 \n", - "28 3 2 [c, d] [30, 300] 8.222186204091007892903999658 \n", - "29 1 2 1 [30, 300] 7.474783217004487060973175797 \n", - "30 2 2 a [30, 300] 7.474783217004487060973175797 \n", - "31 3 2 [c, d] [30, 300] 7.474783217004487060973175797 \n", - "\n", - " s4 time_step timestamp \n", - "0 1 0 2018-10-01 15:16:24 \n", - "1 10 1 2018-10-01 15:16:25 \n", - "2 10 1 2018-10-01 15:16:25 \n", - "3 10 1 2018-10-01 15:16:25 \n", - "4 10.43650985051199020503531756 2 2018-10-01 15:16:26 \n", - "5 10.43650985051199020503531756 2 2018-10-01 15:16:26 \n", - "6 10.43650985051199020503531756 2 2018-10-01 15:16:26 \n", - "7 10.53721952812028761860248013 3 2018-10-01 15:16:27 \n", - "8 10.53721952812028761860248013 3 2018-10-01 15:16:27 \n", - "9 10.53721952812028761860248013 3 2018-10-01 15:16:27 \n", - "10 8.573616357680089499783223212 4 2018-10-01 15:16:28 \n", - "11 8.573616357680089499783223212 4 2018-10-01 15:16:28 \n", - "12 8.573616357680089499783223212 4 2018-10-01 15:16:28 \n", - "13 8.335794354629596453007093216 5 2018-10-01 15:16:29 \n", - "14 8.335794354629596453007093216 5 2018-10-01 15:16:29 \n", - "15 8.335794354629596453007093216 5 2018-10-01 15:16:29 \n", - "16 1 0 2018-10-01 15:16:24 \n", - "17 10 1 2018-10-01 15:16:25 \n", - "18 10 1 2018-10-01 15:16:25 \n", - "19 10 1 2018-10-01 15:16:25 \n", - "20 9.917258518517539922498826854 2 2018-10-01 15:16:26 \n", - "21 9.917258518517539922498826854 2 2018-10-01 15:16:26 \n", - "22 9.917258518517539922498826854 2 2018-10-01 15:16:26 \n", - "23 9.295445738182783098967212172 3 2018-10-01 15:16:27 \n", - "24 9.295445738182783098967212172 3 2018-10-01 15:16:27 \n", - "25 9.295445738182783098967212172 3 2018-10-01 15:16:27 \n", - "26 9.254714796976556134819588883 4 2018-10-01 15:16:28 \n", - "27 9.254714796976556134819588883 4 2018-10-01 15:16:28 \n", - "28 9.254714796976556134819588883 4 2018-10-01 15:16:28 \n", - "29 8.813063120281346104256259818 5 2018-10-01 15:16:29 \n", - "30 8.813063120281346104256259818 5 2018-10-01 15:16:29 \n", - "31 8.813063120281346104256259818 5 2018-10-01 15:16:29 " - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "print(\"Output B:\")\n", "results[1]" diff --git a/simulations/validation/config1.py b/simulations/validation/config1.py index 4539208..a2d09d3 100644 --- a/simulations/validation/config1.py +++ b/simulations/validation/config1.py @@ -98,14 +98,14 @@ genesis_states = { 's2': Decimal(0.0), 's3': Decimal(1.0), 's4': Decimal(1.0), - 'timestep': '2018-10-01 15:16:24' +# 'timestep': '2018-10-01 15:16:24' } raw_exogenous_states = { "s3": es3p1, "s4": es4p2, - "timestep": es5p2 +# "timestep": es5p2 } @@ -121,7 +121,7 @@ partial_state_update_block = { "b1": p1m1, "b2": p2m1 }, - "states": { + "variables": { "s1": s1m1, "s2": s2m1 } @@ -131,7 +131,7 @@ partial_state_update_block = { "b1": p1m2, "b2": p2m2 }, - "states": { + "variables": { "s1": s1m2, "s2": s2m2 } @@ -141,7 +141,7 @@ partial_state_update_block = { "b1": p1m3, "b2": p2m3 }, - "states": { + "variables": { "s1": s1m3, "s2": s2m3 } @@ -163,5 +163,5 @@ append_configs( seeds=seeds, raw_exogenous_states=raw_exogenous_states, env_processes=env_processes, - partial_state_updates=partial_state_update_block + partial_state_update_blocks=partial_state_update_block ) diff --git a/simulations/validation/config2.py b/simulations/validation/config2.py index 5925c6c..6a22d01 100644 --- a/simulations/validation/config2.py +++ b/simulations/validation/config2.py @@ -97,14 +97,14 @@ genesis_states = { 's2': Decimal(0.0), 's3': Decimal(1.0), 's4': Decimal(1.0), - 'timestep': '2018-10-01 15:16:24' +# 'timestep': '2018-10-01 15:16:24' } raw_exogenous_states = { "s3": es3p1, "s4": es4p2, - "timestep": es5p2 +# "timestep": es5p2 } @@ -120,7 +120,7 @@ partial_state_update_block = { "b1": p1m1, # "b2": p2m1 }, - "states": { + "variables": { "s1": s1m1, # "s2": s2m1 } @@ -130,7 +130,7 @@ partial_state_update_block = { "b1": p1m2, # "b2": p2m2 }, - "states": { + "variables": { "s1": s1m2, # "s2": s2m2 } @@ -140,7 +140,7 @@ partial_state_update_block = { "b1": p1m3, "b2": p2m3 }, - "states": { + "variables": { "s1": s1m3, "s2": s2m3 } @@ -162,5 +162,5 @@ append_configs( seeds=seeds, raw_exogenous_states=raw_exogenous_states, env_processes=env_processes, - partial_state_updates=partial_state_update_block + partial_state_update_blocks=partial_state_update_block ) diff --git a/simulations/validation/sweep_config.py b/simulations/validation/sweep_config.py index f23e4ba..eb54b72 100644 --- a/simulations/validation/sweep_config.py +++ b/simulations/validation/sweep_config.py @@ -114,7 +114,7 @@ genesis_states = { 's2': Decimal(0.0), 's3': Decimal(1.0), 's4': Decimal(1.0), - 'timestep': '2018-10-01 15:16:24' +# 'timestep': '2018-10-01 15:16:24' } @@ -122,7 +122,7 @@ genesis_states = { raw_exogenous_states = { "s3": es3p1, "s4": es4p2, - "timestep": es5p2 +# "timestep": es5p2 } @@ -149,7 +149,7 @@ partial_state_update_block = { "b1": p1m1, "b2": p2m1 }, - "states": { + "variables": { "s1": s1m1, "s2": s2m1 } @@ -159,7 +159,7 @@ partial_state_update_block = { "b1": p1m2, "b2": p2m2, }, - "states": { + "variables": { "s1": s1m2, "s2": s2m2 } @@ -169,7 +169,7 @@ partial_state_update_block = { "b1": p1m3, "b2": p2m3 }, - "states": { + "variables": { "s1": s1m3, "s2": s2m3 } @@ -192,5 +192,5 @@ append_configs( seeds=seeds, raw_exogenous_states=raw_exogenous_states, env_processes=env_processes, - partial_state_updates=partial_state_update_block + partial_state_update_blocks=partial_state_update_block ) \ No newline at end of file From 129b11fa4c7220022a1e8b28d718cacf0d83e065 Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 18 Feb 2019 10:30:47 -0300 Subject: [PATCH 4/6] bug when partial_state_update_blocks dict is empty --- simulations/example_run.ipynb | 90 ++++++------------- simulations/validation/config4.py | 142 ++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+), 63 deletions(-) create mode 100644 simulations/validation/config4.py diff --git a/simulations/example_run.ipynb b/simulations/example_run.ipynb index 41456f2..2f0bb83 100644 --- a/simulations/example_run.ipynb +++ b/simulations/example_run.ipynb @@ -11,7 +11,7 @@ "\n", "# The following imports NEED to be in the exact order\n", "from cadCAD.engine import ExecutionMode, ExecutionContext, Executor\n", - "from validation import config1, config2, config3\n", + "from validation import config1, config2, config3, config4\n", "from cadCAD import configs\n", "\n", "exec_mode = ExecutionMode()" @@ -28,7 +28,7 @@ "text": [ "\n", "config[0]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 s4 substep timestep\n", "0 1 0 0 1 1 0 0\n", "1 1 1 4 5 1.178862847343031816649272514 1 1\n", @@ -37,7 +37,7 @@ "4 1 1 4 5 1.230321371869816411424320371 1 2\n", "\n", "config[1]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 \\\n", "0 1 0 0 1 \n", "1 1 1 0 0.9583242152594528828757347583 \n", @@ -53,13 +53,16 @@ "4 1.230321371869816411424320371 1 2 \n", "\n", "config[2]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 s4 substep timestamp timestep\n", "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", "1 1 [1] 0 1 1 1 2018-10-01 15:16:24 1\n", "2 1 [1] 0 1 1 1 2018-10-01 15:16:24 2\n", "3 1 [1] 0 1 1 1 2018-10-01 15:16:24 3\n", - "4 1 [1] 0 1 1 1 2018-10-01 15:16:24 4\n" + "4 1 [1] 0 1 1 1 2018-10-01 15:16:24 4\n", + "\n", + "config[3]\n", + "single_proc: []\n" ] }, { @@ -69,6 +72,24 @@ "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", " FutureWarning)\n" ] + }, + { + "ename": "TypeError", + "evalue": "() takes 4 positional arguments but 5 were given", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0msingle_proc_ctx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mExecutionContext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcontext\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexec_mode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msingle_proc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mrun1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mExecutor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexec_context\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msingle_proc_ctx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mrun1_raw_result\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mraw_tensor_field\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrun1\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrun1_raw_result\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/__init__.py\u001b[0m in \u001b[0;36mexecute\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 67\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexec_context\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mExecutionMode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msingle_proc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[0mtensor_field\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcreate_tensor_field\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpartial_state_updates\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0meps\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 69\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexec_method\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msimulation_execs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvar_dict_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_lists\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs_structs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 70\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtensor_field\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 71\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexec_context\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mExecutionMode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmulti_proc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/__init__.py\u001b[0m in \u001b[0;36msingle_proc_exec\u001b[0;34m(simulation_execs, var_dict, states_lists, configs_structs, env_processes_list, Ts, Ns)\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0ml\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0msimulation_execs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_lists\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs_structs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNs\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0msimulation\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mN\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ml\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 22\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msimulation\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mN\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 23\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mflatten\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36msimulation\u001b[0;34m(self, var_dict, states_list, configs, env_processes, time_seq, runs)\u001b[0m\n\u001b[1;32m 92\u001b[0m \u001b[0mrun\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 93\u001b[0m \u001b[0mstates_list_copy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdeepcopy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstates_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 94\u001b[0;31m \u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0mtail\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_pipeline\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list_copy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtime_seq\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 95\u001b[0m \u001b[0mgenesis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mhead\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 96\u001b[0m \u001b[0mgenesis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'substep'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgenesis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'timestep'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgenesis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'run'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36mrun_pipeline\u001b[0;34m(self, var_dict, states_list, configs, env_processes, time_seq, run)\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[0msimulation_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mstates_list\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 81\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mtime_step\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtime_seq\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 82\u001b[0;31m \u001b[0mpipe_run\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate_update_pipeline\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msimulation_list\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtime_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 83\u001b[0m \u001b[0m_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0mpipe_run\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpipe_run\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 84\u001b[0m \u001b[0msimulation_list\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpipe_run\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36mstate_update_pipeline\u001b[0;34m(self, var_dict, states_list, configs, env_processes, time_step, run)\u001b[0m\n\u001b[1;32m 69\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mconfig\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 70\u001b[0m \u001b[0ms_conf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp_conf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 71\u001b[0;31m \u001b[0mstates_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpartial_state_update\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msub_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ms_conf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp_conf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtime_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 72\u001b[0m \u001b[0msub_step\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 73\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36mpartial_state_update\u001b[0;34m(self, var_dict, sub_step, sL, state_funcs, policy_funcs, env_processes, time_step, run)\u001b[0m\n\u001b[1;32m 40\u001b[0m last_in_copy = dict(\n\u001b[1;32m 41\u001b[0m [\n\u001b[0;32m---> 42\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate_update_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msub_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msL\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlast_in_obj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_input\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mf\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mstate_funcs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 43\u001b[0m ]\n\u001b[1;32m 44\u001b[0m )\n", + "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 40\u001b[0m last_in_copy = dict(\n\u001b[1;32m 41\u001b[0m [\n\u001b[0;32m---> 42\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate_update_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msub_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msL\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlast_in_obj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_input\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mf\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mstate_funcs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 43\u001b[0m ]\n\u001b[1;32m 44\u001b[0m )\n", + "\u001b[0;31mTypeError\u001b[0m: () takes 4 positional arguments but 5 were given" + ] } ], "source": [ @@ -87,23 +108,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "multi_proc: [, , , , ]\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", - " FutureWarning)\n" - ] - } - ], + "outputs": [], "source": [ "from validation import sweep_config\n", "multi_proc_ctx = ExecutionContext(context=exec_mode.multi_proc)\n", @@ -119,47 +124,6 @@ " print(f\"result[{idx}]\")\n", " print(r.head())" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "print(\"Tensor Field A:\")\n", - "tensor_fields[0]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"Output A:\")\n", - "results[0]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"Tensor Field B:\")\n", - "tensor_fields[1]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"Output B:\")\n", - "results[1]" - ] } ], "metadata": { diff --git a/simulations/validation/config4.py b/simulations/validation/config4.py new file mode 100644 index 0000000..88d31f6 --- /dev/null +++ b/simulations/validation/config4.py @@ -0,0 +1,142 @@ +from decimal import Decimal +import numpy as np +from datetime import timedelta + +from cadCAD.configuration import append_configs +from cadCAD.configuration.utils import proc_trigger, bound_norm_random, ep_time_step +from cadCAD.configuration.utils.parameterSweep import config_sim + + +seeds = { + 'z': np.random.RandomState(1), + 'a': np.random.RandomState(2), + 'b': np.random.RandomState(3), + 'c': np.random.RandomState(3) +} + + +# Policies per Mechanism +def p1m1(_g, step, sL, s): + return {'param1': 1} +def p2m1(_g, step, sL, s): + return {'param2': 4} + +def p1m2(_g, step, sL, s): + return {'param1': 'a', 'param2': 2} +def p2m2(_g, step, sL, s): + return {'param1': 'b', 'param2': 4} + +def p1m3(_g, step, sL, s): + return {'param1': ['c'], 'param2': np.array([10, 100])} +def p2m3(_g, step, sL, s): + return {'param1': ['d'], 'param2': np.array([20, 200])} + + +# Internal States per Mechanism +def s1m1(_g, step, sL, s, _input): + y = 's1' + x = _input['param1'] + return (y, x) +def s2m1(_g, step, sL, s, _input): + y = 's2' + x = _input['param2'] + return (y, x) + +def s1m2(_g, step, sL, s, _input): + y = 's1' + x = _input['param1'] + return (y, x) +def s2m2(_g, step, sL, s, _input): + y = 's2' + x = _input['param2'] + return (y, x) + +def s1m3(_g, step, sL, s, _input): + y = 's1' + x = _input['param1'] + return (y, x) +def s2m3(_g, step, sL, s, _input): + y = 's2' + x = _input['param2'] + return (y, x) + +def s1m4(_g, step, sL, s, _input): + y = 's1' + x = [1] + return (y, x) + + +# Exogenous States +proc_one_coef_A = 0.7 +proc_one_coef_B = 1.3 + +def es3p1(_g, step, sL, s, _input): + y = 's3' + x = s['s3'] * bound_norm_random(seeds['a'], proc_one_coef_A, proc_one_coef_B) + return (y, x) + +def es4p2(_g, step, sL, s, _input): + y = 's4' + x = s['s4'] * bound_norm_random(seeds['b'], proc_one_coef_A, proc_one_coef_B) + return (y, x) + +ts_format = '%Y-%m-%d %H:%M:%S' +t_delta = timedelta(days=0, minutes=0, seconds=1) +def es5p2(_g, step, sL, s, _input): + y = 'timestamp' + x = ep_time_step(s, dt_str=s['timestamp'], fromat_str=ts_format, _timedelta=t_delta) + return (y, x) + + +# Environment States +def env_a(x): + return 5 +def env_b(x): + return 10 +# def what_ever(x): +# return x + 1 + + +# Genesis States +genesis_states = { + 's1': Decimal(0.0), + 's2': Decimal(0.0), + 's3': Decimal(1.0), + 's4': Decimal(1.0), + 'timestamp': '2018-10-01 15:16:24' +} + + +raw_exogenous_states = { + "s3": es3p1, + "s4": es4p2, + "timestamp": es5p2 +} + + +env_processes = { + "s3": env_a, + "s4": proc_trigger('2018-10-01 15:16:25', env_b) +} + + +partial_state_update_block = [ +] + + +sim_config = config_sim( + { + "N": 2, + "T": range(5), + } +) + + +append_configs( + sim_configs=sim_config, + initial_state=genesis_states, + seeds={}, + raw_exogenous_states={}, + env_processes={}, + partial_state_update_blocks=partial_state_update_block +) From 08950199911846b1b7ee74be384da791b8dcc286 Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 18 Feb 2019 10:32:20 -0300 Subject: [PATCH 5/6] fix bug demoed at commit 129b11f --- cadCAD/configuration/__init__.py | 2 +- simulations/example_run.ipynb | 120 ++++++++++++++++++++++++------- 2 files changed, 97 insertions(+), 25 deletions(-) diff --git a/cadCAD/configuration/__init__.py b/cadCAD/configuration/__init__.py index b5cd4d3..f4c419d 100644 --- a/cadCAD/configuration/__init__.py +++ b/cadCAD/configuration/__init__.py @@ -113,7 +113,7 @@ class Processor: def only_ep_handler(state_dict): sdf_functions = [ - lambda sub_step, sL, s, _input: (k, v) for k, v in zip(state_dict.keys(), state_dict.values()) + lambda var_dict, sub_step, sL, s, _input: (k, v) for k, v in zip(state_dict.keys(), state_dict.values()) ] sdf_values = [sdf_functions] bdf_values = [[self.p_identity] * len(sdf_values)] diff --git a/simulations/example_run.ipynb b/simulations/example_run.ipynb index 2f0bb83..56490a8 100644 --- a/simulations/example_run.ipynb +++ b/simulations/example_run.ipynb @@ -28,7 +28,7 @@ "text": [ "\n", "config[0]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 s4 substep timestep\n", "0 1 0 0 1 1 0 0\n", "1 1 1 4 5 1.178862847343031816649272514 1 1\n", @@ -37,7 +37,7 @@ "4 1 1 4 5 1.230321371869816411424320371 1 2\n", "\n", "config[1]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 \\\n", "0 1 0 0 1 \n", "1 1 1 0 0.9583242152594528828757347583 \n", @@ -53,7 +53,7 @@ "4 1.230321371869816411424320371 1 2 \n", "\n", "config[2]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 s4 substep timestamp timestep\n", "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", "1 1 [1] 0 1 1 1 2018-10-01 15:16:24 1\n", @@ -62,7 +62,13 @@ "4 1 [1] 0 1 1 1 2018-10-01 15:16:24 4\n", "\n", "config[3]\n", - "single_proc: []\n" + "single_proc: []\n", + " run s1 s2 s3 s4 substep timestamp timestep\n", + "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", + "1 1 0 0 1 1 1 2018-10-01 15:16:24 1\n", + "2 1 0 0 1 1 1 2018-10-01 15:16:24 2\n", + "3 1 0 0 1 1 1 2018-10-01 15:16:24 3\n", + "4 1 0 0 1 1 1 2018-10-01 15:16:24 4\n" ] }, { @@ -72,24 +78,6 @@ "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", " FutureWarning)\n" ] - }, - { - "ename": "TypeError", - "evalue": "() takes 4 positional arguments but 5 were given", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0msingle_proc_ctx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mExecutionContext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcontext\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexec_mode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msingle_proc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mrun1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mExecutor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexec_context\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msingle_proc_ctx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mrun1_raw_result\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mraw_tensor_field\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrun1\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrun1_raw_result\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/__init__.py\u001b[0m in \u001b[0;36mexecute\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 67\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexec_context\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mExecutionMode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msingle_proc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[0mtensor_field\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcreate_tensor_field\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpartial_state_updates\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0meps\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 69\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexec_method\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msimulation_execs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvar_dict_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_lists\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs_structs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 70\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtensor_field\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 71\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexec_context\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mExecutionMode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmulti_proc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/__init__.py\u001b[0m in \u001b[0;36msingle_proc_exec\u001b[0;34m(simulation_execs, var_dict, states_lists, configs_structs, env_processes_list, Ts, Ns)\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0ml\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0msimulation_execs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_lists\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs_structs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNs\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0msimulation\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mN\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ml\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 22\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msimulation\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mN\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 23\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mflatten\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36msimulation\u001b[0;34m(self, var_dict, states_list, configs, env_processes, time_seq, runs)\u001b[0m\n\u001b[1;32m 92\u001b[0m \u001b[0mrun\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 93\u001b[0m \u001b[0mstates_list_copy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdeepcopy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstates_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 94\u001b[0;31m \u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0mtail\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_pipeline\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list_copy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtime_seq\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 95\u001b[0m \u001b[0mgenesis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mhead\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 96\u001b[0m \u001b[0mgenesis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'substep'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgenesis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'timestep'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgenesis\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'run'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36mrun_pipeline\u001b[0;34m(self, var_dict, states_list, configs, env_processes, time_seq, run)\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[0msimulation_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mstates_list\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 81\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mtime_step\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtime_seq\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 82\u001b[0;31m \u001b[0mpipe_run\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate_update_pipeline\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msimulation_list\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtime_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 83\u001b[0m \u001b[0m_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0mpipe_run\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpipe_run\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 84\u001b[0m \u001b[0msimulation_list\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpipe_run\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36mstate_update_pipeline\u001b[0;34m(self, var_dict, states_list, configs, env_processes, time_step, run)\u001b[0m\n\u001b[1;32m 69\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mconfig\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mconfigs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 70\u001b[0m \u001b[0ms_conf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp_conf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 71\u001b[0;31m \u001b[0mstates_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpartial_state_update\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msub_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstates_list\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ms_conf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mp_conf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menv_processes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtime_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrun\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 72\u001b[0m \u001b[0msub_step\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 73\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36mpartial_state_update\u001b[0;34m(self, var_dict, sub_step, sL, state_funcs, policy_funcs, env_processes, time_step, run)\u001b[0m\n\u001b[1;32m 40\u001b[0m last_in_copy = dict(\n\u001b[1;32m 41\u001b[0m [\n\u001b[0;32m---> 42\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate_update_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msub_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msL\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlast_in_obj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_input\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mf\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mstate_funcs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 43\u001b[0m ]\n\u001b[1;32m 44\u001b[0m )\n", - "\u001b[0;32m~/Documents/GitHub/DiffyQ-SimCAD/cadCAD/engine/simulation.py\u001b[0m in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 40\u001b[0m last_in_copy = dict(\n\u001b[1;32m 41\u001b[0m [\n\u001b[0;32m---> 42\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate_update_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvar_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msub_step\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msL\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlast_in_obj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_input\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mf\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mstate_funcs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 43\u001b[0m ]\n\u001b[1;32m 44\u001b[0m )\n", - "\u001b[0;31mTypeError\u001b[0m: () takes 4 positional arguments but 5 were given" - ] } ], "source": [ @@ -106,9 +94,93 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "multi_proc: [, , , , , ]\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", + " FutureWarning)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "result[0]\n", + " run s1 s2 s3 s4 substep \\\n", + "0 1 0 0 1 1 0 \n", + "1 1 1 4 5 0.8686135246637317619544660374 1 \n", + "2 1 ab 6 5 0.8686135246637317619544660374 2 \n", + "3 1 [c, d] [30, 300] 5 0.8686135246637317619544660374 3 \n", + "4 1 1 4 5 0.9454530210559482586784741082 1 \n", + "\n", + " timestep \n", + "0 0 \n", + "1 1 \n", + "2 1 \n", + "3 1 \n", + "4 2 \n", + "\n", + "result[1]\n", + " run s1 s2 s3 \\\n", + "0 1 0 0 1 \n", + "1 1 1 0 1.055145404454642443781153816 \n", + "2 1 a 0 1.055145404454642443781153816 \n", + "3 1 [c, d] [30, 300] 1.055145404454642443781153816 \n", + "4 1 1 [30, 300] 1.297006679532223553389019665 \n", + "\n", + " s4 substep timestep \n", + "0 1 0 0 \n", + "1 0.8686135246637317619544660374 1 1 \n", + "2 0.8686135246637317619544660374 2 1 \n", + "3 0.8686135246637317619544660374 3 1 \n", + "4 0.9454530210559482586784741082 1 2 \n", + "\n", + "result[2]\n", + " run s1 s2 s3 s4 substep timestamp timestep\n", + "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", + "1 1 [1] 0 1 1 1 2018-10-01 15:16:24 1\n", + "2 1 [1] 0 1 1 1 2018-10-01 15:16:24 2\n", + "3 1 [1] 0 1 1 1 2018-10-01 15:16:24 3\n", + "4 1 [1] 0 1 1 1 2018-10-01 15:16:24 4\n", + "\n", + "result[3]\n", + " run s1 s2 s3 s4 substep timestamp timestep\n", + "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", + "1 1 0 0 1 1 1 2018-10-01 15:16:24 1\n", + "2 1 0 0 1 1 1 2018-10-01 15:16:24 2\n", + "3 1 0 0 1 1 1 2018-10-01 15:16:24 3\n", + "4 1 0 0 1 1 1 2018-10-01 15:16:24 4\n", + "\n", + "result[4]\n", + " run s1 s2 s3 s4 substep timestep\n", + "0 1 0 0 1 1 0 0\n", + "1 1 0 2 3 3 1 1\n", + "2 1 2 2 3 3 2 1\n", + "3 1 0 0 3 3 3 1\n", + "4 1 0 2 3 3 1 2\n", + "\n", + "result[5]\n", + " run s1 s2 s3 s4 substep timestep\n", + "0 1 0 0 1 1 0 0\n", + "1 1 0 5 4 4 1 1\n", + "2 1 5 5 4 4 2 1\n", + "3 1 0 0 4 4 3 1\n", + "4 1 0 5 4 4 1 2\n" + ] + } + ], "source": [ "from validation import sweep_config\n", "multi_proc_ctx = ExecutionContext(context=exec_mode.multi_proc)\n", From 69dfaf391aa7360f3fa86d2ac76cdbd4dd103e55 Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 18 Feb 2019 13:39:26 -0300 Subject: [PATCH 6/6] update trigger --- dist/cadCAD-0.1-py3-none-any.whl | Bin 9794 -> 10402 bytes simulations/example_run.ipynb | 198 ++++++++++++++++++------- simulations/validation/config1.py | 2 +- simulations/validation/config2.py | 4 +- simulations/validation/sweep_config.py | 2 +- 5 files changed, 150 insertions(+), 56 deletions(-) diff --git a/dist/cadCAD-0.1-py3-none-any.whl b/dist/cadCAD-0.1-py3-none-any.whl index dce3979794db9e76c41e9d8fa44aa337dfe83aa9..ce1461508a6798844626fb2e8f984496a4f9168f 100644 GIT binary patch delta 5300 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 ZRn=m6LGA#=MobJK21wue3WNR`{69B{e}n)4 delta 4756 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]\n", + "single_proc: []\n", " run s1 s2 s3 s4 substep timestep\n", "0 1 0 0 1 1 0 0\n", - "1 1 1 4 5 1.178862847343031816649272514 1 1\n", - "2 1 ab 6 5 1.178862847343031816649272514 2 1\n", - "3 1 [c, d] [30, 300] 5 1.178862847343031816649272514 3 1\n", - "4 1 1 4 5 1.230321371869816411424320371 1 2\n", + "1 1 1 4 5 10 1 1\n", + "2 1 ab 6 5 10 2 1\n", + "3 1 [c, d] [30, 300] 5 10 3 1\n", + "4 1 1 4 5 10.43650985051199020503531756 1 2\n", "\n", "config[1]\n", - "single_proc: []\n", - " run s1 s2 s3 \\\n", - "0 1 0 0 1 \n", - "1 1 1 0 0.9583242152594528828757347583 \n", - "2 1 a 0 0.9583242152594528828757347583 \n", - "3 1 [c, d] [30, 300] 0.9583242152594528828757347583 \n", - "4 1 1 [30, 300] 0.9529320289547716885340867310 \n", + "single_proc: []\n", + " run s1 s2 s3 \\\n", + "0 1 0 0 1 \n", + "1 1 1 0 10 \n", + "2 1 a 0 10 \n", + "3 1 [c, d] [30, 300] 10 \n", + "4 1 1 [30, 300] 9.943733172773669970467835810 \n", "\n", " s4 substep timestep \n", "0 1 0 0 \n", - "1 1.178862847343031816649272514 1 1 \n", - "2 1.178862847343031816649272514 2 1 \n", - "3 1.178862847343031816649272514 3 1 \n", - "4 1.230321371869816411424320371 1 2 \n", - "\n", + "1 10 1 1 \n", + "2 10 2 1 \n", + "3 10 3 1 \n", + "4 10.43650985051199020503531756 1 2 \n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", + " FutureWarning)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "config[2]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 s4 substep timestamp timestep\n", "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", "1 1 [1] 0 1 1 1 2018-10-01 15:16:24 1\n", @@ -62,7 +76,7 @@ "4 1 [1] 0 1 1 1 2018-10-01 15:16:24 4\n", "\n", "config[3]\n", - "single_proc: []\n", + "single_proc: []\n", " run s1 s2 s3 s4 substep timestamp timestep\n", "0 1 0 0 1 1 0 2018-10-01 15:16:24 0\n", "1 1 0 0 1 1 1 2018-10-01 15:16:24 1\n", @@ -70,14 +84,6 @@ "3 1 0 0 1 1 1 2018-10-01 15:16:24 3\n", "4 1 0 0 1 1 1 2018-10-01 15:16:24 4\n" ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", - " FutureWarning)\n" - ] } ], "source": [ @@ -101,14 +107,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "multi_proc: [, , , , , ]\n" + "multi_proc: [, , , , , ]\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/Users/markusbkoch/Documents/GitHub/DiffyQ-SimCAD/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", + "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cadCAD/utils/__init__.py:86: FutureWarning: The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.\n", " FutureWarning)\n" ] }, @@ -116,36 +122,116 @@ "name": "stdout", "output_type": "stream", "text": [ + "[([{'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 1}, {'s1': 1, 's2': 4, 's3': 5, 's4': 10, 'substep': 1, 'timestep': 1, 'run': 1}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': 10, 'substep': 2, 'timestep': 1, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': 10, 'substep': 3, 'timestep': 1, 'run': 1}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('10.88462238049958452634768946'), 'substep': 1, 'timestep': 2, 'run': 1}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('10.88462238049958452634768946'), 'substep': 2, 'timestep': 2, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('10.88462238049958452634768946'), 'substep': 3, 'timestep': 2, 'run': 1}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('11.84390378915460105928594240'), 'substep': 1, 'timestep': 3, 'run': 1}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('11.84390378915460105928594240'), 'substep': 2, 'timestep': 3, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('11.84390378915460105928594240'), 'substep': 3, 'timestep': 3, 'run': 1}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('13.86870567779818175660086782'), 'substep': 1, 'timestep': 4, 'run': 1}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('13.86870567779818175660086782'), 'substep': 2, 'timestep': 4, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('13.86870567779818175660086782'), 'substep': 3, 'timestep': 4, 'run': 1}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('13.93809586353209725047922068'), 'substep': 1, 'timestep': 5, 'run': 1}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('13.93809586353209725047922068'), 'substep': 2, 'timestep': 5, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('13.93809586353209725047922068'), 'substep': 3, 'timestep': 5, 'run': 1}, {'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 2}, {'s1': 1, 's2': 4, 's3': 5, 's4': 10, 'substep': 1, 'timestep': 1, 'run': 2}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': 10, 'substep': 2, 'timestep': 1, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': 10, 'substep': 3, 'timestep': 1, 'run': 2}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('9.454640052380469672499430089'), 'substep': 1, 'timestep': 2, 'run': 2}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('9.454640052380469672499430089'), 'substep': 2, 'timestep': 2, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('9.454640052380469672499430089'), 'substep': 3, 'timestep': 2, 'run': 2}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('7.992501415579613525253197635'), 'substep': 1, 'timestep': 3, 'run': 2}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('7.992501415579613525253197635'), 'substep': 2, 'timestep': 3, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('7.992501415579613525253197635'), 'substep': 3, 'timestep': 3, 'run': 2}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('8.777658726472379268470333983'), 'substep': 1, 'timestep': 4, 'run': 2}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('8.777658726472379268470333983'), 'substep': 2, 'timestep': 4, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('8.777658726472379268470333983'), 'substep': 3, 'timestep': 4, 'run': 2}, {'s1': 1, 's2': 4, 's3': 5, 's4': Decimal('7.811179137283953044810612028'), 'substep': 1, 'timestep': 5, 'run': 2}, {'s1': 'ab', 's2': 6, 's3': 5, 's4': Decimal('7.811179137283953044810612028'), 'substep': 2, 'timestep': 5, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 5, 's4': Decimal('7.811179137283953044810612028'), 'substep': 3, 'timestep': 5, 'run': 2}], b1 b2 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " s1 s2 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " es1 \\\n", + "0 ._curried at 0x11204... \n", + "1 ._curried at 0x11204... \n", + "2 ._curried at 0x11204... \n", + "\n", + " es2 m \n", + "0 ._curried at 0x11204... 1 \n", + "1 ._curried at 0x11204... 2 \n", + "2 ._curried at 0x11204... 3 ), ([{'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 1}, {'s1': 1, 's2': Decimal('0'), 's3': 10, 's4': 10, 'substep': 1, 'timestep': 1, 'run': 1}, {'s1': 'a', 's2': Decimal('0'), 's3': 10, 's4': 10, 'substep': 2, 'timestep': 1, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 10, 's4': 10, 'substep': 3, 'timestep': 1, 'run': 1}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('12.29220801281495800694187892'), 's4': Decimal('10.88462238049958452634768946'), 'substep': 1, 'timestep': 2, 'run': 1}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('12.29220801281495800694187892'), 's4': Decimal('10.88462238049958452634768946'), 'substep': 2, 'timestep': 2, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('12.29220801281495800694187892'), 's4': Decimal('10.88462238049958452634768946'), 'substep': 3, 'timestep': 2, 'run': 1}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('12.34326909876120344349913442'), 's4': Decimal('11.84390378915460105928594240'), 'substep': 1, 'timestep': 3, 'run': 1}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('12.34326909876120344349913442'), 's4': Decimal('11.84390378915460105928594240'), 'substep': 2, 'timestep': 3, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('12.34326909876120344349913442'), 's4': Decimal('11.84390378915460105928594240'), 'substep': 3, 'timestep': 3, 'run': 1}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('10.96338363862234990976085712'), 's4': Decimal('13.86870567779818175660086782'), 'substep': 1, 'timestep': 4, 'run': 1}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('10.96338363862234990976085712'), 's4': Decimal('13.86870567779818175660086782'), 'substep': 2, 'timestep': 4, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('10.96338363862234990976085712'), 's4': Decimal('13.86870567779818175660086782'), 'substep': 3, 'timestep': 4, 'run': 1}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('11.55437395583421707706326497'), 's4': Decimal('13.93809586353209725047922068'), 'substep': 1, 'timestep': 5, 'run': 1}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('11.55437395583421707706326497'), 's4': Decimal('13.93809586353209725047922068'), 'substep': 2, 'timestep': 5, 'run': 1}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('11.55437395583421707706326497'), 's4': Decimal('13.93809586353209725047922068'), 'substep': 3, 'timestep': 5, 'run': 1}, {'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 2}, {'s1': 1, 's2': Decimal('0'), 's3': 10, 's4': 10, 'substep': 1, 'timestep': 1, 'run': 2}, {'s1': 'a', 's2': Decimal('0'), 's3': 10, 's4': 10, 'substep': 2, 'timestep': 1, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': 10, 's4': 10, 'substep': 3, 'timestep': 1, 'run': 2}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('9.980869503478848603350570556'), 's4': Decimal('9.454640052380469672499430089'), 'substep': 1, 'timestep': 2, 'run': 2}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('9.980869503478848603350570556'), 's4': Decimal('9.454640052380469672499430089'), 'substep': 2, 'timestep': 2, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('9.980869503478848603350570556'), 's4': Decimal('9.454640052380469672499430089'), 'substep': 3, 'timestep': 2, 'run': 2}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('11.15362288730493994485387979'), 's4': Decimal('7.992501415579613525253197635'), 'substep': 1, 'timestep': 3, 'run': 2}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('11.15362288730493994485387979'), 's4': Decimal('7.992501415579613525253197635'), 'substep': 2, 'timestep': 3, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('11.15362288730493994485387979'), 's4': Decimal('7.992501415579613525253197635'), 'substep': 3, 'timestep': 3, 'run': 2}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('10.31947583362548981535476519'), 's4': Decimal('8.777658726472379268470333983'), 'substep': 1, 'timestep': 4, 'run': 2}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('10.31947583362548981535476519'), 's4': Decimal('8.777658726472379268470333983'), 'substep': 2, 'timestep': 4, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('10.31947583362548981535476519'), 's4': Decimal('8.777658726472379268470333983'), 'substep': 3, 'timestep': 4, 'run': 2}, {'s1': 1, 's2': array([ 30, 300]), 's3': Decimal('10.32878941955665265801415268'), 's4': Decimal('7.811179137283953044810612028'), 'substep': 1, 'timestep': 5, 'run': 2}, {'s1': 'a', 's2': array([ 30, 300]), 's3': Decimal('10.32878941955665265801415268'), 's4': Decimal('7.811179137283953044810612028'), 'substep': 2, 'timestep': 5, 'run': 2}, {'s1': ['c', 'd'], 's2': array([ 30, 300]), 's3': Decimal('10.32878941955665265801415268'), 's4': Decimal('7.811179137283953044810612028'), 'substep': 3, 'timestep': 5, 'run': 2}], b1 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " b2 \\\n", + "0 \n", + "\n", + " s1 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " s2 \\\n", + "0 .. \n", + "\n", + " es1 \\\n", + "0 ._curried at 0x11205... \n", + "1 ._curried at 0x11205... \n", + "2 ._curried at 0x11205... \n", + "\n", + " es2 m \n", + "0 ._curried at 0x11205... 1 \n", + "1 ._curried at 0x11205... 2 \n", + "2 ._curried at 0x11205... 3 ), ([{'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 0, 'timestep': 0, 'run': 1}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 1, 'run': 1}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 2, 'run': 1}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 3, 'run': 1}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 4, 'run': 1}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 5, 'run': 1}, {'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 0, 'timestep': 0, 'run': 2}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 1, 'run': 2}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 2, 'run': 2}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 3, 'run': 2}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 4, 'run': 2}, {'s1': [1], 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 1, 'timestep': 5, 'run': 2}], empty s1 m\n", + "0 NaN 1), ([{'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 0, 'timestep': 0, 'run': 1}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 1, 'run': 1}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 2, 'run': 1}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 3, 'run': 1}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 4, 'run': 1}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 5, 'run': 1}, {'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'timestamp': '2018-10-01 15:16:24', 'substep': 0, 'timestep': 0, 'run': 2}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 1, 'run': 2}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 2, 'run': 2}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 3, 'run': 2}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 4, 'run': 2}, {'timestamp': '2018-10-01 15:16:24', 's1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 1, 'timestep': 5, 'run': 2}], Empty DataFrame\n", + "Columns: [empty, empty, m]\n", + "Index: []), ([{'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 1}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 1, 'run': 1}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 1, 'run': 1}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 1, 'run': 1}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 2, 'run': 1}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 2, 'run': 1}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 2, 'run': 1}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 3, 'run': 1}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 3, 'run': 1}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 3, 'run': 1}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 4, 'run': 1}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 4, 'run': 1}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 4, 'run': 1}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 5, 'run': 1}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 5, 'run': 1}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 5, 'run': 1}, {'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 2}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 1, 'run': 2}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 1, 'run': 2}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 1, 'run': 2}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 2, 'run': 2}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 2, 'run': 2}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 2, 'run': 2}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 3, 'run': 2}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 3, 'run': 2}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 3, 'run': 2}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 4, 'run': 2}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 4, 'run': 2}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 4, 'run': 2}, {'s1': 0, 's2': 2, 's3': 3, 's4': 3, 'substep': 1, 'timestep': 5, 'run': 2}, {'s1': 2, 's2': 2, 's3': 3, 's4': 3, 'substep': 2, 'timestep': 5, 'run': 2}, {'s1': 0, 's2': 0, 's3': 3, 's4': 3, 'substep': 3, 'timestep': 5, 'run': 2}], b1 b2 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " s1 s2 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " es1 \\\n", + "0 ._curried at 0x1120a... \n", + "1 ._curried at 0x1120a... \n", + "2 ._curried at 0x1120a... \n", + "\n", + " es2 m \n", + "0 ._curried at 0x1120a... 1 \n", + "1 ._curried at 0x1120a... 2 \n", + "2 ._curried at 0x1120a... 3 ), ([{'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 1}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 1, 'run': 1}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 1, 'run': 1}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 1, 'run': 1}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 2, 'run': 1}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 2, 'run': 1}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 2, 'run': 1}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 3, 'run': 1}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 3, 'run': 1}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 3, 'run': 1}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 4, 'run': 1}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 4, 'run': 1}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 4, 'run': 1}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 5, 'run': 1}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 5, 'run': 1}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 5, 'run': 1}, {'s1': Decimal('0'), 's2': Decimal('0'), 's3': Decimal('1'), 's4': Decimal('1'), 'substep': 0, 'timestep': 0, 'run': 2}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 1, 'run': 2}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 1, 'run': 2}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 1, 'run': 2}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 2, 'run': 2}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 2, 'run': 2}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 2, 'run': 2}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 3, 'run': 2}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 3, 'run': 2}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 3, 'run': 2}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 4, 'run': 2}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 4, 'run': 2}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 4, 'run': 2}, {'s1': 0, 's2': 5, 's3': 4, 's4': 4, 'substep': 1, 'timestep': 5, 'run': 2}, {'s1': 5, 's2': 5, 's3': 4, 's4': 4, 'substep': 2, 'timestep': 5, 'run': 2}, {'s1': 0, 's2': 0, 's3': 4, 's4': 4, 'substep': 3, 'timestep': 5, 'run': 2}], b1 b2 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " s1 s2 \\\n", + "0 \n", + "1 \n", + "2 \n", + "\n", + " es1 \\\n", + "0 ._curried at 0x1120a... \n", + "1 ._curried at 0x1120a... \n", + "2 ._curried at 0x1120a... \n", + "\n", + " es2 m \n", + "0 ._curried at 0x1120a... 1 \n", + "1 ._curried at 0x1120a... 2 \n", + "2 ._curried at 0x1120a... 3 )]\n", + "multi_proc: [, , , , , ]\n", "\n", "result[0]\n", - " run s1 s2 s3 s4 substep \\\n", - "0 1 0 0 1 1 0 \n", - "1 1 1 4 5 0.8686135246637317619544660374 1 \n", - "2 1 ab 6 5 0.8686135246637317619544660374 2 \n", - "3 1 [c, d] [30, 300] 5 0.8686135246637317619544660374 3 \n", - "4 1 1 4 5 0.9454530210559482586784741082 1 \n", - "\n", - " timestep \n", - "0 0 \n", - "1 1 \n", - "2 1 \n", - "3 1 \n", - "4 2 \n", + " run s1 s2 s3 s4 substep timestep\n", + "0 1 0 0 1 1 0 0\n", + "1 1 1 4 5 10 1 1\n", + "2 1 ab 6 5 10 2 1\n", + "3 1 [c, d] [30, 300] 5 10 3 1\n", + "4 1 1 4 5 10.88462238049958452634768946 1 2\n", "\n", "result[1]\n", " run s1 s2 s3 \\\n", "0 1 0 0 1 \n", - "1 1 1 0 1.055145404454642443781153816 \n", - "2 1 a 0 1.055145404454642443781153816 \n", - "3 1 [c, d] [30, 300] 1.055145404454642443781153816 \n", - "4 1 1 [30, 300] 1.297006679532223553389019665 \n", + "1 1 1 0 10 \n", + "2 1 a 0 10 \n", + "3 1 [c, d] [30, 300] 10 \n", + "4 1 1 [30, 300] 12.29220801281495800694187892 \n", "\n", - " s4 substep timestep \n", - "0 1 0 0 \n", - "1 0.8686135246637317619544660374 1 1 \n", - "2 0.8686135246637317619544660374 2 1 \n", - "3 0.8686135246637317619544660374 3 1 \n", - "4 0.9454530210559482586784741082 1 2 \n", + " s4 substep timestep \n", + "0 1 0 0 \n", + "1 10 1 1 \n", + "2 10 2 1 \n", + "3 10 3 1 \n", + "4 10.88462238049958452634768946 1 2 \n", "\n", "result[2]\n", " run s1 s2 s3 s4 substep timestamp timestep\n", @@ -185,6 +271,7 @@ "from validation import sweep_config\n", "multi_proc_ctx = ExecutionContext(context=exec_mode.multi_proc)\n", "run2 = Executor(exec_context=multi_proc_ctx, configs=configs)\n", + "print(run2.main())\n", "results = []\n", "tensor_fields = []\n", "for raw_result, raw_tensor_field in run2.main():\n", @@ -196,6 +283,13 @@ " print(f\"result[{idx}]\")\n", " print(r.head())" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/simulations/validation/config1.py b/simulations/validation/config1.py index a2d09d3..1ad90e5 100644 --- a/simulations/validation/config1.py +++ b/simulations/validation/config1.py @@ -111,7 +111,7 @@ raw_exogenous_states = { env_processes = { "s3": env_a, - "s4": proc_trigger('2018-10-01 15:16:25', env_b) + "s4": proc_trigger(1, env_b) } diff --git a/simulations/validation/config2.py b/simulations/validation/config2.py index 6a22d01..31734e2 100644 --- a/simulations/validation/config2.py +++ b/simulations/validation/config2.py @@ -109,8 +109,8 @@ raw_exogenous_states = { env_processes = { - "s3": proc_trigger('2018-10-01 15:16:25', env_a), - "s4": proc_trigger('2018-10-01 15:16:25', env_b) + "s3": proc_trigger(1, env_a), + "s4": proc_trigger(1, env_b) } diff --git a/simulations/validation/sweep_config.py b/simulations/validation/sweep_config.py index eb54b72..09ccd6b 100644 --- a/simulations/validation/sweep_config.py +++ b/simulations/validation/sweep_config.py @@ -128,7 +128,7 @@ raw_exogenous_states = { # ToDo: make env proc trigger field agnostic # ToDo: input json into function renaming __name__ -triggered_env_b = proc_trigger('2018-10-01 15:16:25', env_b) +triggered_env_b = proc_trigger(1, env_b) env_processes = { "s3": env_a, #sweep(beta, env_a), "s4": triggered_env_b #rename('parameterized', triggered_env_b) #sweep(beta, triggered_env_b)