Changeset 903 for applications/doprava/main_loop.cpp
- Timestamp:
- 04/13/10 21:13:07 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/doprava/main_loop.cpp
r901 r903 25 25 26 26 // SYSTEM TO CONTROL 27 AimsunDS Ds; 28 UI::get(Ds, Cfg, UI::compulsory ); // Mostly hard-coded so far 29 Ds.validate(); 27 shared_ptr<AimsunDS> Ds=UI::build<AimsunDS>(Cfg.lookup("system"),UI::compulsory); 30 28 31 29 // AGENTS … … 42 40 43 41 // REGISTER ACTIVE OBJECTS IN LOGGER 44 Ds .log_register ( *L, "DS" );42 Ds->log_register ( *L, "DS" ); 45 43 for ( int i=0; i<Ags.length(); i++ ) { 46 44 Ags ( i )->log_register ( *L,Ags(i)->_name() ); // estimate 47 Ags ( i )->ds_register( Ds); // allows agents to update their datalinks45 Ags ( i )->ds_register(*Ds); // allows agents to update their datalinks 48 46 } 49 47 L->init(); 50 48 51 vec glob_dt(Ds ._drv()._dsize() );52 vec glob_ut(Ds ._urv()._dsize() );49 vec glob_dt(Ds->_drv()._dsize() ); 50 vec glob_ut(Ds->_urv()._dsize() ); 53 51 54 52 // INITIALISATION OF UT … … 63 61 glob_ut[11] = 20; 64 62 65 for ( int tK=0; tK < Ds .max_length(); tK++ ) {66 Ds .log_write ( ); // write stuff to67 Ds .getdata(glob_dt);63 for ( int tK=0; tK < Ds->max_length(); tK++ ) { 64 Ds->log_write ( ); // write stuff to 65 Ds->getdata(glob_dt); 68 66 69 67 for ( int i=0; i<Ags.length(); i++ ) { … … 95 93 96 94 L->step(); 97 Ds .write(glob_ut);98 Ds .step(); // simulator step95 Ds->write(glob_ut); 96 Ds->step(); // simulator step 99 97 100 98 for ( int i=0; i<Ags.length(); i++ ) {