Ticket #5033: TestOuter.mo

File TestOuter.mo, 594 bytes (added by Francesco Casella, 6 years ago)
Line 
1package TestOuter
2
3partial model PartialFluid
4 constant Real c = 1;
5 partial function fBase
6 input Real u;
7 output Real y;
8 end fBase;
9end PartialFluid;
10
11model MyFluid
12 extends PartialFluid;
13 function f
14 extends fBase;
15 algorithm
16 y := 3*u;
17 end f;
18end MyFluid;
19
20model System
21 replaceable model FluidModel = MyFluid constrainedby PartialFluid;
22 FluidModel fluid;
23end System;
24
25model Component
26 outer System system;
27 Real a = system.fluid.f(3);
28end Component;
29
30model Model
31 Component c;
32 inner System system;
33end Model;
34
35end TestOuter;