Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Simulink | Advanced: Protecting the Model Code

In order to protect the confidentiality of a Simulink model, the source generated can be compiled within MATLAB. All .c files will be compiled within a static library model.a.

  1. Set environment variable to HYPERSIM installed directory (only for Windows)

    Set environment variable


  2. On the Simulink code option, check “Generate makefile” and uncheck “Generate code only”.

  3. Then process the build code by clicking on “Build”.
    If the code generated will be run on a different architecture from the MATLAB’s one. For instance, the model code is generated within MATLAB on Windows. Then it will be run on Linux real-time architecture.
    The code must be compiled on the same architecture of the simulation server.

  4. On the Simulink code option, check “Generate makefile” and then click “Generate Code”.

  5. Send the code generated to the simulation server.

  6. Use the to compile the source on the simulation server. On a terminal enter the following command:

    Compile the source on the simulation server (for OPAL-RT Linux)

    make –f

  7. Send the code compiled to any third party protecting the confidentiality of the model.

  8. With the code compiled, the third party can process Step 3: Importing to HYPERSIM to run the model.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323