Skip to content

JupyterLab🔗

JupyterLab is available from the Apps menu. It allows running Jupyter notebooks to interact with Modelon Impact. For more information about JupyterLab, see the JupyterLab documentation.

Run a Jupyter Notebook🔗

To run a Jupyter notebook in JupyterLab, find the notebook in the file browser, double-click it to view it, and hit the 'play' button to run the notebook cell by cell, or the 'fast forward' button to run the entire notebook.

Visual Studio Code🔗

Modelon Impact integrates an open-source in-browser version of the popular
VSCode (Visual Studio Code) editor. The integration relies on the work done by Code server project. This integration provides an option for experienced users to perform advanced operations:

  • File browser - browse through the files on your user disk on JupyterHub
  • Advanced version control operations
  • Opening a Terminal window
  • Adding / Removing Extensions

Note

Only extensions published in Open VSX registry are available. Microsoft proprietary extensions cannot be used.

Version Control in Visual Studio Code🔗

This section provides some tips for how to do version control operations which are currently not supported by the Modelon Workspace Management using Visual Studio code.

View differences between local vs. remote🔗

For a version-controlled repository, the differences between the local working copy with the remote repository can be viewed file by file. To do this:

  1. Go to the "Source control" view in the left sidebar in Visual Studio Code
  2. Click the file in the list of changed files to view the diff.

Edit conflicts🔗

When there are conflicts between the local modifications to the working copy and remote updates, these can be edited file by file, conflict by conflict, in Visual Studio Code.

  1. Go to the "Source control" view in the left sidebar in Visual Studio Code
  2. Click on a conflicted file in the list of changed files to view the diff
  3. For each conflict, select any of the options to resolve the conflict, e.g. "Accept Current Change". The code can also be edited manually.
  4. When all conflicts in the file have been resolved, Visual Studio code requests to mark the conflicted file as resolved. Click "Yes" to mark the conflict in this file as resolved.
  5. Do steps 2-4 for all conflicted files in the list (marked by "C"). All conflicts are now resolved and any changes can be committed from the Workspace Management

Account and Security🔗

The Account and security dialog opens from the user menu, the user icon at the top right of Modelon Impact. It is available to all users, including Deployment users.

Use it to check and generate the Modelon Impact API key. The API key is required when working with REST API, e.g., via Modelon Impact Python client.

Environment🔗

The Environment dialog opens from the user menu and is available to Pro users.

It shows the version of the execution environment and how much of your user space disk is in use. It also allows you to:

  • Set environment variables for Modelon Impact, including custom functions, via the VS Code editor.
  • Restart the Modelon Impact services in your user space, including the execution environment, with Restart, for example to apply new environment variables. Running experiments are stopped, and the page reloads when the services are back up. Your server, JupyterLab and VS Code keep running.

To stop your server, for example to free up resources, choose Logout in the user menu. Logging out also shuts down your server.

Set Environment Variables🔗

Setting environment variables for Modelon Impact is done via the Environment dialog.

Under Environment variables, click Set environment variables in VS Code. This will open the hidden /home/jovyan/.impact folder where you can find setenv.sh file.

The setenv.sh file is executed before the startup of the Modelon Impact controlled computation environment. It can be used to, e.g., set environment variables affecting OCT Modelica compiler, e.g., to Allocate More Memory. Note that this file is not executed before the startup of Jupyterlab and does not affect environment variables for Python scripts and notebooks running outside of the Modelon Impact computation engine.

Allocating More Memory🔗

Some models need more memory allocation for successful compilation. To allow OCT Modelica Compiler under Modelon Impact on cloud to use more memory. You need to set environment variable IMPACT_COMPILATION_JVM_MEM_OPT. In order to do that:

  1. Open Environment from the user menu.
  2. Under Environment variables, click Set environment variables in VS Code. This will open a folder where you can find "/home/jovyan/.impact/setenv.sh" file including all environment variables.
  3. Add a row to allocate more memory, e.g., to allocate 8GB RAM instead of the default 4GB:

    export IMPACT_COMPILATION_JVM_MEM_OPT=-Xmx8g
    
  4. Save this file (CTRL+S).

  5. Restart the Modelon Impact services using the Restart button in the Environment dialog.

Note

Setting the environment variable will make Modelica compiler try to allocate more memory. This does not change the hard memory limit set by your execution environment. Please, consult the operations team for information on the hard memory limits in your environment.

Back to top