Merge pull request #1 from BlockScience/master

merge
This commit is contained in:
Markus Buhatem Koch 2019-09-11 22:03:02 +02:00 committed by GitHub
commit 460b1ff67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 554 additions and 16 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ jupyter notebook
.ipynb_checkpoints
.DS_Store
.idea
.pytest_cache/
notebooks
*.egg-info
__pycache__

View File

@ -16,14 +16,14 @@ Contributors:
- Matthew V. Barlin
- Michael Zargham
- Zixuan Zhang
- Charles Rice
Wed also like to thank:
- Andrew Clark
- Nikhil Jamdade
- Nick Hirannet
- Jonathan Gabler
- Chris Frazier
- Harry Goodnight
- Charlie Hoppes
- Jonathan Gabler
- Charles Rice

21
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,21 @@
# Contributing to cadCAD (Draft)
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
The following is a set of guidelines for contributing to cadCAD. These are mostly guidelines, not rules.
Use your best judgment, and feel free to propose changes to this document in a pull request.
### Pull Requests:
Pull Request (PR) presented as "->".
General Template:
fork/branch -> BlockScience/staging
Contributing a new feature:
fork/feature -> BlockScience/staging
Contributing to an existing feature:
fork/feature -> BlockScience/feature
Thanks! :heart:

View File

@ -32,7 +32,7 @@ under various conditions. Support for A/B testing policies, Monte Carlo analysis
provided.
In essence, cadCAD tool allows us to represent a companys or communitys current business model along with a desired
For example, cadCAD tool allows us to represent a companys or communitys current business model along with a desired
future state and helps make informed, rigorously tested decisions on how to get from todays stage to the future state.
It allows us to use code to solidify our conceptualized ideas and see if the outcome meets our expectations. We can
iteratively refine our work until we have constructed a model that closely reflects reality at the start of the model,
@ -49,14 +49,19 @@ and see how it evolves. We can then use these results to inform business decisio
**Python 3.6.5** :: Anaconda, Inc.
**Option A:** Build From Source
**Option A:** [PyPi](https://pypi.org/project/cadCAD/): pip install
```bash
pip install cadCAD
```
**Option B:** Build From Source
```bash
pip3 install -r requirements.txt
python3 setup.py sdist bdist_wheel
pip3 install dist/*.whl
```
**Option B:** Proprietary Build Access
**Option C:** Proprietary Build Access
***IMPORTANT NOTE:*** Tokens are issued to those with access to proprietary builds of cadCAD and BlockScience employees **ONLY**.
Replace \<TOKEN\> with an issued token in the script below.

15
ascii_art.txt Normal file
View File

@ -0,0 +1,15 @@
Complex Adaptive Dynamics
o i e
m d s
p e i
u d g
t n
e
r
__________ ____
________ __ _____/ ____/ | / __ \
/ ___/ __` / __ / / / /| | / / / /
/ /__/ /_/ / /_/ / /___/ ___ |/ /_/ /
\___/\__,_/\__,_/\____/_/ |_/_____/
by BlockScience

View File

@ -47,6 +47,8 @@ def append_configs(sim_configs={}, initial_state={}, seeds={}, raw_exogenous_sta
partial_state_update_blocks=partial_state_update_blocks,
policy_ops=policy_ops
)
print(sim_configs)
#for each sim config create new config
configs.append(config)

View File

@ -222,10 +222,13 @@ class Executor:
return first_timestep_per_run
tp = TPool(runs)
pipe_run: List[List[Dict[str, Any]]] = flatten(
TPool().map(
tp.map(
lambda run: execute_run(sweep_dict, states_list, configs, env_processes, time_seq, run),
list(range(runs))
)
)
tp.clear()
return pipe_run

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +1,22 @@
from setuptools import setup, find_packages
long_description = "cadCAD is a differential games based simulation software package for research, validation, and \
Computer Aided Design of economic systems. An economic system is treated as a state based model and defined through \
a set of endogenous and exogenous state variables which are updated through mechanisms and environmental processes, \
respectively. Behavioral models, which may be deterministic or stochastic, provide the evolution of the system \
within the action space of the mechanisms. Mathematical formulations of these economic games treat agent utility as \
derived from state rather than direct from action, creating a rich dynamic modeling framework. Simulations may be \
run with a range of initial conditions and parameters for states, behaviors, mechanisms, and environmental \
processes to understand and visualize network behavior under various conditions. Support for A/B testing policies, \
monte carlo analysis and other common numerical methods is provided."
long_description = """
cadCAD (complex adaptive systems computer-aided design) is a python based, unified modeling framework for stochastic
dynamical systems and differential games for research, validation, and Computer Aided Design of economic systems created
by BlockScience. It is capable of modeling systems at all levels of abstraction from Agent Based Modeling (ABM) to
System Dynamics (SD), and enabling smooth integration of computational social science simulations with empirical data
science workflows.
An economic system is treated as a state-based model and defined through a set of endogenous and exogenous state
variables which are updated through mechanisms and environmental processes, respectively. Behavioral models, which may
be deterministic or stochastic, provide the evolution of the system within the action space of the mechanisms.
Mathematical formulations of these economic games treat agent utility as derived from the state rather than direct from
an action, creating a rich, dynamic modeling framework. Simulations may be run with a range of initial conditions and
parameters for states, behaviors, mechanisms, and environmental processes to understand and visualize network behavior
under various conditions. Support for A/B testing policies, Monte Carlo analysis, and other common numerical methods is
provided.
"""
setup(name='cadCAD',
version='0.3.0',

View File

@ -6,5 +6,6 @@ In this series, we introduce basic concepts of cadCAD and system modelling in ge
[Part 3](robot-marbles-part-3/robot-marbles-part-3.ipynb) - From Synchronous to Asynchronous Time
[Part 4](robot-marbles-part-4/robot-marbles-part-4.ipynb) - Uncertainty and Stochastic Processes
[Part 5](robot-marbles-part-5/robot-marbles-part-5.ipynb) - Using class objects as state variables
[Part 6](robot-marbles-part-6/robot-marbles-part-6.ipynb) - A/B testing
Check out the [videos](videos) folder for detailed walkthroughs of each one of the tutorials.

File diff suppressed because one or more lines are too long