Ticket #3340: OMCBug.mo

File OMCBug.mo, 789 bytes (added by fixed-term.Sven.Baetzing@…, 10 years ago)
Line 
1within ;
2package OMCBug
3
4 model Bug
5 Modelica.Blocks.Interfaces.RealInput x
6 annotation (Placement(transformation(extent={{-120,-20},{-80,20}})));
7 initial equation
8 assert(x>0,"x have to be greater 0 at initial");
9 equation
10
11 annotation ();
12 end Bug;
13
14 model BugToplvl
15
16 OMCBug.Bug bug
17 annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
18 Modelica.Blocks.Sources.Ramp ramp(
19 height=-1,
20 duration=0.5,
21 offset=1)
22 annotation (Placement(transformation(extent={{-64,-10},{-44,10}})));
23 equation
24 connect(bug.x, ramp.y)
25 annotation (Line(points={{-10,0},{-26,0},{-43,0}}, color={0,0,127}));
26 annotation ();
27 end BugToplvl;
28 annotation (uses(Modelica(version="3.2.1")));
29end OMCBug;