@@ -26,7 +26,7 @@ def __del__(self):
2626 def testModelicaSystemLoop (self ):
2727 def worker ():
2828 filePath = (self .tmp / "M.mo" ).as_posix ()
29- m = OMPython .ModelicaSystem (filePath , "M" )
29+ m = OMPython .ModelicaSystem (fileName = filePath , modelName = "M" )
3030 m .simulate ()
3131 m .convertMo2Fmu (fmuType = "me" )
3232 for _ in range (10 ):
@@ -35,7 +35,7 @@ def worker():
3535 def test_setParameters (self ):
3636 omc = OMPython .OMCSessionZMQ ()
3737 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
38- mod = OMPython .ModelicaSystem (model_path + "BouncingBall.mo" , "BouncingBall" )
38+ mod = OMPython .ModelicaSystem (fileName = model_path + "BouncingBall.mo" , modelName = "BouncingBall" )
3939
4040 # method 1
4141 mod .setParameters ("e=1.234" )
@@ -59,7 +59,7 @@ def test_setParameters(self):
5959 def test_setSimulationOptions (self ):
6060 omc = OMPython .OMCSessionZMQ ()
6161 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
62- mod = OMPython .ModelicaSystem (model_path + "BouncingBall.mo" , "BouncingBall" )
62+ mod = OMPython .ModelicaSystem (fileName = model_path + "BouncingBall.mo" , modelName = "BouncingBall" )
6363
6464 # method 1
6565 mod .setSimulationOptions ("stopTime=1.234" )
@@ -89,7 +89,7 @@ def test_relative_path(self):
8989 model_relative = str (model_file )
9090 assert "/" not in model_relative
9191
92- mod = OMPython .ModelicaSystem (model_relative , "M" )
92+ mod = OMPython .ModelicaSystem (fileName = model_relative , modelName = "M" )
9393 assert float (mod .getParameters ("a" )[0 ]) == - 1
9494 finally :
9595 # clean up the temporary file
@@ -99,7 +99,7 @@ def test_customBuildDirectory(self):
9999 filePath = (self .tmp / "M.mo" ).as_posix ()
100100 tmpdir = self .tmp / "tmpdir1"
101101 tmpdir .mkdir ()
102- m = OMPython .ModelicaSystem (filePath , "M" , customBuildDirectory = tmpdir )
102+ m = OMPython .ModelicaSystem (fileName = filePath , modelName = "M" , customBuildDirectory = tmpdir )
103103 assert m .getWorkDirectory ().resolve () == tmpdir .resolve ()
104104 result_file = tmpdir / "a.mat"
105105 assert not result_file .exists ()
@@ -108,7 +108,7 @@ def test_customBuildDirectory(self):
108108
109109 def test_getSolutions (self ):
110110 filePath = (self .tmp / "M.mo" ).as_posix ()
111- mod = OMPython .ModelicaSystem (filePath , "M" )
111+ mod = OMPython .ModelicaSystem (fileName = filePath , modelName = "M" )
112112 x0 = 1
113113 a = - 1
114114 tau = - 1 / a
@@ -144,7 +144,7 @@ def test_getters(self):
144144 y = der(x);
145145end M_getters;
146146""" )
147- mod = OMPython .ModelicaSystem (model_file .as_posix (), "M_getters" )
147+ mod = OMPython .ModelicaSystem (fileName = model_file .as_posix (), modelName = "M_getters" )
148148
149149 q = mod .getQuantities ()
150150 assert isinstance (q , list )
@@ -322,7 +322,7 @@ def test_simulate_inputs(self):
322322 y = x;
323323end M_input;
324324""" )
325- mod = OMPython .ModelicaSystem (model_file .as_posix (), "M_input" )
325+ mod = OMPython .ModelicaSystem (fileName = model_file .as_posix (), modelName = "M_input" )
326326
327327 mod .setSimulationOptions ("stopTime=1.0" )
328328
0 commit comments