| 1 | package TestReplaceablePar
|
|---|
| 2 | model M
|
|---|
| 3 | replaceable model RM = TestReplaceablePar.RM1 constrainedby TestReplaceablePar.BM
|
|---|
| 4 | annotation(choicesAllMatching = true);
|
|---|
| 5 | RM rm;
|
|---|
| 6 | end M;
|
|---|
| 7 |
|
|---|
| 8 | model S
|
|---|
| 9 | TestReplaceablePar.M m annotation(
|
|---|
| 10 | Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 11 | end S;
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | partial model BM
|
|---|
| 15 | parameter Real p;
|
|---|
| 16 | end BM;
|
|---|
| 17 |
|
|---|
| 18 | model RM1
|
|---|
| 19 | extends TestReplaceablePar.BM(p = 1);
|
|---|
| 20 | parameter Real q = 2;
|
|---|
| 21 | end RM1;
|
|---|
| 22 |
|
|---|
| 23 | model RM2
|
|---|
| 24 | extends TestReplaceablePar.BM(p = 2);
|
|---|
| 25 | parameter Real r = 4;
|
|---|
| 26 | end RM2;
|
|---|
| 27 |
|
|---|
| 28 | end TestReplaceablePar;
|
|---|