Installation of the Buildings library
We recommend to install the library into a library directory that is different from the directory in which you build your own models. For example, unzip the Buildings library file. Then, proceed as follows.
Linux
Copy the library to the directory
/usr/local/Modelica/Library/Buildings x.y
, where x.y
is the version number
of the Buildings library. Therefore, your installation may look like
Next, set the MODELICAPATH
environment variable by adding the following line to your ~/.bashrc
file
and restart your bash shell.
Windows
Copy the library to the directory C:\Users\[your_login]\Documents\Buildings x.y
, where x.y
is the version number
of the Buildings library. Therefore, your installation may look as shown below.
Next, set the MODELICAPATH
system environment variable.
On Windows 7, system environment variables can be set in
Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables
.
Enter in the Variable
column MODELICAPATH
and enter in the Value
column c:\Users\[your_login]\Documents;%MODELICAPATH%
.
Configuring models to use the Buildings library
When creating models that use the Buildings
library, add at the top-level package.mo
file of your models the annotation shown in the example below.
This will automatically load the Buildings library version 11.0.0 when opening the file MyModels/package.mo
.
(See also http://simulationresearch.lbl.gov/modelica/userGuide/bestPractice.html#organization-of-packages for how to store your models.)
Updating to a new version of the Buildings library
To update your models to a new version of the Buildings library, proceed as follows:
- Install the new version of the Buildings library as described above.
- Open the new version of the Buildings library.
- Open the top-level
package.mo
file of your models. If it contains the above annotation, and the Buildings library that you opened is more recent than the version number referred to in the above annotation, then your models will automatically be converted using the conversion script of the Buildings library. The conversion scripts should update most of your models automatically. However, see the release notes of the Buildings library for any changes in the library that may not be converted automatically.