Changes between Initial Version and Version 1 of Ticket #1675
- Timestamp:
- 2015-03-06T10:27:05Z (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1675
- Property Component → Backend
-
Ticket #1675 – Description
initial v1 1 1 the parameter passing for records does not work: if you have a model which contains records or an array of records as parameters and you want to set them to other values while creating an instance in another model, the new values are not passed! 2 2 3 {{{package testOM 3 {{{ 4 package testOM 4 5 5 6 record GenericData 6 7 7 parameter Integer dataOne = 1; 8 8 parameter Integer dataTwo = 1; 9 10 9 end GenericData; 11 10 … … 14 13 15 14 model HasRecordAsParameter 16 17 15 parameter GenericData data; 18 16 Integer variable; 19 20 17 equation 21 22 18 variable = data.dataOne; 23 24 19 end HasRecordAsParameter; 25 20 … … 27 22 28 23 model PassesRecordAsParameter 29 30 24 parameter DataSetOne data; 31 25 HasRecordAsParameter parameterReceiver(data = data); 32 26 Integer variable; 33 34 27 equation 35 36 28 variable = parameterReceiver.variable; 37 38 29 end PassesRecordAsParameter; 39 30 40 31 41 42 32 model PassesRecordArrayAsParameter 43 44 33 parameter DataSetOne data1; 45 34 parameter DataSetTwo data2; … … 47 36 HasRecordAsParameter parameterReceiver[2](data = data); 48 37 Integer variable; 49 50 38 equation 51 52 39 variable = parameterReceiver[1].variable; 53 54 40 end PassesRecordArrayAsParameter; 55 41 56 end testOM;}}} 42 end testOM; 43 }}} 57 44 58 45 in the cases above, the "variable" value after simulating is always "1" , although it should be "5".