Skip to content

Commit

Permalink
Add docker_container property to CADETAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
ronald-jaepel committed Nov 20, 2024
1 parent 8384f14 commit f641e7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CADETProcess/simulator/cadetAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,16 @@ class Cadet(SimulatorBase):
use_dll = Bool(default=False)
_force_constant_flow_rate = False

def __init__(self, install_path=None, temp_dir=None, *args, **kwargs):
def __init__(self, install_path=None, temp_dir=None, docker_container=None, *args, **kwargs):
super().__init__(*args, **kwargs)

if install_path is None:
self.install_path = CadetAPI.autodetect_cadet()
else:
self.install_path = install_path

self.docker_container = docker_container

self.model_solver_parameters = ModelSolverParameters()
self.solver_parameters = SolverParameters()
self.time_integrator_parameters = SolverTimeIntegratorParameters()
Expand Down Expand Up @@ -298,7 +300,7 @@ def get_cadet_version(self) -> tuple[str, str]:
raise RuntimeError(f"Command execution failed: {e}")

def get_new_cadet_instance(self):
cadet = CadetAPI(install_path=self.install_path, use_dll=self.use_dll)
cadet = CadetAPI(install_path=self.install_path, use_dll=self.use_dll, docker_container=self.docker_container)
return cadet

def save_to_h5(self, process, file_path):
Expand Down

0 comments on commit f641e7d

Please sign in to comment.