Line | |
---|
1 | /* |
---|
2 | Copyright (C) 2019 Modelon AB |
---|
3 | |
---|
4 | This program is free software: you can redistribute it and/or modify |
---|
5 | it under the terms of the GNU General Public License as published by |
---|
6 | the Free Software Foundation, version 3 of the License. |
---|
7 | |
---|
8 | This program is distributed in the hope that it will be useful, |
---|
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | GNU General Public License for more details. |
---|
12 | |
---|
13 | You should have received a copy of the GNU General Public License |
---|
14 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
15 | */ |
---|
16 | |
---|
17 | within ; |
---|
18 | package EquationSolvingTests |
---|
19 | |
---|
20 | model ParametricNominal1 |
---|
21 | function f |
---|
22 | output Real y = 1; |
---|
23 | algorithm |
---|
24 | assert(false, ""); |
---|
25 | end f; |
---|
26 | |
---|
27 | parameter Real p = f(); |
---|
28 | Real x; |
---|
29 | Real y(nominal=p); |
---|
30 | equation |
---|
31 | x*y=1; |
---|
32 | x*2 + y*3 = 0; |
---|
33 | annotation(__JModelica(UnitTesting(tests={ |
---|
34 | FClassMethodTestCase( |
---|
35 | name="ParametricNominal1", |
---|
36 | description="", |
---|
37 | methodName="printDAEBLT", |
---|
38 | methodResult=" |
---|
39 | --- Torn system (Block 1) of 1 iteration variables and 1 solved variables --- |
---|
40 | Torn variables: |
---|
41 | y |
---|
42 | |
---|
43 | Iteration variables: |
---|
44 | x () |
---|
45 | |
---|
46 | Torn equations: |
---|
47 | y := (- x * 2) / 3 |
---|
48 | |
---|
49 | Residual equations: |
---|
50 | x * y = 1 |
---|
51 | Iteration variables: x |
---|
52 | ------------------------------- |
---|
53 | ")}))); |
---|
54 | end ParametricNominal1; |
---|
55 | |
---|
56 | end EquationSolvingTests; |
---|
Note: See
TracBrowser
for help on using the repository browser.