Changeset 14054
 Timestamp:
 Nov 14, 2019 9:22:48 AM (3 weeks ago)
 Location:
 branches/devjk2612/Compiler/ModelicaMiddleEnd
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

branches/devjk2612/Compiler/ModelicaMiddleEnd/src/jastadd/structural/BLT.jrag
r13357 r14054 3754 3754 Collection<FVariable> allVariables = allVariables(); 3755 3755 Set<FVariable> memberVariables = new HashSet<FVariable>(allVariables); 3756 for (FVariable var : allVariables) {3756 for (FVariable var : unsolvedVariables()) { 3757 3757 FExp startExpression = var.startAttributeExp(); 3758 3758 if (startExpression == null) { 
branches/devjk2612/Compiler/ModelicaMiddleEnd/test/modelica/BlockCompositionTests.mo
r12934 r14054 181 181 end StartValueDependency2; 182 182 183 model StartValueDependency3 184 parameter Real p1(fixed=false); 185 parameter Real p2(fixed=false); 186 Real x(start = p1); 187 Real y(start = p2); 188 initial equation 189 p1 = y + 1; 190 p2 = y + time; 191 equation 192 x * y = 10; 193 x = y + time; 194 annotation(__JModelica(UnitTesting(tests={ 195 ErrorTestCase( 196 name="InitialParameters_StartValueDependency3", 197 description="Test error given when start value of a variable depends on initial parameter which is computed in same block", 198 errorMessage=" 199 Error in flattened model, START_VALUE_DEPEND_ON_BLOCK_ERROR: 200 The start value ('p2') for variable y depends on variables which are computed in the same block, this is not allowed! 201 Block which produced the error: 202  Torn system (Block 1) of 1 iteration variables and 3 solved variables  203 Torn variables: 204 p2 205 x 206 p1 207 208 Iteration variables: 209 y (start=p2) 210 211 Torn equations: 212 p2 := y + time 213 x := y + time 214 p1 := y + 1 215 216 Residual equations: 217 x * y = 10 218 Iteration variables: y 219 ")}))); 220 end StartValueDependency3; 221 183 222 end InitialParameters; 184 223 end BlockCompositionTests;
Note: See TracChangeset
for help on using the changeset viewer.