renaming
This commit is contained in:
parent
76fb452508
commit
fcda21d513
|
|
@ -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)
|
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):
|
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)
|
return time_step(dt_str, fromat_str, _timedelta)
|
||||||
else:
|
else:
|
||||||
return dt_str
|
return dt_str
|
||||||
|
|
@ -114,7 +114,7 @@ def sweep_states(state_type, states, in_config):
|
||||||
def exo_update_per_ts(ep):
|
def exo_update_per_ts(ep):
|
||||||
@curried
|
@curried
|
||||||
def ep_decorator(f, y, var_dict, sub_step, sL, s, _input):
|
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)
|
return f(var_dict, sub_step, sL, s, _input)
|
||||||
else:
|
else:
|
||||||
return y, s[y]
|
return y, s[y]
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,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["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)
|
sL.append(last_in_copy)
|
||||||
del last_in_copy
|
del last_in_copy
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ class Executor:
|
||||||
sub_step = 0
|
sub_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['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]
|
states_list = [genesis_states]
|
||||||
|
|
||||||
sub_step += 1
|
sub_step += 1
|
||||||
|
|
@ -93,7 +93,7 @@ class Executor:
|
||||||
states_list_copy = deepcopy(states_list)
|
states_list_copy = deepcopy(states_list)
|
||||||
head, *tail = self.run_pipeline(var_dict, states_list_copy, configs, env_processes, time_seq, run)
|
head, *tail = self.run_pipeline(var_dict, states_list_copy, configs, env_processes, time_seq, run)
|
||||||
genesis = head.pop()
|
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)
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue