Skip to content

Commit

Permalink
fix result file path (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
arun3688 authored Apr 26, 2024
1 parent fa56e30 commit 69a502e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions OMPython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,8 +1225,12 @@ def simulate(self, resultfile=None, simflags=None, verbose=True): # 11
r=""
self.resultfile = os.path.join(self.tempdir, self.modelName + "_res.mat").replace("\\", "/")
else:
r=" -r=" + resultfile
self.resultfile = resultfile
if os.path.exists(resultfile):
r=" -r=" + resultfile
self.resultfile = resultfile
else:
r=" -r=" + os.path.join(self.tempdir, resultfile).replace("\\", "/")
self.resultfile = os.path.join(self.tempdir, resultfile).replace("\\", "/")

# allow runtime simulation flags from user input
if(simflags is None):
Expand Down

0 comments on commit 69a502e

Please sign in to comment.