diff --git a/SimCAD/configuration/utils/__init__.py b/SimCAD/configuration/utils/__init__.py index 27da8c9..8034a14 100644 --- a/SimCAD/configuration/utils/__init__.py +++ b/SimCAD/configuration/utils/__init__.py @@ -41,7 +41,7 @@ def time_step(dt_str, dt_format='%Y-%m-%d %H:%M:%S', _timedelta = t_delta): 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 = t_delta): - if s['mech_step'] == 0: + if s['sub_timestep'] == 0: return time_step(dt_str, fromat_str, _timedelta) else: return dt_str @@ -50,7 +50,7 @@ def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = t_delta def exo_update_per_ts(ep): @curried def ep_decorator(f, y, step, sL, s, _input): - if s['mech_step'] + 1 == 1: + if s['sub_timestep'] + 1 == 1: return f(step, sL, s, _input) else: return (y, s[y]) diff --git a/SimCAD/engine/simulation.py b/SimCAD/engine/simulation.py index 66f065f..558283f 100644 --- a/SimCAD/engine/simulation.py +++ b/SimCAD/engine/simulation.py @@ -43,7 +43,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'] = m_step, t_step, run + last_in_copy["sub_timestep"], last_in_copy["time_step"], last_in_copy['run'] = m_step, t_step, run sL.append(last_in_copy) del last_in_copy @@ -53,7 +53,7 @@ class Executor: m_step = 0 states_list_copy = deepcopy(states_list) genesis_states = states_list_copy[-1] - genesis_states['mech_step'], genesis_states['time_step'] = m_step, t_step + genesis_states['sub_timestep'], genesis_states['time_step'] = m_step, t_step states_list = [genesis_states] m_step += 1 @@ -83,9 +83,9 @@ class Executor: states_list_copy = deepcopy(states_list) head, *tail = self.block_pipeline(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_timestep'], 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 - return pipe_run \ No newline at end of file + return pipe_run