More types and units
This commit is contained in:
21
BEdit/m_Test.mo
Normal file
21
BEdit/m_Test.mo
Normal file
@@ -0,0 +1,21 @@
|
||||
model m_Test
|
||||
model m_Constant0
|
||||
output Real y(quantity="Length", unit="m");
|
||||
parameter Real v = 2;
|
||||
equation
|
||||
y = v;
|
||||
end m_Constant0;
|
||||
model m_Gain0
|
||||
input Real u;
|
||||
output Real y;
|
||||
parameter Real k(quantity="Current", unit="A") = 2.5;
|
||||
equation
|
||||
y = k*u;
|
||||
end m_Gain0;
|
||||
m_Constant0 Constant0;
|
||||
m_Gain0 Gain0;
|
||||
equation
|
||||
Gain0.u = Constant0.y;
|
||||
annotation(
|
||||
experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 0.002));
|
||||
end m_Test;
|
||||
Reference in New Issue
Block a user