RapidAccelerator - rtp returns empty 'parameters' structure
    15 ビュー (過去 30 日間)
  
       古いコメントを表示
    
    CalinV
 2015 年 5 月 4 日
  
    
    
    
    
    回答済み: Radha Krishna Maddukuri
    
 2015 年 5 月 5 日
            Good day,
I'm having problems getting a parameter structure when building the RapidAccelerator mode for running a Simulink model.
rtp = Simulink.BlockDiagram.buildRapidAcceleratorTarget(model,'AddTunableParamInfo', 'on')
rtp = 
    modelChecksum: [2.4392e+09 825977970 3.1169e+09 4.0394e+09]
       parameters: []
problem: 'parameters' --> empty structure. Settings: Optimization > Signal and parameters > 'Inline parameters' is checked in and the required Tunable Parameter list was added to the table from the Matlab Workspace.
Why does rtp return empty parameters structure? I need this 'rtp' so I can go on with my coding for running the model in a loop where the tunable parameter values changes with each iteration.
0 件のコメント
採用された回答
  Radha Krishna Maddukuri
    
 2015 年 5 月 5 日
        I have tried the following commands on the demo model 'vdp':
   >> vdp
   >> rtp = Simulink.BlockDiagram.buildRapidAcceleratorTarget(bdroot,'AddTunableParamInfo', 'on')
   >> rtp.parameters
This gives the expected result. However, the Inline Parameters optimization is unchecked in this case and this can be verified from
   >> get_param('vdp','InlineParams')
Now, setting this parameter to on:
   >> set_param('vdp','InlineParams','on')
   >> rtp1 = Simulink.BlockDiagram.buildRapidAcceleratorTarget(bdroot,'AddTunableParamInfo', 'on')
   >> rtp1.parameters
This results in an empty 'parameters' field in the structure. The reason being the parameters are inlined. Therefore, if you want to use these parameters in the command line, I suggest you to un-check the Inline Parameters option.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

