Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with lmodel import when using customBuildDirectory #215

Open
BastiJoe opened this issue May 8, 2024 · 0 comments
Open

Issues with lmodel import when using customBuildDirectory #215

BastiJoe opened this issue May 8, 2024 · 0 comments

Comments

@BastiJoe
Copy link

BastiJoe commented May 8, 2024

Description

I have issues with the import of other models (lmodel) when setting a customBuildDirectory.

Steps to reproduce

model_path = "C:\LocalData\Gitlab\SBC\sbc-modelica-app\app\files_io\2598988031648\neptune.mo"
INNER_MODELPATH = "Buildingpackage.Buildingmodel"

_dependencies = ["Modelica",
    "C:/LocalData/Gitlab/SBC/sbc-modelica-app/libraries/ExternData/ExternData/package.mo",
    "C:/LocalData/Gitlab/SBC/sbc-modelica-app/libraries/BuildingSystems/BuildingSystems/package.mo"]

self.__workdir = "C:\LocalData\Gitlab\SBC\sbc-modelica-app\app\files_io\2598988031648"
model = ModelicaSystem(
                fileName=model_path,
                modelName=INNER_MODELPATH,
                lmodel=_dependencies,
                variableFilter=OUTPUT_VARIABLE_FILTER,
                customBuildDirectory=self.__workdir,
            )

on initialization i get the following message. The simulation is executed but runs forever.

Warning: Could not find library bsxml-json in either of:
C:/LocalData/OpenModelica/lib//omc/bsxml-json.dll
/usr/lib//bsxml-json.dll
/lib//bsxml-json.dll
/usr/lib//bsxml-json.dll
/lib//bsxml-json.dll
C:/LocalData/OpenModelica/bin//bsxml-json.dll
C:/LocalData/OpenModelica/lib//omc/bsxml-json.dll
C:/LocalData/OpenModelica/lib//bsxml-json.dll
C:/Users/A200209509/AppData/Roaming/.openmodelica/binaries/Buildingpackage/bsxml-json.dll
C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648/Resources/Library/mingw64/bsxml-json.dll
C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648/Resources/Library/win64/bsxml-json.dll
C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648/Resources/Library/bsxml-json.dll

actually the file could be found here:

C:\LocalData\Gitlab\SBC\sbc-modelica-app\libraries\ExternData\ExternData\Resources\Library\win64\bsxml-json.lib

this is a subpath of the lmodel.

But it is only checking in the customBuildDirectory:

C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648

Expected behavior

Successful import of the lmodel from the absolute path defined in the _dependencies variable

Version and OS

  • Python 3.9.13
  • OMPython 3.5.1 master
  • OpenModelica v1.20.0 (64-bit)
  • OS: Windows 10, 64 bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant