diverged docs

This commit is contained in:
Joshua E. Jodesty 2019-08-21 14:16:31 -04:00
parent 9399c6b728
commit 67c46cfe09
6 changed files with 21 additions and 11 deletions

View File

@ -33,11 +33,12 @@ and see how it evolves. We can then use these results to inform business decisio
* ##### [Tutorials](link) * ##### [Tutorials](link)
#### 0. Installation: Install Dependencies #### 0. Installation:
**Option A:** Package Repository Access **Option A:** Package Repository Access
***IMPORTANT NOTE:*** Tokens are issued to and meant to be used by trial users and BlockScience employees **ONLY**. Replace \<TOKEN\> 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 \<TOKEN\> with an issued token in the script below.
```bash ```bash
pip3 install pandas pathos fn funcy tabulate pip3 install pandas pathos fn funcy tabulate
pip3 install cadCAD --extra-index-url https://<TOKEN>@repo.fury.io/blockscience/ pip3 install cadCAD --extra-index-url https://<TOKEN>@repo.fury.io/blockscience/
@ -55,7 +56,6 @@ pip3 install dist/*.whl
#### 2. [Execute Simulations:](link) #### 2. [Execute Simulations:](link)
##### Single Process Execution: ##### Single Process Execution:
Example [System Model Configurations](link): Example [System Model Configurations](link):
* [System Model A](link): `/documentation/examples/sys_model_A.py` * [System Model A](link): `/documentation/examples/sys_model_A.py`

View File

@ -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) 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 ```python
from cadCAD.configuration import append_configs from cadCAD.configuration import append_configs
@ -21,13 +22,20 @@ append_configs(
``` ```
Parameters: Parameters:
* **initial_state** : _dict_ * **initial_state** : _dict_
[State Variables](#State-Variables) and their initial values [State Variables](#State-Variables) and their initial values
* **partial_state_update_blocks** : List[dict[dict]] * **partial_state_update_blocks** : List[dict[dict]]
List of [Partial State Update Blocks](#Partial-State-Update-Blocks) List of [Partial State Update Blocks](#Partial-State-Update-Blocks)
* **policy_ops** : List[functions] * **policy_ops** : List[functions]
See [Policy Aggregation](/63k2ncjITuqOPCUHzK7Viw)
* **sim_configs** : _???_ See [Policy Aggregation](https://github.com/BlockScience/cadCAD-Tutorials/blob/master/Documentation/Policy_Aggregation.md)
See [System Model Parameter Sweep](/4oJ_GT6zRWW8AO3yMhFKrg)
* **sim_configs** :
See
## Simulation Properties ## Simulation Properties

View File

@ -69,5 +69,5 @@ sim_config = config_sim(
) )
``` ```
#### [Example Configuration](link) #### [Example](link)
#### [Example Results](link)

View File

@ -11,7 +11,6 @@ exclusion_list = ['nonexsistant', 'last_x', '2nd_to_last_x', '3rd_to_last_x', '4
# Policies per Mechanism # Policies per Mechanism
# WARNING: DO NOT delete elements from sH
# state_history, target_field, psu_block_offset, exculsion_list # state_history, target_field, psu_block_offset, exculsion_list
def last_update(_g, substep, sH, s): def last_update(_g, substep, sH, s):
return {"last_x": access_block( return {"last_x": access_block(

View File

@ -80,7 +80,7 @@ append_configs(
sim_configs=sim_config, sim_configs=sim_config,
initial_state=genesis_states, initial_state=genesis_states,
partial_state_update_blocks=psubs, 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() exec_mode = ExecutionMode()

View File

@ -35,6 +35,9 @@ def s1m1(_g, step, sH, s, _input):
y = 's1' y = 's1'
x = s['s1'] + 1 x = s['s1'] + 1
return (y, x) return (y, x)
def s2m1(_g, step, sH, s, _input): def s2m1(_g, step, sH, s, _input):
y = 's2' y = 's2'
x = _input['param2'] x = _input['param2']