combinedone.mdl
来自「The model consists of two systems, a cli」· MDL 代码 · 共 2,577 行 · 第 1/5 页
MDL
2,577 行
PortDimensions "1"
Interpolate on
}
Block {
BlockType TriggerPort
Name " input events "
Ports [0, 1]
Position [20, 171, 40, 189]
TriggerType "either"
ShowOutputPort on
OutputDataType "auto"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 245, 320, 285]
Outputs "1"
BusSelectionMode off
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function combinedOne 1"
Ports [3, 5]
Position [180, 100, 230, 220]
FunctionName "sf_sfun"
PortCounts "[3 5]"
SFunctionModules "''"
Port {
PortNumber 2
Name "ACAct"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
Port {
PortNumber 3
Name "HeaterAct"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
Port {
PortNumber 4
Name "RequiredTemp"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
Port {
PortNumber 5
Name "BlowerOut"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 256, 480, 274]
}
Block {
BlockType Outport
Name "ACAct"
Position [460, 101, 480, 119]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "HeaterAct"
Position [460, 136, 480, 154]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "RequiredTemp"
Position [460, 171, 480, 189]
Port "3"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "BlowerOut"
Position [460, 206, 480, 224]
Port "4"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
Name "RequiredTemp"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 4
DstBlock "RequiredTemp"
DstPort 1
}
Line {
Name "HeaterAct"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "HeaterAct"
DstPort 1
}
Line {
Name "ACAct"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "ACAct"
DstPort 1
}
Line {
Name "BlowerOut"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 5
DstBlock "BlowerOut"
DstPort 1
}
Line {
SrcBlock " input events "
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
Line {
SrcBlock "IntTemp"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "SetPTemp"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [20, 0]
DstBlock " Demux "
DstPort 1
}
}
}
Block {
BlockType Display
Name "Thermometer Display"
Ports [1]
Position [1045, 448, 1140, 482]
BackgroundColor "yellow"
FontName "Arial"
FontSize 14
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Constant
Name "Torque Comp"
Position [790, 99, 830, 121]
FontName "Arial"
FontSize 14
Value "25"
VectorParams1D on
}
Block {
BlockType SubSystem
Name "User Setpoint in Celcius"
Ports [0, 1]
Position [100, 194, 140, 236]
BackgroundColor "yellow"
FontName "Arial"
FontSize 14
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskPromptString "Enter the Temperature you require"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "USet=@1;"
MaskInitialization "set_param('combinedOne/ClimateControlSystem"
"/User Setpoint in Celcius/User Setpoint','Value',num2str(USet))"
MaskDisplay "disp(num2str(USet))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "9"
System {
Name "User Setpoint in Celcius"
Location [33, 181, 318, 293]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Constant
Name "Constant1"
Position [120, 55, 150, 85]
Value "273"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [185, 35, 205, 55]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Constant
Name "User Setpoint"
Position [25, 30, 55, 60]
Value "9"
VectorParams1D on
}
Block {
BlockType Outport
Name "Out1"
Position [230, 38, 260, 52]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "User Setpoint"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
}
}
Block {
BlockType Product
Name "proportion fan speed"
Ports [2, 1]
Position [440, 501, 485, 534]
FontName "Arial"
FontSize 14
Inputs "2"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "additional loding"
Position [545, 548, 575, 562]
FontName "Arial"
FontSize 14
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Distribution Request"
SrcPort 1
Points [0, 5; 85, 0; 0, 25]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Distribution "
SrcPort 1
Points [15, 0; 0, 30]
DstBlock "Distribution Request"
DstPort 1
}
Line {
SrcBlock "Distribution1\n"
SrcPort 1
DstBlock "Distribution Request"
DstPort 2
}
Line {
SrcBlock "Recycling Air1"
SrcPort 1
Points [45, 0]
DstBlock "Recycle Air On"
DstPort 2
}
Line {
SrcBlock "User Setpoint in Celcius"
SrcPort 1
DstBlock "Temperature Control Chart"
DstPort 1
}
Line {
SrcBlock "Recycling Air"
SrcPort 1
DstBlock "Recycle Air On"
DstPort 1
}
Line {
SrcBlock "Recycle Air On"
SrcPort 1
Points [95, 0; 0, -20]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "System Trigger"
SrcPort 1
Points [40, 0]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Interior Dynamics"
SrcPort 1
Points [-5, 0; 15, 0]
Branch {
Points [0, -75]
Branch {
Points [15, 0]
Branch {
Points [0, -200]
DstBlock "AC Control"
DstPort 4
}
Branch {
DstBlock "Heater Control"
DstPort 4
}
}
Branch {
Points [0, -15; -360, 0; 0, 0]
Branch {
Points [-270, 0; 0, -85]
DstBlock "Temperature Control Chart"
DstPort 2
}
Branch {
Points [0, 35]
DstBlock "Sum1"
DstPort 1
}
}
}
Branch {
Points [0, 115; -475, 0]
DstBlock "Sum2"
DstPort 3
}
Branch {
DstBlock "Subsystem"
DstPort 1
}
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Thermometer Display"
DstPort 1
}
Line {
SrcBlock "Heat from occupants"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "External Temperature in Celcius"
SrcPort 1
DstBlock "Subsystem1"
DstPort 1
}
Line {
SrcBlock "Mass flow rate"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Mass flow rate"
DstPort 1
}
Line {
SrcBlock "Subsystem1"
SrcPort 1
Points [0, 0; 125, 0]
Branch {
Points [0, -85]
DstBlock "Heater Control"
DstPort 3
}
Branch {
DstBlock "Sum1"
DstPort 2
}
}
Line {
SrcBlock "Fan Speed rate"
SrcPort 1
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "proportion fan speed"
DstPort 2
}
Line {
SrcBlock "Temperature Control Chart"
SrcPort 4
Points [0, 0; 30, 0]
Branch {
Points [415, 0]
Branch {
Points [0, -160]
DstBlock "AC Control"
DstPort 3
}
Branch {
DstBlock "Heater Control"
DstPort 2
}
}
Branch {
DstBlock "proportion fan speed"
DstPort 1
}
}
Line {
SrcBlock "proportion fan speed"
SrcPort 1
Points [0, 0; 40, 0]
Branch {
DstBlock "additional loding"
DstPort 1
}
Branch {
DstBlock "Fan Speed rate"
DstPort 1
}
}
Line {
SrcBlock "Temperature Control Chart"
SrcPort 2
Points [580, 0]
DstBlock "Heater Control"
DstPort enable
}
Line {
SrcBlock "Heater Control"
SrcPort 1
DstBlock "Flap Pos"
DstPort 1
}
Line {
SrcBlock "Heater Control"
SrcPort 2
DstBlock "Req Tout"
DstPort 1
}
Line {
SrcBlock "Heater Control"
SrcPort 3
DstBlock "Goto"
DstPort 1
}
Line {
SrcBlock "From"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?