Changes between Version 1 and Version 2 of Ticket #5886, comment 4


Ignore:
Timestamp:
2020-03-13T09:09:47Z (5 years ago)
Author:
Mahder Alemseged Gebremedhin

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5886, comment 4

    v1 v2  
    2727As you can see, the second equation in model {{{Component}}} tries to access  {{{T[1,2]}}} regardless of the value of {{{cols}}}.
    2828
    29 This is where the problem is. If {{{z}}} is {{{1}}} then cols is set to {{{1}}} which means {{{T}}} is a {{{[4,1]}}} array. Trying to access {{{[1,2]}}} will should normally cause out of range access error.
     29This is where the problem is. If {{{z}}} is {{{1}}} then cols is set to {{{1}}} which means {{{T}}} is a {{{[4,1]}}} array. Trying to access {{{[1,2]}}} should normally cause out of range access error.
    3030
    3131The way our simulation code operates right now, if it fails to find a variable in the '''list of simcode''' variables, in this case components[1].T[1,2] for example, it will  assume it is a ''temporary variable and tries to generate function like code for it''. You don't have to worry about the details normally. Until you run in to this kinds of odd errors.