Changeset 74 in tmcsimulator for branches/fep_client_cpp/network_factory.cpp


Ignore:
Timestamp:
09/07/2017 07:34:43 PM (9 years ago)
Author:
jtorres
Message:

network_factory.cpp: changed test data, successful green dot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fep_client_cpp/network_factory.cpp

    r73 r74  
    44 
    55// determine if a loop has data based on lane config data 
    6 bool DataAvail(char flag, int num) 
    7 { 
     6bool DataAvail(char flag, int num) { 
    87        int mag, fel; 
    98 
     
    155154// TEST DATA 
    156155// lds_id       line    drop sch lineinfo       system_key      sch_seq glo_seq         count   freeway Dir     ca_pm   lds_name                 
    157 // 1208926      29      4       28      28      1123006080      26480   1357609         13      73      S       23.7    MACARTHUR 1  
     156// 1203103      50      13      13      13      1123005873      24148   1357650         19      55      S       6.88    MACARTHU1  
    158157FEP_LINE_LDS * load_lines(int *size, const char * fName) 
    159158{ 
    160159        FEP_LINE_LDS *lines = (FEP_LINE_LDS *) calloc(sizeof(FEP_LINE_LDS), 1); 
    161160        *size = 1; 
    162         lines[0].lineNum = 29; 
    163         lines[0].lds.push_back(1208926); 
     161        lines[0].lineNum = 50; 
     162        lines[0].lds.push_back(1203103); 
    164163        lines[0].ldsIndex.push_back(0); 
    165164        lines[0].ldsNum = 1; 
    166         lines[0].count = 13; 
    167         lines[0].schedule = 28; 
    168         lines[0].globalSeq = 1357609; 
    169         lines[0].schedleSeq = 26480; 
     165        lines[0].count = 19; 
     166        lines[0].schedule = 13; 
     167        lines[0].globalSeq = 1357650; 
     168        lines[0].schedleSeq = 24148; 
    170169        return lines;    
    171170} 
     
    173172// TEST DATA 
    174173//FWY   Dir     POSTMI  LDS_ID  VDS_ID  LOOP_ID LOC    LANE LOOP_LOC            PARAMICS_NAME  PARAMICS_LANE     
    175 //73    S       23.7    1208926 1210494 1210490 ML      1       ML_1            ?               0 
    176 //73    S       23.7    1208926 1210494 1210492 ML      2       ML_2            ?               0 
    177 //73    S       23.7    1208926 1210494 1210493 ML      3       ML_3            ?               0 
    178 //73    S       23.7    1208926 1210770 1210769 OR      1       RAMP_ON         ?               0 
     174//55    S       6.88    1203103 1203104 1203105 QU      1       QUEUE           55s6.88ora      0 
     175 
     176//55    S       6.88    1203103 1203104 1203106 DM      2       DEMAND          55s6.88ora      0 
     177 
     178//55    S       6.88    1203103 1203104 1203107 PA      3       PASSAGE         55s6.88ora      0 
     179 
     180//55    S       6.88    1203103 1203108 1203109 HV      1       SD_1            ?               0 
     181 
     182//55    S       6.88    1203103 1203110 1203111 ML      1       ML_1            55s6.88ml       4 
     183 
     184//55    S       6.88    1203103 1203110 1203112 ML      2       ML_2            55s6.88ml       3 
     185 
     186//55    S       6.88    1203103 1203110 1203113 ML      3       ML_3            55s6.88ml       2 
     187 
     188//55    S       6.88    1203103 1203110 1203114 ML      4       ML_4            55s6.88ml       1 
    179189LDS_LOOP * load_lds(const char * fName) 
    180190{ 
    181191        /* Read loop meta data */ 
    182192        LDS_LOOP *lds_map = (LDS_LOOP *) calloc(sizeof(LDS_LOOP), 1); 
    183         lds_map[0].lds = 1208926; 
    184         lds_map[0].line_num = 29; 
    185         lds_map[0].drop = 4; 
    186         lds_map[0].num = 4; 
     193        lds_map[0].lds = 1203103; 
     194        lds_map[0].line_num = 50; 
     195        lds_map[0].drop = 13; 
     196        lds_map[0].num = 1; 
    187197 
    188198        // Loop ids 
    189199        long *loopIDs = (long *) calloc(sizeof(long), lds_map[0].num); 
    190         loopIDs[0] = 1210490; 
    191         loopIDs[1] = 1210492; 
    192         loopIDs[2] = 1210493; 
    193         loopIDs[3] = 1210769; 
     200        loopIDs[0] = 1203113; 
    194201        lds_map[0].loopID = loopIDs; 
    195202         
    196203        // Loop locations 
    197         char *one = "ML_1"; 
    198         char *two = "ML_2"; 
    199         char *three = "ML_3"; 
    200         char *four = "RAMP_ON"; 
    201         char **loc = (char **) calloc(sizeof(char *), lds_map[0].num); 
    202         loc[0] = one;  
    203         loc[1] = two; 
    204         loc[2] = three; 
    205         loc[3] = four; 
    206         lds_map[0].loop_loc = loc; 
     204        char *loc = "ML_3"; 
     205        lds_map[0].loop_loc = &loc; 
    207206 
    208207        // Init Loop dataPack 
     
    212211        lds_map[0].pos = 0; 
    213212 
    214         lds_map[0].MlTotVol = 0; 
    215         lds_map[0].OppTotVol = 0; 
     213        lds_map[0].MlTotVol = 150; 
     214        lds_map[0].OppTotVol = 150; 
    216215 
    217216        return lds_map; 
Note: See TracChangeset for help on using the changeset viewer.