Ignore:
Timestamp:
2012-11-18T20:19:47+01:00 (11 years ago)
Author:
jfrenkel
Message:
  • bugfix for alias a = time
  • bugfix for msvc compile
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SimulationRuntime/c/simulation/results/simulation_result_mat.cpp

    r13652 r13950  
    381381  size_t ccol = 0; /* current column - index offset */
    382382  size_t indx = 1;
     383  size_t aliascol = 0;
    383384  INTMAP::iterator it;
    384385  /* assign rows & cols */
     
    425426        dataInfo[ccol] = table;
    426427        /* row 2 - index of var in table (variable 'Time' have index 1) */
     428        aliascol = table==2?1:it->second+1;
    427429        if (mdl_data->realAlias[i].negate)
    428           dataInfo[ccol+1] = -(it->second+1);
     430          dataInfo[ccol+1] = -aliascol;
    429431        else
    430           dataInfo[ccol+1] = it->second+1;
     432          dataInfo[ccol+1] = aliascol;
    431433        /* row 3 - linear interpolation == 0 */
    432434        dataInfo[ccol+2] = 0;
     
    457459        /* row 1 - which table */
    458460        dataInfo[ccol] = table;
    459         /* row 2 - index of var in table (variable 'Time' have index 1) */
     461        /* row 2 - index of var in table */
    460462        if (mdl_data->integerAlias[i].negate)
    461463          dataInfo[ccol+1] = -(it->second+1);
     
    496498        /* row 1 - which table */
    497499        dataInfo[ccol] = table;
    498         /* row 2 - index of var in table (variable 'Time' have index 1) */
     500        /* row 2 - index of var in table */
    499501        if (mdl_data->booleanAlias[i].negate)
    500502        {
Note: See TracChangeset for help on using the changeset viewer.