Changeset 1123

Show
Ignore:
Timestamp:
06/30/10 14:00:13 (14 years ago)
Author:
prikryl
Message:

Provide queues by lanes rather than by signal groups.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/doprava/aimsun_bdm/aimsun_ds.cpp

    r1089 r1123  
    4545        16,     17,     18,     19,     20,     14,     15,             // 495_QE 
    4646        16,     17,     18,     19,     20,     12,     13,             // 495_QF 
    47         21,     22,     23,     24,     25,     40,     21,     22,     23,     24,     25,     40,                     // 601_QA 
    48         43,     44, 43, 44,     42,                             // 601_QB (bus terminal) 
     47        21,     22,     23,     24,     25,     40,         // 601_QA1 (inner lane) 
     48        21,     22,     23,     24,     25,     40,                     // 601_QA2 (outer lane) 
     49        43,     44,                                                     // 601_QB1 (bus terminal, inner) 
     50        43,     44,     42,                                             // 601_QB2 (bus terminal, outer) 
    4951        45,     49,     50,                                             // 601_QC 
    5052        45,     49,     51,                                             // 601_QD 
     
    6062        2,      2,      2,      2,      2,      1,      1,              // 495_QE 
    6163        1,      1,      1,      1,      1,      1,      1,              // 495_QF 
    62         2,      2,      2,      2,      2,      2,      1,      1,      1,      1,      1,      1,                      // 601_QA 
    63         2,      2,      1,      1,      1,                              // 601_QB (bus terminal)  
     64        2,      2,      2,      2,      2,      2,                      // 601_QA1 (inner lane) 
     65        1,      1,      1,      1,      1,      1,                      // 601_QA2 (outer lane) 
     66        2,      2,                                                      // 601_QB1 (bus terminal, inner)  
     67        1,      1,      1,                                              // 601_QB2 (bus terminal, outer)  
    6468        1,      1,      1,                                              // 601_QC 
    6569        2,      2,      1,                                              // 601_QD 
     
    7478int LaneQueueOffsets[] = { 
    7579        0, 5, 8, 13, 20, 27, 
    76         34, 46, 51, 54, 57, 62, NumLaneQueuesSectIds }; 
     80        34, 40, 46, 48, 51, 54, 57, 62, NumLaneQueuesSectIds }; 
    7781 
    7882/* The position of the statistics is given by the indices in the StatIds 
     
    8993const int SignalPlanOffsets[]  = {  0, 42 }; 
    9094const int QueueLengthOffsets[] = {  6, 48 }; 
    91 const int MeasurementOffsets[] = { 12, 54 }; 
     95const int MeasurementOffsets[] = { 12, 56 }; 
    9296 
    9397AimsunDS::AimsunDS () : DS() 
     
    100104    "495_S1  495_S2   495_S3   495_S4   495_S5   495_S5a " 
    101105    "601_VA  601_VB   601_VC   601_VD   601_VE   601_SE " 
    102     "601_QA  601_QB   601_QC   601_QD   601_QE   601_QSE " 
     106    "601_QA1 601_QA2  601_QB1  601_QB2  601_QC   601_QD   601_QE   601_QSE " 
    103107        "601_DVA 601_DVAa 601_DVB  601_DVBa 601_DVB1 601_DVC  601_DVD  601_DVD1 601_DSE 601_DVE 601_DSE1 601_DVE1 " 
    104108    "601_S6  601_S6a  601_S7   601_S8   601_S9   601_S9a " 
     
    109113        "    2,      2,      2,      2,      2,       2," 
    110114        "    1,      1,      1,      1,      1,       1,      " 
    111         "    1,      1,      1,      1,      1,       1,      " 
     115        "    1,      1,      1,      1,      1,       1,      1,          1," 
    112116        "    2,      2,      2,      2,      2,       2,       2,       2,       2,       2,       2,       2," 
    113117        "    2,      2,      2,      2,      2,       2" 
     
    519523                                        dat_ptr->dt_intensity[k], dat_ptr->dt_occupancy[k] ); 
    520524                        } 
    521                         printf ( "\n\n" ); 
    522                 } 
    523         } 
     525                        printf ( "\n" ); 
     526                } 
     527        } 
     528        printf ( "\n\tQueues:\n" ); 
    524529 
    525530        /* Loop over the statistical data. We will extract the queue length for 
     
    533538                int nLanes  = NumLanes[i]; 
    534539                int qoffset = QueueLengthOffsets[i]; 
     540                printf ( "\r[%d]", i ); 
    535541                for ( int j = 0 ; j < nLanes ; j++ ) 
    536542                { 
     
    555561                        /* Update the data vector. */ 
    556562                        dt[qoffset+j] = qLen; 
    557                 } 
     563                        /* Print the queue length. */ 
     564                        printf ( " %d", qLen ); 
     565                } 
     566                printf ( "\n" ); 
    558567                oLanes = oLanes + nLanes; 
    559568        } 
    560569 
    561         printf ( "\tAimsunDS::getdata() finished\n" ); 
     570        printf ( "\n\tAimsunDS::getdata() finished\n" ); 
    562571        cout << dt ; 
    563572}