Skip to content

Accessing Previous Versions of Modelica Libraries🔗

Introduction🔗

In Modelon Impact cloud and on-prem old versions of Modelica libraries will often be placed on a shared drive mounted under /modelica-dist-extra. An environment variable IMPACT_WM_PLATFORM_LIBRARIES is used to specify the list of locations for the Workspace Management app to look for those libraries. However, compilation and simulation performance will suffer due to network latency. If the performance impact is unacceptable the needed libraries may be copied to the fast local file system. The environment variable should then be modified to point to that alternative location.

Solution🔗

Create a directory modelica-dist under ~/impact directory. Then point the following impact environment variable to that location as described in the following steps:

  1. Go to Server Management in the Apps drop-down.

  2. Choose ENVIRONMENT VARIABLES and click on Set environment variables using VS Code. This will open "/home/jovyan/.impact/setenv.sh" file including all environment variables. Alternatively, open Bash Terminal from Launcher and execute


bash-4.2$ nano ~/.impact/setenv.sh

  1. Add the following line to the script:

    export IMPACT_WM_PLATFORM_LIBRARIES=/home/jovyan/impact/modelica-dist

    Note if the impact environment variable exists already and uses some other location, add the path as an extension separated by a semi-colon. There can be many paths but need to be separated by a semi-colon.

    export IMPACT_WM_PLATFORM_LIBRARIES={previous_path_if_any}:/home/jovyan/impact/modelica-dist

  2. Save this file (CTRL+S).
  3. Now launch the terminal and copy the library to the new location

cp -a /Modelica-dist-extra/{$library} /home/jovyan/impact/modelica-dist

For e.g. to copy VehicleDynamics 4.1 use the following command.


bash-4.2$ cp -a /modelica-dist-extra/VehicleDynamics\ 4.1* /home/jovyan/impact/modelica-dist/

  1. Once copy is done make sure all the required files are copied for each library (library directory and json file) as below figure. This is done by changing the directory to 'modelica-dist' and list all files and directories in that location.

bash-4.2$ cd /home/jovyan/impact/modelica-dist/

  1. Restart the server using the "Restart Impact" button on the server management page.

Conclusion🔗

Now using the workspace management app, you will be able to see all the libraries in ‘AVAILABLE LIBRARIES’ pane.