@@ -23,9 +23,9 @@ def test_ModelicaSystem_loop(model_firstorder):
2323 def worker ():
2424 filePath = model_firstorder .as_posix ()
2525 mod = OMPython .ModelicaSystem ()
26- mod .model_definition (
26+ mod .model (
2727 file = filePath ,
28- model = "M" ,
28+ name = "M" ,
2929 )
3030 mod .simulate ()
3131 mod .convertMo2Fmu (fmuType = "me" )
@@ -37,9 +37,9 @@ def test_setParameters():
3737 omc = OMPython .OMCSessionZMQ ()
3838 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
3939 mod = OMPython .ModelicaSystem ()
40- mod .model_definition (
40+ mod .model (
4141 file = model_path + "BouncingBall.mo" ,
42- model = "BouncingBall" ,
42+ name = "BouncingBall" ,
4343 )
4444
4545 # method 1
@@ -70,9 +70,9 @@ def test_setSimulationOptions():
7070 omc = OMPython .OMCSessionZMQ ()
7171 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
7272 mod = OMPython .ModelicaSystem ()
73- mod .model_definition (
73+ mod .model (
7474 file = model_path + "BouncingBall.mo" ,
75- model = "BouncingBall" ,
75+ name = "BouncingBall" ,
7676 )
7777
7878 # method 1
@@ -107,9 +107,9 @@ def test_relative_path(model_firstorder):
107107 assert "/" not in model_relative
108108
109109 mod = OMPython .ModelicaSystem ()
110- mod .model_definition (
110+ mod .model (
111111 file = model_relative ,
112- model = "M" ,
112+ name = "M" ,
113113 )
114114 assert float (mod .getParameters ("a" )[0 ]) == - 1
115115 finally :
@@ -121,9 +121,9 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
121121 tmpdir = tmp_path / "tmpdir1"
122122 tmpdir .mkdir ()
123123 mod = OMPython .ModelicaSystem (customBuildDirectory = tmpdir )
124- mod .model_definition (
124+ mod .model (
125125 file = filePath ,
126- model = "M" ,
126+ name = "M" ,
127127 )
128128 assert mod .getWorkDirectory ().resolve () == tmpdir .resolve ()
129129 result_file = tmpdir / "a.mat"
@@ -135,9 +135,9 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
135135def test_getSolutions (model_firstorder ):
136136 filePath = model_firstorder .as_posix ()
137137 mod = OMPython .ModelicaSystem ()
138- mod .model_definition (
138+ mod .model (
139139 file = filePath ,
140- model = "M" ,
140+ name = "M" ,
141141 )
142142 x0 = 1
143143 a = - 1
@@ -176,9 +176,9 @@ def test_getters(tmp_path):
176176end M_getters;
177177""" )
178178 mod = OMPython .ModelicaSystem ()
179- mod .model_definition (
179+ mod .model (
180180 file = model_file .as_posix (),
181- model = "M_getters" ,
181+ name = "M_getters" ,
182182 )
183183
184184 q = mod .getQuantities ()
@@ -372,9 +372,9 @@ def test_simulate_inputs(tmp_path):
372372end M_input;
373373""" )
374374 mod = OMPython .ModelicaSystem ()
375- mod .model_definition (
375+ mod .model (
376376 file = model_file .as_posix (),
377- model = "M_input" ,
377+ name = "M_input" ,
378378 )
379379
380380 mod .setSimulationOptions (simOptions = {"stopTime" : 1.0 })
0 commit comments