Changeset 820
- Timestamp:
- 02/23/10 10:16:46 (15 years ago)
- Location:
- applications/doprava
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/doprava/CMakeLists.txt
r814 r820 16 16 add_subdirectory (aimsun_bdm) 17 17 link_directories (./aimsun_bdm) 18 19 add_library(traffic_agents traffic_agent.cpp traffic_agent.h) 18 20 # executable 19 EXEC(main_loop aimsun_bdm)21 EXEC(main_loop traffic_agents aimsun_bdm) 20 22 -
applications/doprava/Zlicin.cfg
r819 r820 1 agents = {2 { // agent 11 agents = ( 2 { // agent 1 3 3 class = "BaseTrafficAgent"; 4 name = "495"; 5 sg = { 6 { name = "VA"; 7 detectors = { 8 { name = "DVA1"; 9 distance = 10; 10 }, {name = "DVA"; 11 distance = 20; 12 }; 13 }; 14 }, 15 { name = "VB"; 16 detectors = { }; 17 input = {}; 18 output = {}; 19 } 20 }; 21 input = { // remote detectors 4 name = "495"; 5 sg = ( 6 { name = "VA"; 7 detectors = ( 8 { name = "DVA1"; distance = 10;}, 9 {name = "DVA"; distance = 20; } 10 ); 11 }, 12 { name = "VB"; 13 detectors = (); 14 input = {}; 15 output = {}; 16 }); 17 input = ( // remote detectors 22 18 { 23 19 name = "601DVA1"; 24 20 distance = 100; 25 to = {"VC","VD"};21 to = ("VC","VD"); 26 22 }, 27 23 { 28 24 name = "601DVA"; 29 25 distance = 100; 30 to = {"VC","VD"};26 to = ("VC","VD"); 31 27 } 32 };33 output = {//28 ); 29 output = ( // 34 30 { 35 from = "VC";31 from = ("VC"); 36 32 detector ="495DVC"; 37 33 to = "601"; 38 34 } 39 };35 ); 40 36 41 37 offset = 40; //s 42 38 }, 43 { // 39 { //agent 2 44 40 class = "BaseTrafficAgent"; 45 41 name = "601"; 46 sg = {42 sg = ( 47 43 { name = "VA"; 48 detectors = { 49 { name = "DVA1"; 50 distance = 10; 51 }, {name = "DVA"; 52 distance = 20; 53 }; 54 }; 44 detectors = ( 45 { name = "DVA1"; distance = 10; }, 46 {name = "DVA"; distance = 20; } 47 ); 55 48 }, 56 49 { name = "VB"; 57 detectors = { };50 detectors = (); 58 51 } 59 };52 ); 60 53 61 54 offset = 60; //s 62 55 input = (); 56 output = (); 63 57 } 64 };58 ); -
applications/doprava/traffic_agent.cpp
r819 r820 10 10 } 11 11 12 void ARXAgent::from_setting(const libconfig::Setting& set)12 void BaseTrafficAgent::from_setting(const Setting& set) 13 13 { 14 14 bdm::Participant::from_setting(set); 15 15 16 16 UI::get(sg,set,"sg", UI::compulsory); 17 UI::get(requests,set,"output",UI::compulsory); 17 18 } -
applications/doprava/traffic_agent.h
r819 r820 18 18 string name; //! detector name 19 19 int distance; //! distance from stop-line 20 RV rv; 20 21 //! function loading info from Setting 21 22 void from_setting(const Setting &set){ 22 23 UI::get(name,set,"name",UI::compulsory); 23 24 UI::get(distance,set,"distance",UI::compulsory); 25 24 26 } 25 27 }; … … 184 186 sgh(i).ds2data.filldown(glob_dt, sgh(i).det_data); 185 187 } 186 // copy sg_length ... 188 // copy sg_length ... and others... 187 189 } 188 190 void act(vec &glob_ut){ … … 202 204 } 203 205 204 void from_setting(const Setting &set) {};206 void from_setting(const Setting &set); 205 207 }; 206 208 UIREGISTER(BaseTrafficAgent);