diff --git a/README.md b/README.md index da92cd3..c539ded 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,21 @@ iteratively refine our work until we have constructed a model that closely refle and see how it evolves. We can then use these results to inform business decisions. #### Documentation: -* ##### [System Model Configuration](link) -* ##### [System Simulation Execution](link) -* ##### [Tutorials](link) +* ##### [Tutorials](tutorials) +* ##### [System Model Configuration](documentation/Simulation_Configuration.md) +* ##### [System Simulation Execution](documentation/Simulation_Execution.md) #### 0. Installation: -**Option A:** Proprietary Build Access +**Option A:** Build From Source +```bash +pip3 install -r requirements.txt +python3 setup.py sdist bdist_wheel +pip3 install dist/*.whl +``` + +**Option B:** Proprietary Build Access ***IMPORTANT NOTE:*** Tokens are issued to those with access to proprietary builds of cadCAD and BlockScience employees **ONLY**. Replace \ with an issued token in the script below. @@ -55,25 +62,24 @@ pip3 install pandas pathos fn funcy tabulate pip3 install cadCAD --extra-index-url https://@repo.fury.io/blockscience/ ``` -**Option B:** Build From Source -```bash -pip3 install -r requirements.txt -python3 setup.py sdist bdist_wheel -pip3 install dist/*.whl -``` +#### 1. [Configure System Model](documentation/Simulation_Configuration.md) -#### 1. [Configure System Model](link) - -#### 2. [Execute Simulations:](link) +#### 2. [Execute Simulations:](documentation/Simulation_Execution.md) ##### Single Process Execution: -Example [System Model Configurations](link): -* [System Model A](link): `/documentation/examples/sys_model_A.py` -* [System Model B](link): `/documentation/examples/sys_model_B.py` +Example System Model Configurations: +* [System Model A](documentation/examples/sys_model_A.py): +`/documentation/examples/sys_model_A.py` +* [System Model B](documentation/examples/sys_model_B.py): +`/documentation/examples/sys_model_B.py` + Example Simulation Executions: -* [System Model A](link): `/documentation/examples/sys_model_A_exec.py` -* [System Model B](link): `/documentation/examples/sys_model_B_exec.py` +* [System Model A](documentation/examples/sys_model_A_exec.py): +`/documentation/examples/sys_model_A_exec.py` +* [System Model B](documentation/examples/sys_model_B_exec.py): +`/documentation/examples/sys_model_B_exec.py` + ```python import pandas as pd from tabulate import tabulate @@ -99,13 +105,17 @@ print(tabulate(sys_model_A_result, headers='keys', tablefmt='psql')) print() ``` -### Multiple Simulations (Concurrent): -##### Multiple Simulation Execution (Multi Process Execution) -Documentation: [Simulation Execution](link) -Example [System Model Configurations](link): -* [System Model A](link): `/documentation/examples/sys_model_A.py` -* [System Model B](link): `/documentation/examples/sys_model_B.py` -[Example Simulation Executions::](link) `/documentation/examples/sys_model_AB_exec.py` +##### Multiple Simulations (Concurrent): +###### Multiple Simulation Execution (Multi Process Execution) +System Model Configurations: +* [System Model A](documentation/examples/sys_model_A.py): +`/documentation/examples/sys_model_A.py` +* [System Model B](documentation/examples/sys_model_B.py): +`/documentation/examples/sys_model_B.py` + +[Example Simulation Executions:](documentation/examples/sys_model_AB_exec.py) +`/documentation/examples/sys_model_AB_exec.py` + ```python import pandas as pd from tabulate import tabulate @@ -133,9 +143,10 @@ for sys_model_AB_raw_result, sys_model_AB_tensor_field in sys_model_AB_simulatio i += 1 ``` -### Parameter Sweep Simulation (Concurrent): -Documentation: [System Model Parameter Sweep](link) -[Example:](link) `/documentation/examples/param_sweep.py` +##### Parameter Sweep Simulation (Concurrent): +[Example:](documentation/examples/param_sweep.py) +`/documentation/examples/param_sweep.py` + ```python import pandas as pd from tabulate import tabulate @@ -157,11 +168,3 @@ for raw_result, tensor_field in run.execute(): print(tabulate(result, headers='keys', tablefmt='psql')) print() ``` - -### Tests: -```python -python -m unittest testing/tests/param_sweep.py -python -m unittest testing/tests/policy_aggregation.py -python -m unittest testing/tests/historical_state_access.py -python -m unittest testing/tests/external_dataset.py -``` diff --git a/documentation/Historically_State_Access.md b/documentation/Historically_State_Access.md index 7d684bf..e5961f7 100644 --- a/documentation/Historically_State_Access.md +++ b/documentation/Historically_State_Access.md @@ -50,10 +50,10 @@ def nonexistent(_params, substep, sH, s, _input): return 'nonexistent', access_block(sH, "nonexistent", 0, exclusion_list) ``` -#### Example Simulation -link +#### [Example Simulation:](examples/historical_state_access.py) -#### Example Output + +#### Example Output: ###### State History ``` +----+-------+-----------+------------+-----+ diff --git a/documentation/Policy_Aggregation.md b/documentation/Policy_Aggregation.md index b80db6b..f9b24bf 100644 --- a/documentation/Policy_Aggregation.md +++ b/documentation/Policy_Aggregation.md @@ -57,7 +57,7 @@ append_configs( ``` #### Example -##### * [System Model Configuration](https://github.com/BlockScience/cadCAD-Tutorials/blob/master/Documentation/examples/policy_aggregation.py) +##### * [System Model Configuration](examples/policy_aggregation.py) ##### * Simulation Results: ``` +----+---------------------------------------------+-------+------+-----------+------------+ diff --git a/documentation/Simulation_Configuration.md b/documentation/Simulation_Configuration.md index 0656244..9ceb57c 100644 --- a/documentation/Simulation_Configuration.md +++ b/documentation/Simulation_Configuration.md @@ -70,7 +70,7 @@ in the simulation. In other words, for how long do they want to simulate the sys cadCAD facilitates running multiple simulations of the same system sequentially, reporting the results of all those runs in a single dataset. This is especially helpful for running -[Monte Carlo Simulations](https://github.com/BlockScience/cadCAD-Tutorials/blob/master/01%20Tutorials/robot-marbles-part-4/robot-marbles-part-4.ipynb). +[Monte Carlo Simulations](../tutorials/robot-marbles-part-4/robot-marbles-part-4.ipynb). ### M - Parameters of the System @@ -137,7 +137,7 @@ cadCAD relies on in order to run the simulation according to the specifications. ### Policy Functions A Policy Function computes one or more signals to be passed to [State Update Functions](#State-Update-Functions) (via the _\_input_ parameter). Read -[this article](https://github.com/BlockScience/cadCAD-Tutorials/blob/master/01%20Tutorials/robot-marbles-part-2/robot-marbles-part-2.ipynb) +[this article](../tutorials/robot-marbles-part-2/robot-marbles-part-2.ipynb) for details on why and when to use policy functions.