First time here? Check our help page!
1

Library location for BuildingsPy

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.

Scott G's avatar
11
Scott G
asked 2017-08-11 14:32:43 -0500, updated 2017-08-14 09:12:31 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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?

Michael Wetter's avatar
1.7k
Michael Wetter
answered 2017-08-11 18:44:40 -0500
edit flag offensive 0 remove flag delete link

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
add a comment see more comments