- Index
- » Users
- » Miglu
- » Profile
Posts
Posts
Maybe a clue is given by the message I get when I quit python:
Exception omniORB.CORBA.TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, CORBA.COMPLETED_NO) in <bound method OMCSession.__del__ of <OMPython.OMCSession object at 0x7f607a4c9a10>>
Building of all models fail, but succeeded before. Any ideas for fixing?
The above methods allow to load models and files, but building still gives the same error, even after rebooting. What might the solution be?
Alright, thanks. Another option is to run 'top -b -n1', find omc's PID, and run 'kill -9 <PID>'
I deleted the OpenModelica files in the tmp directory during use. When I then do om = OMCSession(), new files are made, but when I do om.execute(...) I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/OMPython/__init__.py", line 213, in execute
result = self._omc.sendExpression(command)
File "/usr/lib/python2.7/dist-packages/OMPythonIDL/omc_communication_idl.py", line 47, in sendExpression
return _omnipy.invoke(self, "sendExpression", _0__OMCIDL.OmcCommunication._d_sendExpression, args)
omniORB.CORBA.COMM_FAILURE: CORBA.COMM_FAILURE(omniORB.COMM_FAILURE_WaitingForReply, CORBA.COMPLETED_MAYBE)
How to fix the system?
Thanks.
I want a model to be simulated many times with different parameter values.
According to docs, buildModel() "builds a modelica model by generating c code and build it", so I should use it, as is written in http://stackoverflow.com/questions/2096 … h-ompython
However, simulate() "simulates a modelica model by generating c code, build it and run the simulation executable." How to simulate without building again?
Simulating with OMPython creates unwarranted c, h and o files. How to stop this behavior, or at least change their path?
It was due to connecting a nonexistent component.
I am trying to use a model which depends on the Buildings library. The model contains for example
Buildings.Airflow.Multizone.Orifice Orifice1(
redeclare package Medium = Medium,
A=0.01,
m=0.5);
I put the file and a package.mo into a directory which is in OpenModelica's libraries directory, loaded the package, and tried to simulate. I got this error. What is the solution?
"Internal error BackendVariable.getVarAt failed to get the variable at index: 5\nError: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!"
How to add a package to OPENMODELICALIBRARY?
When I do OMPython.execute('getEnvironmentVar("OPENMODELICALIBRARY")'), I get
'""\n'
so I guess that setEnvironmentVar would not work.
Thanks.
I am trying to use a model which depends on the Buildings library. The model contains for example
Buildings.Airflow.Multizone.Orifice Orifice1(
redeclare package Medium = Medium,
A=0.01,
m=0.5);
I put the file and a package.mo into a directory which is in OpenModelica's libraries directory, loaded the package, and tried to simulate. I got this error. What is the solution?
"Warning: Alias set with different nominal values\n * candidate: MediumColumn1.sta_a.p(nominal = 100000.0)\n * candidate: Orifice2.port_b.p(nominal = 101325.0)\n * candidate: MediumColumn1.port_a.p(nominal = 101325.0)\n=> select value from MediumColumn1.port_a.p(nominal = 101325.0)\n because its component reference (or its binding component reference) is closer to the top level scope with depth: 3.\n If we have equal component reference depth for several components choose the one with non zero binding."
That works, thanks. I suggest adding a section about using external libraries into OMPython's guide.
I installed using apt-get, and OMPython.execute('loadModel(Buildings)") and OMPython.execute('loadFile("/home/ubuntu/miglu/Buildings/Airflow/Multizone/Examples/Validation3Rooms.mo")') now return true. However, when I do OMPython.execute('simulate(Validation3Rooms)'), I get "Model: Validation3Rooms does not exist! Please load it first before simulation." Thus I tried OMPython.execute('loadModel(Buildings.Validation3Rooms)'), which returns true, but simulation still fails.
What is the solution?
How to change model parameters in OMPython?
How to load external files? Loading a file in OpenModelica succeeded, but OMPython.execute('loadFile("/home/ubuntu/miglu/Buildings/Airflow/Multizone/Orifice.mo")') failed.
I also tried adding Buildings to openmodelica-21495/libraries and doing OMPython.loadModel(Buildings), which failed.
The problem was that omniORB was installed in dist-packages, while Python searched only site-packages, as I was using virtualenv.
In Linux, When I do "OMPython = OMCSession()" I get "ImportError: No module named omniORB", even though I then installed omniORB with apt-get and tried again. What might the solution be?
Thanks, I indeed had to make it using "make -f 'Makefile"
I installed 'openmodelica-21495' on Ubuntu. I have 'deb http://build.openmodelica.org/apt precise nightly' in openmodelica.list, and when I do 'sudo apt-get install openmodelica', I get that the newest version is installed.
I have installed the latest build. When I do 'python setup.py install' in /openmodelica/PythonInterface, I get "error: package directory 'OMPythonIDL' does not exist". What is the solution?
- Index
- » Users
- » Miglu
- » Profile