-
Notifications
You must be signed in to change notification settings - Fork 61
[ModelicaSystem] only local omc process allowed #309
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
base: master
Are you sure you want to change the base?
[ModelicaSystem] only local omc process allowed #309
Conversation
21aaab8
to
c40bc06
Compare
Does this mean we can't use docker and wsl instances with ModelicaSystem? Is this just because if I/O permission issues? |
@adeas31 no, the reason is that ModelicaSystem accesses the file system directly without using OMC (create csv file; read result data, etc.). Due to this, the class can only used locally ... |
Here some more analyses: ModelicaSystem(Cmd) are using Python functions to access files from the OMC model; if this code is replaced by calls to OMC, the ModelicaSystem classes would be completly independent from the use OMCSessionZMQ(OMCProcess) version used. However, it would also mean, that some simple functionality is replaced by code which has to go through OMC in the case of a local usage - but it should be possible to abstract the access to the local filesystem! Thus, ModelicaSystem can be used for all systems for which OMCSessionZMQ is defined. Use cases (line numbers based on master):
|
Another big issue is the call to the executable in simulate() and linearize() using ModelicaSystemCmd(). A solution for this case is also needed - how to call / run the executable from the host within docker / wsl and also local? |
Another point: if the model executeable is used, the evaluation of the library paths is done for Windows (using *.bat file). However, I never tested this part for linux (docker, wsl). How can we ensure, that the needed (external) libraries are found in this case? |
c40bc06
to
fdd63e8
Compare
ModelicaSystem relies on read access to files and the possibility to execute the compiled model; thus, it only works if OMC is started locally
Use OMCProcessLocal to ensure that this requirement is defined
Based on PR #295