rename hell
This commit is contained in:
parent
fcda21d513
commit
50e4a38df7
|
|
@ -12,6 +12,8 @@ results
|
|||
*.csv
|
||||
*.txt
|
||||
simulations/.ipynb_checkpoints
|
||||
dist/*.gz
|
||||
cadCAD.egg-info
|
||||
|
||||
build
|
||||
SimCAD.egg-info
|
||||
|
|
@ -21,7 +21,7 @@ SimCAD is written in Python 3.
|
|||
```bash
|
||||
pip3 install -r requirements.txt
|
||||
python3 setup.py sdist bdist_wheel
|
||||
pip3 install dist/SimCAD-0.1-py3-none-any.whl
|
||||
pip3 install dist/cadCAD-0.1-py3-none-any.whl
|
||||
```
|
||||
|
||||
**2. Configure Simulation:**
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
name = "SimCAD"
|
||||
configs = []
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name = "cadCAD"
|
||||
configs = []
|
||||
|
|
@ -2,15 +2,15 @@ from functools import reduce
|
|||
from fn.op import foldr
|
||||
import pandas as pd
|
||||
|
||||
from SimCAD import configs
|
||||
from SimCAD.utils import key_filter
|
||||
from SimCAD.configuration.utils.policyAggregation import dict_elemwise_sum
|
||||
from SimCAD.configuration.utils import exo_update_per_ts
|
||||
from cadCAD import configs
|
||||
from cadCAD.utils import key_filter
|
||||
from cadCAD.configuration.utils.policyAggregation import dict_elemwise_sum
|
||||
from cadCAD.configuration.utils import exo_update_per_ts
|
||||
|
||||
|
||||
class Configuration(object):
|
||||
def __init__(self, sim_config=None, initial_state=None, seeds=None, env_processes=None,
|
||||
exogenous_states=None, partial_state_updates=None, policy_ops=[foldr(dict_elemwise_sum())]):
|
||||
def __init__(self, sim_config={}, initial_state={}, seeds={}, env_processes={},
|
||||
exogenous_states={}, partial_state_updates={}, policy_ops=[foldr(dict_elemwise_sum())], **kwargs):
|
||||
self.sim_config = sim_config
|
||||
self.initial_state = initial_state
|
||||
self.seeds = seeds
|
||||
|
|
@ -4,7 +4,7 @@ from copy import deepcopy
|
|||
from fn.func import curried
|
||||
import pandas as pd
|
||||
|
||||
from SimCAD.utils import dict_filter, contains_type
|
||||
from cadCAD.utils import dict_filter, contains_type
|
||||
|
||||
|
||||
class TensorFieldReport:
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from SimCAD.utils import flatten_tabulated_dict, tabulate_dict
|
||||
from cadCAD.utils import flatten_tabulated_dict, tabulate_dict
|
||||
|
||||
|
||||
def process_variables(d):
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
from pathos.multiprocessing import ProcessingPool as Pool
|
||||
|
||||
from SimCAD.utils import flatten
|
||||
from SimCAD.configuration import Processor
|
||||
from SimCAD.configuration.utils import TensorFieldReport
|
||||
from SimCAD.engine.simulation import Executor as SimExecutor
|
||||
from cadCAD.utils import flatten
|
||||
from cadCAD.configuration import Processor
|
||||
from cadCAD.configuration.utils import TensorFieldReport
|
||||
from cadCAD.engine.simulation import Executor as SimExecutor
|
||||
|
||||
|
||||
class ExecutionMode:
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from copy import deepcopy
|
||||
from fn.op import foldr, call
|
||||
|
||||
from SimCAD.engine.utils import engine_exception
|
||||
from cadCAD.engine.utils import engine_exception
|
||||
|
||||
id_exception = engine_exception(KeyError, KeyError, None)
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ class Executor:
|
|||
|
||||
del last_in_obj
|
||||
|
||||
self.apply_env_proc(env_processes, last_in_copy, last_in_copy['timestamp'])
|
||||
self.apply_env_proc(env_processes, last_in_copy, last_in_copy['timestep']) # not time_step
|
||||
|
||||
last_in_copy["sub_step"], last_in_copy["time_step"], last_in_copy['run'] = sub_step, time_step, run
|
||||
sL.append(last_in_copy)
|
||||
Binary file not shown.
Binary file not shown.
10
setup.py
10
setup.py
|
|
@ -1,6 +1,6 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
long_description = "SimCAD is a differential games based simulation software package for research, validation, and \
|
||||
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 \
|
||||
|
|
@ -10,14 +10,14 @@ long_description = "SimCAD is a differential games based simulation software pac
|
|||
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='SimCAD',
|
||||
setup(name='cadCAD',
|
||||
version='0.1',
|
||||
description="SimCAD: a differential games based simulation software package for research, validation, and \
|
||||
description="cadCAD: a differential games based simulation software package for research, validation, and \
|
||||
Computer Aided Design of economic systems",
|
||||
long_description = long_description,
|
||||
url='https://github.com/BlockScience/DiffyQ-SimCAD',
|
||||
url='https://github.com/BlockScience/DiffyQ-cadCAD',
|
||||
author='Joshua E. Jodesty',
|
||||
author_email='joshua@block.science',
|
||||
# license='LICENSE',
|
||||
packages=find_packages() #['SimCAD']
|
||||
packages=find_packages()
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import pandas as pd
|
||||
from tabulate import tabulate
|
||||
# The following imports NEED to be in the exact order
|
||||
from SimCAD.engine import ExecutionMode, ExecutionContext, Executor
|
||||
from cadCAD.engine import ExecutionMode, ExecutionContext, Executor
|
||||
from simulations.validation import sweep_config, config1, config2
|
||||
from SimCAD import configs
|
||||
from cadCAD import configs
|
||||
|
||||
exec_mode = ExecutionMode()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ from decimal import Decimal
|
|||
import numpy as np
|
||||
from datetime import timedelta
|
||||
|
||||
from SimCAD.configuration import append_configs
|
||||
from SimCAD.configuration.utils import proc_trigger, bound_norm_random, ep_time_step
|
||||
from SimCAD.configuration.utils.parameterSweep import config_sim
|
||||
from cadCAD.configuration import append_configs
|
||||
from cadCAD.configuration.utils import proc_trigger, bound_norm_random, ep_time_step
|
||||
from cadCAD.configuration.utils.parameterSweep import config_sim
|
||||
|
||||
|
||||
seeds = {
|
||||
|
|
@ -78,8 +78,8 @@ def es4p2(_g, step, sL, s, _input):
|
|||
ts_format = '%Y-%m-%d %H:%M:%S'
|
||||
t_delta = timedelta(days=0, minutes=0, seconds=1)
|
||||
def es5p2(_g, step, sL, s, _input):
|
||||
y = 'timestamp'
|
||||
x = ep_time_step(s, dt_str=s['timestamp'], fromat_str=ts_format, _timedelta=t_delta)
|
||||
y = 'timestep'
|
||||
x = ep_time_step(s, dt_str=s['timestep'], fromat_str=ts_format, _timedelta=t_delta)
|
||||
return (y, x)
|
||||
|
||||
|
||||
|
|
@ -98,14 +98,14 @@ genesis_states = {
|
|||
's2': Decimal(0.0),
|
||||
's3': Decimal(1.0),
|
||||
's4': Decimal(1.0),
|
||||
'timestamp': '2018-10-01 15:16:24'
|
||||
'timestep': '2018-10-01 15:16:24'
|
||||
}
|
||||
|
||||
|
||||
raw_exogenous_states = {
|
||||
"s3": es3p1,
|
||||
"s4": es4p2,
|
||||
"timestamp": es5p2
|
||||
"timestep": es5p2
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ from decimal import Decimal
|
|||
import numpy as np
|
||||
from datetime import timedelta
|
||||
|
||||
from SimCAD.configuration import append_configs
|
||||
from SimCAD.configuration.utils import proc_trigger, bound_norm_random, ep_time_step
|
||||
from SimCAD.configuration.utils.parameterSweep import config_sim
|
||||
from cadCAD.configuration import append_configs
|
||||
from cadCAD.configuration.utils import proc_trigger, bound_norm_random, ep_time_step
|
||||
from cadCAD.configuration.utils.parameterSweep import config_sim
|
||||
|
||||
seeds = {
|
||||
'z': np.random.RandomState(1),
|
||||
|
|
@ -77,8 +77,8 @@ def es4p2(_g, step, sL, s, _input):
|
|||
ts_format = '%Y-%m-%d %H:%M:%S'
|
||||
t_delta = timedelta(days=0, minutes=0, seconds=1)
|
||||
def es5p2(_g, step, sL, s, _input):
|
||||
y = 'timestamp'
|
||||
x = ep_time_step(s, dt_str=s['timestamp'], fromat_str=ts_format, _timedelta=t_delta)
|
||||
y = 'timestep'
|
||||
x = ep_time_step(s, dt_str=s['timestep'], fromat_str=ts_format, _timedelta=t_delta)
|
||||
return (y, x)
|
||||
|
||||
|
||||
|
|
@ -97,14 +97,14 @@ genesis_states = {
|
|||
's2': Decimal(0.0),
|
||||
's3': Decimal(1.0),
|
||||
's4': Decimal(1.0),
|
||||
'timestamp': '2018-10-01 15:16:24'
|
||||
'timestep': '2018-10-01 15:16:24'
|
||||
}
|
||||
|
||||
|
||||
raw_exogenous_states = {
|
||||
"s3": es3p1,
|
||||
"s4": es4p2,
|
||||
"timestamp": es5p2
|
||||
"timestep": es5p2
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import numpy as np
|
|||
from datetime import timedelta
|
||||
import pprint
|
||||
|
||||
from SimCAD.configuration import append_configs
|
||||
from SimCAD.configuration.utils import proc_trigger, ep_time_step
|
||||
from SimCAD.configuration.utils.parameterSweep import config_sim
|
||||
from cadCAD.configuration import append_configs
|
||||
from cadCAD.configuration.utils import proc_trigger, ep_time_step
|
||||
from cadCAD.configuration.utils.parameterSweep import config_sim
|
||||
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
|
||||
|
|
@ -93,8 +93,8 @@ def es4p2(_g, step, sL, s, _input):
|
|||
ts_format = '%Y-%m-%d %H:%M:%S'
|
||||
t_delta = timedelta(days=0, minutes=0, seconds=1)
|
||||
def es5p2(_g, step, sL, s, _input):
|
||||
y = 'timestamp'
|
||||
x = ep_time_step(s, dt_str=s['timestamp'], fromat_str=ts_format, _timedelta=t_delta)
|
||||
y = 'timestep'
|
||||
x = ep_time_step(s, dt_str=s['timestep'], fromat_str=ts_format, _timedelta=t_delta)
|
||||
return (y, x)
|
||||
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ genesis_states = {
|
|||
's2': Decimal(0.0),
|
||||
's3': Decimal(1.0),
|
||||
's4': Decimal(1.0),
|
||||
'timestamp': '2018-10-01 15:16:24'
|
||||
'timestep': '2018-10-01 15:16:24'
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ genesis_states = {
|
|||
raw_exogenous_states = {
|
||||
"s3": es3p1,
|
||||
"s4": es4p2,
|
||||
"timestamp": es5p2
|
||||
"timestep": es5p2
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue