-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathSetup_HEV_Model_Configurations.m
38 lines (30 loc) · 2.21 KB
/
Setup_HEV_Model_Configurations.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Copyright 2011-2024 The MathWorks, Inc.
expModel = bdroot;
electrical_path = char(find_system(expModel,'MatchFilter',@Simulink.match.allVariants,'Name','Electrical'));
vehicle_path = char(find_system(expModel,'MatchFilter',@Simulink.match.allVariants,'Name','Vehicle Dynamics'));
HEV_Electrical_Variants = {'Mean Value' 'System Level' 'Detailed'};
HEV_Configs_TBL_COLS = {'Type' 'ELECTRICAL' 'BATTERY' 'VEHICLE' 'SIM TIME'};
HEV_Configs_TABLE{1} = {'Sys BD VS' 'System Level' 'Predefined' 'Simple' 10}; % 15
HEV_Configs_TABLE{2} = {'Sys BC VS' 'System Level' 'Generic' 'Simple' 10}; % 15
HEV_Configs_TABLE{3} = {'Sys BD VF' 'System Level' 'Predefined' 'Full' 10}; % 15
HEV_Configs_TABLE{4} = {'Sys BC VF' 'System Level' 'Generic' 'Full' 10}; % 15
HEV_Configs_TABLE{5} = {'Mvl BD VS' 'Mean Value' 'Predefined' 'Simple' 10}; % 15
HEV_Configs_TABLE{6} = {'Mvl BC VS' 'Mean Value' 'Generic' 'Simple' 10}; % 15
HEV_Configs_TABLE{7} = {'Mvl BD VF' 'Mean Value' 'Predefined' 'Full' 10}; % 15
HEV_Configs_TABLE{8} = {'Mvl BC VF' 'Mean Value' 'Generic' 'Full' 10}; % 15
HEV_Configs_TABLE{9} = {'Det BD VS' 'Detailed' 'Predefined' 'Simple' 10}; % 15
HEV_Configs_TABLE{10} = {'Det BC VS' 'Detailed' 'Generic' 'Simple' 10}; % 15
HEV_Configs_TABLE{11} = {'Det BD VF' 'Detailed' 'Predefined' 'Full' 10}; % 15
HEV_Configs_TABLE{12} = {'Det BC VF' 'Detailed' 'Generic' 'Full' 10}; % 15
for i=1:length(HEV_Configs_TABLE)
HEV_Configs(i).Type = HEV_Configs_TABLE{i}{1};
HEV_Configs(i).Electrical.choice = HEV_Configs_TABLE{i}{2};
HEV_Configs(i).Battery.choice = HEV_Configs_TABLE{i}{3};
HEV_Configs(i).Vehicle.choice = HEV_Configs_TABLE{i}{4};
HEV_Configs(i).Sim_Time = HEV_Configs_TABLE{i}{5};
end
for i=1:length(HEV_Configs)
HEV_Configs(i).Electrical.path = {electrical_path};
HEV_Configs(i).Battery.path = {[electrical_path '/' char(HEV_Configs(i).Electrical.choice) '/Battery']};
HEV_Configs(i).Vehicle.path = {vehicle_path};
end