- Timestamp:
- 06/08/09 02:15:30 (16 years ago)
- Location:
- library
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
library/estimator.cpp
r281 r357 48 48 */ 49 49 50 #include <stat/libDS_ui.h> 51 #include <estim/arx_ui.h> 50 #include "stat/libDS.h" 51 #include "estim/arx.h" 52 #include "user_info.h" 53 #include "stat/loggers.h" 52 54 53 55 using namespace bdm; … … 59 61 else { 60 62 cout << "Missing configuration file.\n Usage: \n $> estimator config_file.cfg"; 61 abort();63 //abort(); 62 64 } 63 UIFile F ( fname ); 65 fname = "arx_test.cfg"; 66 UI_File F ( fname ); 64 67 65 logger* L; 66 ArxDS * DS; 67 BM* E; 68 int Ndat; 69 70 try { 71 UIbuild ( F.lookup ( "logger" ),L ); 72 UIbuild ( F.lookup ( "system" ),DS ); 73 F.lookupValue ( "experiment.ndat",Ndat ); 74 UIbuild ( F.lookup ( "estimator" ),E ); 75 } 76 catch UICATCH; 68 logger* L = UI::build<logger>( F, "logger"); 69 ArxDS * DS = UI::build<ArxDS>( F, "system" ); 70 BM* E = UI::build<BM>( F, "estimator" ); 71 int Ndat = F.lookupValue ( "experiment.ndat",Ndat ); 77 72 78 73 DS->log_add ( *L ); -
library/tutorial/arx_mex_test.cfg
r278 r357 11 11 //estimation 12 12 estimator = { 13 type = "ARX est";14 y = {type=" rv"; names=["y"]; };15 rgr = {type=" rv";16 names = ["y","y","y","u"];13 type = "ARX"; 14 y = {type="RV"; names=("y"); }; 15 rgr = {type="RV"; 16 names = ("y","y","y","u"); 17 17 times = [-1, -2, -3, -1]; 18 18 }; -
library/tutorial/arx_test.cfg
r278 r357 1 1 //Data generating system 2 2 system = { 3 type= "ArxDS";4 y = { type="rv"; names=["y", "u"];};5 u = { type="rv"; names=[]; };6 rgr = { type="rv";7 names = ["y","y","y","u"];3 class = "ArxDS"; 4 y = {class="RV"; names=("y", "u");}; 5 u = {class="RV"; names=(); }; 6 rgr = {class="RV"; 7 names = ("y","y","y","u"); 8 8 times = [-1, -2, -3, -1]; 9 9 }; 10 10 //AR parameters 11 theta = [0.8, -0.3, 0.4, 1.0,12 0.0, 0.0, 0.0, 0.0];11 theta = (2,4,[0.8, -0.3, 0.4, 1.0, 12 0.0, 0.0, 0.0, 0.0]); 13 13 // offset 14 14 offset = [0.0, 0.0]; 15 15 //variance 16 r = [0.1, 0.0,17 0.0, 1.0];16 r = (2,2,[0.1, 0.0, 17 0.0, 1.0] ); 18 18 // log also theta 19 19 opt="L_theta"; … … 22 22 //store results 23 23 logger = { 24 type= "dirfilelog";24 class= "dirfilelog"; 25 25 dirname = "exp/arx_ui"; 26 26 maxlen = 1000; // … … 29 29 //estimation 30 30 estimator = { 31 type = "ARXest";32 y = { type="rv"; names=["y"]; };33 rgr = { type="rv";34 names = ["y","y","y","u"];31 class = "ARX"; 32 y = {class="RV"; names=("y"); }; 33 rgr = {class="RV"; 34 names = ("y","y","y","u"); 35 35 times = [-1, -2, -3, -1]; 36 36 };