mbsim-env / mbsim

A multi-body simulation software
https://www.mbsim-env.de
GNU Lesser General Public License v2.1
42 stars 16 forks source link

Error with using FMU from mbsim in simulink #44

Closed ga63cez closed 3 years ago

ga63cez commented 3 years ago

Hi, I am trying to run some simulations in Simulink. I imported the model from mbsim with a FMU-Block. The FMU-file is generated via cmd and 'mbsimCreateFMU.exe' executed from a matlab script. I want to investigate the effects of parameter changes and therefore I created a Matlab script, that does the following:

  1. load bus for Simulink and FMU
  2. for-loop that first changes parameters for mbsim and recreates the fmu-file, second the simulink model is executed

When starting the script from matlab, the first iteration of the loop is completed successfully. After the new fmu-file is created in the second iteration I always get the error: " Error using Agility_Analysis (line 104) Error parsing FMU 'mbsim.fmu'. Caused by: Error using Agility_Analysis (line 104) Access denied. Check that you have permissions to access the path. " grafik

I checked if it helps to run Matlab as an administrator but it doesn't.

I would be very thankful if someone can help me out with this issue.