You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ModelicaSystem only useable locally - with possible solutions #315
See discussion in PR #309 – ModelicaSystem can only be used locally due to dependencies on access to the file system where OMC is running as well as the need to call the compiled model executable. This limits the usage of the class as it cannot be used with docker or WSL.
There are the following problems to solve (and possible solutions):
need of file system interactions => solution: create OMCPath, an implementation of a pathlib.Path object which uses OMC as backend (see detailed analyses which functionality is needed in PR [ModelicaSystem] only local omc process allowed #309)
run executable => solution: include a basic functionality within OMCSessionZMQ / OMCProcess* which allows to just(!) call the executable; this would abstract this functionality, i.e. it would prepend the command with ‘docker …’ or ‘wsl …’ as needed (but would also introduce another link / dependency to the system where OMC is running). Here it would be helpful if this could be coded such that it only returns the command to call (as list). Thus, ModelicaSystemCmd would stay independent of the OMCSessionZMQ instance.
library search path => solution: see (2); for this item, a solution is needed, even if (1) and (2) are not considered – does models executable using external libraries (example: SDF) run at all using ModelicaSystem with Linux? how to get the needed paths?
one additional PR as update for PR #314 based on PR #326 should be included in 4.0.0 to have only one interface change; 4.0.0 could then use both (old & new) before version 5.0.0 removes the old interface:
bigger changes for 4.1.0 (ModelicaSystemDoE, OMCPath and related changes)
cleanup for 5.0.0 (remove all depreciated functionality; see comment above)
Perhaps (an idea I'm plaing with) some additional cleanup for 4.1.0 (merge OMCSessionZMQ into OMCProcess + lots of renames to cleanup the namespace / usage of session)
Activity
syntron commentedon Jul 12, 2025
Please check the following PRs for an implementation:
(1) see PR #317 and #322
(2) see PR #324
(3) still needs to be tested ... I hope to get an example running using docker ...
Please keep in mind that all of this is only working for Python >= 3.12
syntron commentedon Aug 12, 2025
A solution is available! Please check PR #333 for a branch which contains all changes listed below
PRs:
(1) NO additional dependencies
(2) WITH dependencies
(3) small changes (NO additional dependency)
... to be defined as PR ...
syntron commentedon Aug 12, 2025
@Sonyoyo could you please test on WSL?
syntron commentedon Aug 15, 2025
Updated data / additional PRs
(1) NO additional dependencies
(2) WITH dependencies
(3) small changes (NO additional dependency)
syntron commentedon Aug 15, 2025
one additional PR as update for PR #314 based on PR #326 should be included in 4.0.0 to have only one interface change; 4.0.0 could then use both (old & new) before version 5.0.0 removes the old interface:
syntron commentedon Aug 15, 2025
just as reference: PR #308 would be something for the next big release / version 5.0.0 or so
syntron commentedon Aug 16, 2025
update how to REMOVE depreciated functionality (milestone 5.0.0 or later?):
syntron commentedon Aug 17, 2025
@adeas31 With this I'm done ;-)
Perhaps (an idea I'm plaing with) some additional cleanup for 4.1.0 (merge OMCSessionZMQ into OMCProcess + lots of renames to cleanup the namespace / usage of session)
adeas31 commentedon Aug 18, 2025
I have assign milestones to all open PRs now. You can double check.
syntron commentedon Aug 18, 2025
Below are the points I found:
PR Remove deprecated parts of OMCPath #346 => milestone 5.0.0
PR [DummyPopen] fix exception on timeout for wait() #323 => milestone 4.0.0
PR Better interface for
setParameters#326 is resolved in PR [ModelicaSystem] improve set functions #345 => milestone 4.1.0issue matplotlib.pyplot.savefig() breaks after useing model.linearize() #224 => resolved by PR ModelicaSystem.linearize() -> do not execute python file #320 / milestone 4.0.0
issue Handle process externally in ModelicaSystem.simulate and ModelicaSystem.linearized #230 => could be handled by PR [ModelicaSystemDoE] use OMCPath #333 & PR [OMCSessionRunData] run executable via OMCSessionZMQ #331 (execution independent of ModelicaSystem) => milestone 4.1.0
syntron commentedon Aug 19, 2025
@adeas31 please see the comment above for my updates; 2 PRs have no milestone and one other will be fixed by the defined PRs
syntron commentedon Nov 6, 2025
This can be closed after the merge of all relevant parts