Skip to content

Commit bf6988a

Browse files
author
vikrants
committed
Add checks for util. vector size and make output T vector consistent with input vector util.
1 parent 39d1843 commit bf6988a

39 files changed

Lines changed: 141 additions & 24 deletions
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
component(Propagation=Blocks) RoomLevelControl
2+
% Room Level Control:2.5
3+
4+
% Copyright 2026 The MathWorks, Inc.
5+
6+
parameters
7+
portOption = roomControlOption.heat; % Port option
8+
% N = 5; % Total number of rooms
9+
roomMapping = ones(5,4); % Apartment and room mapping matrix
10+
end
11+
12+
% parameters(ExternalAccess=none)
13+
% N = size(roomMapping,1);
14+
% end
15+
16+
equations
17+
% assert(size(Si,1)==N);
18+
% assert(size(Vi,1)==N);
19+
Si == So;
20+
Vi == Vo;
21+
end
22+
23+
inputs
24+
Si = {zeros(1,size(roomMapping,1)), "W"}; % Si
25+
Vi = {ones(1,size(roomMapping,1)), "1"}; % Vi
26+
end
27+
28+
outputs
29+
So = {zeros(1,size(roomMapping,1)), "W"}; % So
30+
Vo = {ones(1,size(roomMapping,1)), "1"}; % Vo
31+
end
32+
33+
annotations
34+
Icon = "iconRoomLevelControl.png";
35+
end
36+
37+
if portOption == roomControlOption.heat
38+
annotations
39+
[Vi,Vo] : ExternalAccess=none;
40+
end
41+
else
42+
annotations
43+
[Si,So] : ExternalAccess=none;
44+
end
45+
end
46+
end
3 Bytes
Binary file not shown.
41 Bytes
Binary file not shown.
1 Byte
Binary file not shown.
6 Bytes
Binary file not shown.
21.5 KB
Binary file not shown.
5 Bytes
Binary file not shown.
7 Bytes
Binary file not shown.
11 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)