how do I change the fuzzy membership function range using the parsim command?

6 views (last 30 days)
I want to realize parallel operation through parsim, and change the range of membership function of the fuzzy controller in the last simulation model and the next simulation model. But when I ran the program, I found that parallel operations are all the same variables, which are the last variables of the loop. Here is my code.
open_system('ship_project_min_221207_fuzzycontrol');
load_system('ship_project_min_221207_fuzzycontrol');
model='ship_project_min_221207_fuzzycontrol';
x=0:1:5;
for i = 1:6
shipfuzzycontrol5=readfis('shipfuzzycontrol5');
shipfuzzycontrol5.Outputs(1).MembershipFunctions(3).Parameters = [45 52.5 52.5+x(i)];
in(i) = Simulink.SimulationInput('ship_project_min_221207_fuzzycontrol');
writeFIS(shipfuzzycontrol5,'shipfuzzycontrol5')
end
fuzzy = parsim(in , 'ShowProgress', 'on','ShowSimulationManager','on','TransferBaseWorkspaceVariables','on');
  1 Comment
Alvaro
Alvaro on 18 Jan 2023 at 16:54
Could you post the output you are getting and perhaps the full or a simplified model of what you are trying to simulate? It is not clear to me what you mean by parallel operations being the same variables, do you mean that each parallel worker is yielding the same output?

Sign in to comment.

Answers (0)

Categories

Find more on Fuzzy Logic Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!