Skip to content

Commit

Permalink
Option for keeping files when using run_simulation added
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinksyTRD committed Dec 6, 2022
1 parent 766553b commit 547e8b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nbs/03_Simulation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1376,13 +1376,15 @@
" time_out_s: int = 60,\n",
" logging_level: LoggingLevel = LoggingLevel.warning,\n",
" for_old_cosim: bool = False,\n",
" keep_simulation_files: bool = False,\n",
" ):\n",
" \"\"\"Runs a simulation\"\"\"\n",
" path = self._prepare_temp_dir_for_simulation()\n",
" path_to_sys_struct = self.deploy_files_for_simulation(\n",
" path_to_deploy=path,\n",
" rel_path_to_system_structure=rel_path_to_sys_struct,\n",
" for_old_cosim=for_old_cosim,\n",
" keep_simulation_files=keep_simulation_files,\n",
" )\n",
" if for_old_cosim:\n",
" local_proxy_servers = self._get_local_proxy_servers_for_old_cosim(\n",
Expand Down
2 changes: 2 additions & 0 deletions pycosim/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,13 +1311,15 @@ def run_simulation(
time_out_s: int = 60,
logging_level: LoggingLevel = LoggingLevel.warning,
for_old_cosim: bool = False,
keep_simulation_files: bool = False,
):
"""Runs a simulation"""
path = self._prepare_temp_dir_for_simulation()
path_to_sys_struct = self.deploy_files_for_simulation(
path_to_deploy=path,
rel_path_to_system_structure=rel_path_to_sys_struct,
for_old_cosim=for_old_cosim,
keep_simulation_files=keep_simulation_files,
)
if for_old_cosim:
local_proxy_servers = self._get_local_proxy_servers_for_old_cosim(
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Python library ###
repo = pycosim
lib_name = %(repo)s
version = 0.6.2
version = 0.6.3
min_python = 3.8
license = MIT

Expand Down

0 comments on commit 547e8b3

Please sign in to comment.