Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

Library location for BuildingsPy

asked 2017-08-11 14:32:43 -0500

Scott G's avatar

updated 2017-08-14 09:12:31 -0500

I am attempting to use BuildingsPy for simulation and regression testing on Windows for a non-buildingspy library and using Anaconda 2.7 and Dymola 2017 FD01. I installed builingspy using pip install buildingspy

I then copied the first simulator example and changed to a simple example of my own that runs fine in Dymola.

model = 'Demonstrations.Examples.LorenzSystem_Test'

I then removed the parameter change so it would simply simulate the model

s.addParameters({'con.eOn': 0.1})

If i run from a command window it outsputs the model name, directory, and time and then waits for a while then:

*** Error: Killing simulation in c:\users\USERNAME\appdata\local\temp\tmp-simulator-USERNAME-i7i__u\newFolder

If I run from IPython I get this error:

  File "C:\Program Files\Anaconda2\lib\multiprocessing\pool.py", line 567, in get
    raise self._value
  LookupError: unknown encoding: cp0

I have also tried the regression tests and when I use the showGUI = True flag Dymola opens up (dymola is on the path) but then fails to load the specified library. Both attempts the working directory was the location of the top level package of the modelica library. I also tried having the library in the dymola startup file (dymola.mos) but that didn't seem to help.

Any so I can use buildingspy would be much appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-11 18:44:40 -0500

To load a library, please put it on the MODELICAPATH environment variable. Also note that the startup script changed recently in Dymola (I believe between 2017 FD01 and 2018) but you should not have to change this for BuildingsPy.

Does your script that has an unkown encoding use the same entries as buildingspy/examples/dymola/runSimulation.py?

edit flag offensive delete link more

Comments

I have put the library on the path and the the script uses the same entries as the runSimulation example brom the github repo. All the issues that were mentioned previously still persist. Don't know if it is the issue but my username starts with a "v" which is a special character if buildingspy used \v notation. Also, I am using Dymola 2017 FD01.

Scott G's avatar Scott G  ( 2017-08-14 09:12:02 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

Stats

Asked: 2017-08-11 14:26:15 -0500

Seen: 371 times

Last updated: Aug 14 '17