File tree Expand file tree Collapse file tree 1 file changed +29
-4
lines changed
Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -173,15 +173,14 @@ def args_set(self, args: dict) -> None:
173173 for arg in args :
174174 self .arg_set (key = arg , val = args [arg ])
175175
176- def run (self ) -> bool :
176+ def get_exe (self ) -> pathlib . Path :
177177 """
178- Run the requested simulation
178+ Get the path to the executable / complied model.
179179
180180 Returns
181181 -------
182- bool
182+ pathlib.Path
183183 """
184-
185184 if platform .system () == "Windows" :
186185 path_exe = self ._runpath / f"{ self ._modelname } .exe"
187186 else :
@@ -190,6 +189,19 @@ def run(self) -> bool:
190189 if not path_exe .exists ():
191190 raise ModelicaSystemError (f"Application file path not found: { path_exe } " )
192191
192+ return path_exe
193+
194+ def get_cmd (self ) -> list :
195+ """
196+ Run the requested simulation
197+
198+ Returns
199+ -------
200+ list
201+ """
202+
203+ path_exe = self .get_exe ()
204+
193205 cmdl = [path_exe .as_posix ()]
194206 for key in self ._args :
195207 if self ._args [key ] is None :
@@ -200,6 +212,19 @@ def run(self) -> bool:
200212 else :
201213 cmdl .append (f"-{ key } ={ self ._args [key ]} " )
202214
215+ return cmdl
216+
217+ def run (self ) -> int :
218+ """
219+ Run the requested simulation
220+
221+ Returns
222+ -------
223+ int
224+ """
225+
226+ cmdl : list = self .get_cmd ()
227+
203228 logger .debug ("Run OM command %s in %s" , repr (cmdl ), self ._runpath .as_posix ())
204229
205230 if platform .system () == "Windows" :
You can’t perform that action at this time.
0 commit comments