Revert "rename mech_step > sub_timestep"
This reverts commit f7955b78fd.
This commit is contained in:
parent
f7955b78fd
commit
ccdf7ba80d
|
|
@ -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)
|
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):
|
def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = t_delta):
|
||||||
if s['sub_timestep'] == 0:
|
if s['mech_step'] == 0:
|
||||||
return time_step(dt_str, fromat_str, _timedelta)
|
return time_step(dt_str, fromat_str, _timedelta)
|
||||||
else:
|
else:
|
||||||
return dt_str
|
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):
|
def exo_update_per_ts(ep):
|
||||||
@curried
|
@curried
|
||||||
def ep_decorator(f, y, step, sL, s, _input):
|
def ep_decorator(f, y, step, sL, s, _input):
|
||||||
if s['sub_timestep'] + 1 == 1:
|
if s['mech_step'] + 1 == 1:
|
||||||
return f(step, sL, s, _input)
|
return f(step, sL, s, _input)
|
||||||
else:
|
else:
|
||||||
return (y, s[y])
|
return (y, s[y])
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class Executor:
|
||||||
|
|
||||||
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['timestamp'])
|
||||||
|
|
||||||
last_in_copy["sub_timestep"], last_in_copy["time_step"], last_in_copy['run'] = m_step, t_step, run
|
last_in_copy["mech_step"], last_in_copy["time_step"], last_in_copy['run'] = m_step, t_step, run
|
||||||
sL.append(last_in_copy)
|
sL.append(last_in_copy)
|
||||||
del last_in_copy
|
del last_in_copy
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ class Executor:
|
||||||
m_step = 0
|
m_step = 0
|
||||||
states_list_copy = deepcopy(states_list)
|
states_list_copy = deepcopy(states_list)
|
||||||
genesis_states = states_list_copy[-1]
|
genesis_states = states_list_copy[-1]
|
||||||
genesis_states['sub_timestep'], genesis_states['time_step'] = m_step, t_step
|
genesis_states['mech_step'], genesis_states['time_step'] = m_step, t_step
|
||||||
states_list = [genesis_states]
|
states_list = [genesis_states]
|
||||||
|
|
||||||
m_step += 1
|
m_step += 1
|
||||||
|
|
@ -83,9 +83,9 @@ class Executor:
|
||||||
states_list_copy = deepcopy(states_list)
|
states_list_copy = deepcopy(states_list)
|
||||||
head, *tail = self.block_pipeline(states_list_copy, configs, env_processes, time_seq, run)
|
head, *tail = self.block_pipeline(states_list_copy, configs, env_processes, time_seq, run)
|
||||||
genesis = head.pop()
|
genesis = head.pop()
|
||||||
genesis['sub_timestep'], genesis['time_step'], genesis['run'] = 0, 0, run
|
genesis['mech_step'], genesis['time_step'], genesis['run'] = 0, 0, run
|
||||||
first_timestep_per_run = [genesis] + tail.pop(0)
|
first_timestep_per_run = [genesis] + tail.pop(0)
|
||||||
pipe_run += [first_timestep_per_run] + tail
|
pipe_run += [first_timestep_per_run] + tail
|
||||||
del states_list_copy
|
del states_list_copy
|
||||||
|
|
||||||
return pipe_run
|
return pipe_run
|
||||||
Loading…
Reference in New Issue