From fcda21d513286ab0efb7e1e9158568a4b0dd0281 Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Thu, 14 Feb 2019 15:38:57 -0500 Subject: [PATCH] renaming --- SimCAD/configuration/utils/__init__.py | 4 ++-- SimCAD/engine/simulation.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SimCAD/configuration/utils/__init__.py b/SimCAD/configuration/utils/__init__.py index 814efcf..ab5113d 100644 --- a/SimCAD/configuration/utils/__init__.py +++ b/SimCAD/configuration/utils/__init__.py @@ -52,7 +52,7 @@ def time_step(dt_str, dt_format='%Y-%m-%d %H:%M:%S', _timedelta = tstep_delta): ep_t_delta = timedelta(days=0, minutes=0, seconds=1) def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = ep_t_delta): - if s['mech_step'] == 0: + if s['sub_step'] == 0: return time_step(dt_str, fromat_str, _timedelta) else: return dt_str @@ -114,7 +114,7 @@ def sweep_states(state_type, states, in_config): def exo_update_per_ts(ep): @curried def ep_decorator(f, y, var_dict, sub_step, sL, s, _input): - if s['mech_step'] + 1 == 1: + if s['sub_step'] + 1 == 1: return f(var_dict, sub_step, sL, s, _input) else: return y, s[y] diff --git a/SimCAD/engine/simulation.py b/SimCAD/engine/simulation.py index 288af7e..4d855b1 100644 --- a/SimCAD/engine/simulation.py +++ b/SimCAD/engine/simulation.py @@ -51,7 +51,7 @@ class Executor: self.apply_env_proc(env_processes, last_in_copy, last_in_copy['timestamp']) - last_in_copy["mech_step"], last_in_copy["time_step"], last_in_copy['run'] = sub_step, time_step, run + last_in_copy["sub_step"], last_in_copy["time_step"], last_in_copy['run'] = sub_step, time_step, run sL.append(last_in_copy) del last_in_copy @@ -62,7 +62,7 @@ class Executor: sub_step = 0 states_list_copy = deepcopy(states_list) genesis_states = states_list_copy[-1] - genesis_states['mech_step'], genesis_states['time_step'] = sub_step, time_step + genesis_states['sub_step'], genesis_states['time_step'] = sub_step, time_step states_list = [genesis_states] sub_step += 1 @@ -93,7 +93,7 @@ class Executor: states_list_copy = deepcopy(states_list) head, *tail = self.run_pipeline(var_dict, states_list_copy, configs, env_processes, time_seq, run) genesis = head.pop() - genesis['mech_step'], genesis['time_step'], genesis['run'] = 0, 0, run + genesis['sub_step'], genesis['time_step'], genesis['run'] = 0, 0, run first_timestep_per_run = [genesis] + tail.pop(0) pipe_run += [first_timestep_per_run] + tail del states_list_copy