diff --git a/engine/mechanismExecutor.py b/engine/mechanismExecutor.py index 37fdab4..9c7ce8e 100644 --- a/engine/mechanismExecutor.py +++ b/engine/mechanismExecutor.py @@ -21,11 +21,6 @@ def mech_step(m_step, sL, state_funcs, behavior_funcs, env_processes, t_step): _input = getBehaviorInput(m_step, sL, last_in_obj, behavior_funcs) - # OLD: no bueno! Mutation Bad - # for f in state_funcs: - # f(m_step, sL, last_mut_obj, _input) - - # New last_mut_obj = dict([ f(m_step, sL, last_mut_obj, _input) for f in state_funcs ]) apply_env_proc(env_processes, last_mut_obj, last_mut_obj['timestamp']) diff --git a/engine/run.py b/engine/run.py index 1adcca7..5ef2a65 100644 --- a/engine/run.py +++ b/engine/run.py @@ -10,10 +10,11 @@ def main(): states_list = [state_dict] configs = generate_config(mechanisms, exogenous_states) # p = pipeline(states_list, configs, env_processes, range(10)) + T = range(5) N = sim_config['N'] - r = range(5) + # Dimensions: N x r x mechs - s = simulation(states_list, configs, env_processes, r, N) + s = simulation(states_list, configs, env_processes, T, N) result = pd.DataFrame(flatten(s)) print('Test') # print(tabulate(result, headers='keys', tablefmt='psql')) diff --git a/engine/utils.py b/engine/utils.py index 08ce7fd..2e63fc8 100644 --- a/engine/utils.py +++ b/engine/utils.py @@ -27,6 +27,7 @@ def last_index(l): def retrieve_state(l, offset): return l[last_index(l) + offset + 1] +# shouldn't def bound_norm_random(rng, low, high): # Add RNG Seed res = rng.normal((high+low)/2,(high-low)/6)