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.
Set environment variable to HYPERSIM installed directory (only for Windows)
Set environment variable
setenv('HYPERSIM_DIR','C:\OPAL-RT\HYPERSIM\hypersim_%version%')
On the Simulink code option, check “Generate makefile” and uncheck “Generate code only”.
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.On the Simulink code option, check “Generate makefile” and then click “Generate Code”.
Send the code generated to the simulation server.
Use the model.mk 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 model.mk
Send the code compiled to any third party protecting the confidentiality of the model.
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 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter