File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1640,7 +1640,7 @@ def convertMo2Fmu(
16401640 # to convert FMU to Modelica model
16411641 def convertFmu2Mo (
16421642 self ,
1643- fmuName : os .PathLike ,
1643+ fmu : os .PathLike ,
16441644 ) -> pathlib .Path :
16451645 """
16461646 In order to load FMU, at first it needs to be translated into Modelica model. This method is used to generate
@@ -1650,7 +1650,7 @@ def convertFmu2Mo(
16501650 >>> convertFmu2Mo("c:/BouncingBall.Fmu")
16511651 """
16521652
1653- fmu_path = pathlib .Path (fmuName )
1653+ fmu_path = pathlib .Path (fmu )
16541654
16551655 filename = self ._requestApi (apiName = 'importFMU' , entity = fmu_path .as_posix ())
16561656 filepath = pathlib .Path (filename )
@@ -1659,6 +1659,11 @@ def convertFmu2Mo(
16591659 if not filepath .is_file ():
16601660 raise ModelicaSystemError (f"Missing file { filepath .as_posix ()} " )
16611661
1662+ self .model (
1663+ name = f"{ fmu_path .stem } _me_FMU" ,
1664+ file = filepath ,
1665+ )
1666+
16621667 return filepath
16631668
16641669 def optimize (self ) -> dict [str , Any ]:
You can’t perform that action at this time.
0 commit comments