Skip to content

Commit

Permalink
small adaptions
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrauz authored and sdrauz committed Dec 15, 2023
1 parent 322f708 commit d69cf9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pandapipes/test/pipeflow_internals/test_transient.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def _save_single_xls_sheet(self, append):
def _init_log_variable(self, net, table, variable, index=None, eval_function=None,
eval_name=None):
if table == "res_internal":
index = np.arange(len(net.junction) + net.pipe.sections.sum())
index = np.arange(len(net.junction) + net.pipe.sections.sum() - 1)
return super()._init_log_variable(net, table, variable, index, eval_function, eval_name)


def _output_writer(net, time_steps, ow_path=None):
def _output_writer(net, time_steps, ow_path=None, output_type='.csv'):
"""
Creating an output writer.
Expand All @@ -44,7 +44,8 @@ def _output_writer(net, time_steps, ow_path=None):
log_variables = [
('res_junction', 't_k'), ('res_pipe', 't_to_k'), ('res_internal', 't_k')
]
ow = OutputWriterTransient(net, time_steps, output_path=ow_path, log_variables=log_variables)
ow = OutputWriterTransient(net, time_steps, output_path=ow_path, log_variables=log_variables,
output_file_type=output_type)
return ow


Expand Down
2 changes: 1 addition & 1 deletion pandapipes/timeseries/run_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def run_timeseries(net, time_steps=None, continue_on_divergence=False, verbose=T
:param verbose: Prints progress bar or if *logger.level == Debug*, it prints debug messages
:type verbose: bool, default True
:param kwargs: Keyword arguments for run_control and runpp
:type kwargs: dict
:type kwargs:
:return: No output
"""
ts_variables = init_time_series(net, time_steps, continue_on_divergence, verbose, **kwargs)
Expand Down

0 comments on commit d69cf9b

Please sign in to comment.