From 67c46cfe094c7bbb86becd375ccc71a2b1ca4c22 Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Wed, 21 Aug 2019 14:16:31 -0400 Subject: [PATCH] diverged docs --- README.md | 6 +++--- documentation/Simulation_Configuration.md | 16 ++++++++++++---- documentation/System_Model_Parameter_Sweep.md | 4 ++-- .../examples/historical_state_access.py | 1 - documentation/examples/policy_aggregation.py | 2 +- documentation/examples/sys_model_A.py | 3 +++ 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 679a8bf..ee67bb9 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,12 @@ and see how it evolves. We can then use these results to inform business decisio * ##### [Tutorials](link) -#### 0. Installation: Install Dependencies +#### 0. Installation: **Option A:** Package Repository Access -***IMPORTANT NOTE:*** Tokens are issued to and meant to be used by trial users and BlockScience employees **ONLY**. Replace \ with an issued token in the script below. +***IMPORTANT NOTE:*** Tokens are issued to and meant to be used by trial users and BlockScience employees **ONLY**. +Replace \ with an issued token in the script below. ```bash pip3 install pandas pathos fn funcy tabulate pip3 install cadCAD --extra-index-url https://@repo.fury.io/blockscience/ @@ -55,7 +56,6 @@ pip3 install dist/*.whl #### 2. [Execute Simulations:](link) - ##### Single Process Execution: Example [System Model Configurations](link): * [System Model A](link): `/documentation/examples/sys_model_A.py` diff --git a/documentation/Simulation_Configuration.md b/documentation/Simulation_Configuration.md index a49e364..304a01d 100644 --- a/documentation/Simulation_Configuration.md +++ b/documentation/Simulation_Configuration.md @@ -7,7 +7,8 @@ Given a **Simulation Configuration**, cadCAD produces datasets that represent th A Simulation Configuration is comprised of a [System Model](#System-Model) and a set of [Simulation Properties](#Simulation-Properties) -`append_configs`, stores a **Simulation Configuration** to be [Executed](/JS4Q9oayQASihxHBJzz4Ug) by cadCAD +`append_configs`, stores a **Simulation Configuration** to be +[Executed](https://github.com/BlockScience/cadCAD-Tutorials/blob/master/Documentation/Simulation_Execution.md) by cadCAD ```python from cadCAD.configuration import append_configs @@ -21,13 +22,20 @@ append_configs( ``` Parameters: * **initial_state** : _dict_ + [State Variables](#State-Variables) and their initial values + * **partial_state_update_blocks** : List[dict[dict]] + List of [Partial State Update Blocks](#Partial-State-Update-Blocks) + * **policy_ops** : List[functions] - See [Policy Aggregation](/63k2ncjITuqOPCUHzK7Viw) -* **sim_configs** : _???_ - See [System Model Parameter Sweep](/4oJ_GT6zRWW8AO3yMhFKrg) + + See [Policy Aggregation](https://github.com/BlockScience/cadCAD-Tutorials/blob/master/Documentation/Policy_Aggregation.md) + +* **sim_configs** : + + See ## Simulation Properties diff --git a/documentation/System_Model_Parameter_Sweep.md b/documentation/System_Model_Parameter_Sweep.md index aa47e7b..63b7306 100644 --- a/documentation/System_Model_Parameter_Sweep.md +++ b/documentation/System_Model_Parameter_Sweep.md @@ -69,5 +69,5 @@ sim_config = config_sim( ) ``` -#### [Example Configuration](link) -#### [Example Results](link) +#### [Example](link) + diff --git a/documentation/examples/historical_state_access.py b/documentation/examples/historical_state_access.py index fa038e7..327460a 100644 --- a/documentation/examples/historical_state_access.py +++ b/documentation/examples/historical_state_access.py @@ -11,7 +11,6 @@ exclusion_list = ['nonexsistant', 'last_x', '2nd_to_last_x', '3rd_to_last_x', '4 # Policies per Mechanism -# WARNING: DO NOT delete elements from sH # state_history, target_field, psu_block_offset, exculsion_list def last_update(_g, substep, sH, s): return {"last_x": access_block( diff --git a/documentation/examples/policy_aggregation.py b/documentation/examples/policy_aggregation.py index 38865ad..2807a74 100644 --- a/documentation/examples/policy_aggregation.py +++ b/documentation/examples/policy_aggregation.py @@ -80,7 +80,7 @@ append_configs( sim_configs=sim_config, initial_state=genesis_states, partial_state_update_blocks=psubs, - policy_ops=[lambda a, b: a + b, lambda y: y * 2] # Default: lambda a, b: a + b + policy_ops=[lambda a, b: a + b] # Default: lambda a, b: a + b , lambda y: y * 2 ) exec_mode = ExecutionMode() diff --git a/documentation/examples/sys_model_A.py b/documentation/examples/sys_model_A.py index 5c54dbe..3614291 100644 --- a/documentation/examples/sys_model_A.py +++ b/documentation/examples/sys_model_A.py @@ -35,6 +35,9 @@ def s1m1(_g, step, sH, s, _input): y = 's1' x = s['s1'] + 1 return (y, x) + + + def s2m1(_g, step, sH, s, _input): y = 's2' x = _input['param2']