From 2528180a8c6633179ee7b29c36869ab3bd9c533d Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Tue, 22 Sep 2020 14:20:54 -0400 Subject: [PATCH 1/4] including change table doc --- .../cadCAD-v0.4.23-Model-Upgrade-Guide.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100755 documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md diff --git a/documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md b/documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md new file mode 100755 index 00000000..1ae94cd1 --- /dev/null +++ b/documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Feature + + ver. => 0.4.22 + + ver. 0.3.1 (Deprecated) +
+
+ Experiments +
+
+
+from cadCAD.configuration import Experiment
+exp = Experiment()
+exp.append_configs(...) 
+
+
+
+from cadCAD.configuration import append_configs
+append_configs(…)         
+
+
+
+ Local Execution Mode +
+
+
          
+from cadCAD.engine import ExecutionMode, ExecutionContext
+exec_mode = ExecutionMode()
+local_ctx = ExecutionContext(context=exec_mode.local_mode)         
+
+
+

Multi-Threaded

+
+from cadCAD.engine import ExecutionMode, ExecutionContext
+exec_mode = ExecutionMode()
+single_ctx = ExecutionContext(context=exec_mode.multi_proc)
+
+

Single-Threaded

+
+from cadCAD.engine import ExecutionMode, ExecutionContext
+exec_mode = ExecutionMode()
+multi_ctx = ExecutionContext(context=exec_mode.single_proc)
+            
+
+
+ cadCAD Post-Processing Enhancements / Modifications +
+
+
+import pandas as pd
+from tabulate import tabulate
+from cadCAD.engine import ExecutionMode, ExecutionContext, Executor
+import system_model_A, system_model_B
+
+from cadCAD import configs
+exec_mode = ExecutionMode()
+
+local_ctx = ExecutionContext(context=exec_mode.local_mode)
+simulation = Executor(exec_context=local_ctx, configs=configs)
+raw_result, sys_model, _ = simulation.execute()
+result = pd.DataFrame(raw_result)
+print(tabulate(result, headers='keys', tablefmt='psql'))
+
+
+
+        
+import pandas as pd
+from tabulate import tabulate
+from cadCAD.engine import ExecutionMode, ExecutionContext, Executor
+import system_model_A, system_model_B
+from cadCAD import configs
+
+exec_mode = ExecutionMode()
+multi_ctx = ExecutionContext(context=exec_mode.multi_proc)
+simulation = Executor(exec_context=multi_ctx, configs=configs)
+i = 0
+config_names = ['sys_model_A', 'sys_model_B']
+for raw_result, _ in simulation.execute():
+result = pd.DataFrame(raw_result)
+print()
+print(f"{config_names[i]} Result: System Events DataFrame:")
+print(tabulate(result, headers='keys', tablefmt='psql'))
+print()
+i += 1
+           
+   
+
+
+ Expandable state and policy update parameter +
+
+
+def state_update(_params, substep, sH, s, _input, **kwargs):
+…
+return 'state_variable_name', new_value
+def policy(_params, substep, sH, s, **kwargs):
+…
+return {'signal_1': value_1, …, 'signal_N': value_N}
+   
+
+
     
+def state_update(_params, substep, sH, s, _input):
+…
+return 'state_variable_name', new_value
+def policy(_params, substep, sH, s):
+…
+return {'signal_1': value_1, …, 'signal_N': value_N}  
+   
+
From 0d3e291319adf953341c662a21ae6a2834da541a Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Tue, 22 Sep 2020 14:29:32 -0400 Subject: [PATCH 2/4] including change table doc --- documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md b/documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md index 1ae94cd1..9962becf 100755 --- a/documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md +++ b/documentation/cadCAD-v0.4.23-Model-Upgrade-Guide.md @@ -4,7 +4,7 @@ Feature - ver. => 0.4.22 + ver. 0.4.23 ver. 0.3.1 (Deprecated) From a583600011701363a86964a726123a1e1a1d9c1a Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Tue, 22 Sep 2020 14:57:17 -0400 Subject: [PATCH 3/4] updated CHANGELOG --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1060f029..abade949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,10 @@ ### September 22, 2020 ##### [Multi - System Model Execution](https://github.com/cadCAD-org/cadCAD/blob/master/documentation/Simulation_Execution.md#multiple-simulation-execution) * **ver. ≥ `0.4.23`:** - * Hot-Fix: [#203](https://github.com/cadCAD-org/cadCAD/pull/203) (**No Breaking Changes**) - * Simulation results will no longer return truncated results / exclude the results of the last + * **Hot-Fix:** [#203](https://github.com/cadCAD-org/cadCAD/pull/203) (**No Breaking Changes**) + * Multi - System Model simulation results will no longer return truncated results / exclude the results of the last `cadCAD.configuration.Configuration` appended to `cadCAD.configs`. - * Issue: [#195](https://github.com/cadCAD-org/cadCAD/issues/195) + * Issue: [#195](https://github.com/cadCAD-org/cadCAD/issues/195) ### August 5, 2020 From 566bae126b255d9cef902e60ee05f0f3ca28ef12 Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Tue, 22 Sep 2020 14:59:01 -0400 Subject: [PATCH 4/4] updated CHANGELOG --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abade949..4ef46e98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ ##### [Multi - System Model Execution](https://github.com/cadCAD-org/cadCAD/blob/master/documentation/Simulation_Execution.md#multiple-simulation-execution) * **ver. ≥ `0.4.23`:** * **Hot-Fix:** [#203](https://github.com/cadCAD-org/cadCAD/pull/203) (**No Breaking Changes**) - * Multi - System Model simulation results will no longer return truncated results / exclude the results of the last - `cadCAD.configuration.Configuration` appended to `cadCAD.configs`. + * Multi - System Model simulation results will no longer return truncated results (exclude the results of the last + `cadCAD.configuration.Configuration` appended to `cadCAD.configs`). * Issue: [#195](https://github.com/cadCAD-org/cadCAD/issues/195)