Changeset 871

Show
Ignore:
Timestamp:
03/19/10 11:23:05 (14 years ago)
Author:
mido
Message:

adaptation of /applications to new version of LOG_LEVEL
also, a cosmetic change made in enumerations: logub -> logubound, loglb -> loglbound

Files:
30 modified

Legend:

Unmodified
Added
Removed
  • applications/bdmtoolbox/sandbox/mpf_arx.m

    r791 r871  
    2828A1.rgr = x ;  
    2929A1.constant = 0; 
    30 A1.options ='logbounds,logll'; 
     30A1.log_level ='logbounds,logevidence'; 
    3131A1.frg = 0.98; 
    3232A1.name = 'A1'; 
     
    4141E.prior.mu    = [0 0];             %  
    4242E.prior.R     = 10*eye(2);         %  
    43 E.options ='logbounds,logll'; 
     43E.log_level ='logbounds,logevidence'; 
    4444E.name = 'MPF'; 
    4545 
  • applications/bdmtoolbox/tutorial/estimation/arx_test.m

    r706 r871  
    3434A1.rv = y; 
    3535A1.rgr = rgr; 
    36 A1.options ='logbounds,logll'; 
     36A1.log_level ='logbounds,logevidence'; 
    3737 
    3838estimators = { A1}; 
  • applications/bdmtoolbox/tutorial/mpdm/dist_ctrl_acc.m

    r787 r871  
    2424A1.rv = RVjoin([y1,y2]); 
    2525A1.rgr = RVtimes([y1,y2,u1,u1],[-1, -1, 0, -1]) ; % correct structure is {y,y} 
    26 A1.options ='logbounds,logll'; 
     26A1.log_level ='logbounds,logevidence'; 
    2727A1.frg = 0.99; 
    2828 
  • applications/bdmtoolbox/tutorial/mpdm/dist_ctrl_example.m

    r787 r871  
    1919A1.rv = y; 
    2020A1.rgr = RVtimes([y,u1],[-3,0]) ; % correct structure is {y,y} 
    21 A1.options ='logbounds,logll'; 
     21A1.log_level ='logbounds,logevidence'; 
    2222A1.frg = 0.95; 
    2323 
  • applications/bdmtoolbox/tutorial/mpdm/dist_estim_example.m

    r761 r871  
    3434A1.rv = y; 
    3535A1.rgr = RVtimes([z,z],[0,-1]) ; % correct structure is {y,y} 
    36 A1.options ='logfull,logll'; 
     36A1.log_level ='logfull,logevidence'; 
    3737A1.rv_param = RV({'a','b','c','r'}); 
    3838A1.frg = 0.95; 
  • applications/bdmtoolbox/tutorial/userguide/arx_basic_example.m

    r863 r871  
    1111A1.rv = y; 
    1212A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y} 
    13 A1.log_level ={'bounds','likelihood,'}; 
     13A1.log_level = 'logbounds,logevidence'; 
    1414 
    1515M=estimator(DS,{A1}); 
  • applications/bdmtoolbox/tutorial/userguide/arx_ctrl_example.m

    r745 r871  
    1919A1.rv = y; 
    2020A1.rgr = RVtimes([y,u1,u2],[-3,0,0]) ; % correct structure is {y,y} 
    21 A1.options ='logbounds,logll'; 
     21A1.log_level ='logbounds,logevidence'; 
    2222 
    2323C1.class = 'LQG_ARX'; 
  • applications/bdmtoolbox/tutorial/userguide/arx_selection_example.m

    r756 r871  
    1111A1.rv = y; 
    1212A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y} 
    13 A1.options ='logbounds,logll'; 
     13A1.log_level ='logbounds,logevidence'; 
    1414 
    1515A2=A1; 
  • applications/bdmtoolbox/tutorial/userguide/arx_windsurfer_example.m

    r724 r871  
    1818A1.rv = y; 
    1919A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y} 
    20 A1.options ='logbounds,logll'; 
     20A1.log_level ='logbounds,logevidence'; 
    2121 
    2222C1.class = 'LQG_ARX'; 
  • applications/bdmtoolbox/tutorial/userguide/dist_ctrl_example.m

    r764 r871  
    1919A1.rv = y; 
    2020A1.rgr = RVtimes([y,u1],[-3,0]) ; % correct structure is {y,y} 
    21 A1.options ='logbounds,logll'; 
     21A1.log_level ='logbounds,logevidence'; 
    2222A1.frg = 0.95; 
    2323 
  • applications/bdmtoolbox/tutorial/userguide/dist_estim_example.m

    r758 r871  
    2727A1.rv = y; 
    2828A1.rgr = RVtimes([y,u1],[-3,0]) ; % correct structure is {y,y} 
    29 A1.options ='logbounds,logll'; 
     29A1.options ='logbounds,logevidence'; 
    3030A1.frg = 0.95; 
    3131A1.constant = 0; 
  • applications/bdmtoolbox/tutorial/userguide/frg_estim.m

    r745 r871  
    1111A1.rv = y; 
    1212A1.rgr = RVtimes([y,u],[-3,-1]) ;  
    13 A1.options ='logbounds,logll'; 
     13A1.log_level ='logbounds,logevidence'; 
    1414A1.frg = 0.9; 
    1515A1.name = 'A1'; 
     
    2929E.prior.class = 'eDirich';         % prior on non-linear part 
    3030E.prior.beta  = [2 1]; %  
    31 E.options ='logbounds,logll'; 
     31E.log_level ='logbounds,logevidence'; 
    3232E.name = 'MPF'; 
    3333 
  • applications/pmsm/Barcelona/MM.cfg

    r342 r871  
    2626         //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    2727         rv = {type="rv"; names=["EKF"]; sizes=[4];}; 
    28          options="logll"; 
     28         log_level="logevidence"; 
    2929         }; 
    3030E2= {type="EKF"; 
     
    4141         //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    4242         rv = {type="rv"; names=["EKFw"]; sizes=[4];}; 
    43          options="logll"; 
     43         log_level="logevidence"; 
    4444         }; 
    4545          
     
    5151                {type="internal";path="E1";}, 
    5252                {type="internal";path="E2";}); 
    53                 options="logll"; 
     53                log_level="logevidence"; 
    5454        }); 
    5555         
  • applications/pmsm/Barcelona/Mz.cfg

    r365 r871  
    1111        profileW = [0, 1, 5, 10, 10, 3, 0, 0, -3, -3, -10, -10, -4, 0, 0]; 
    1212        profileM = [0, 10, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0]; 
    13         options = "modelu"; 
     13        log_level = "logvoltage"; 
    1414}; 
    1515 
     
    3232         //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 
    3333         rv = {class="RV"; names=("EKFMz"); sizes=[5];}; 
    34          options="logll,logbounds"; 
     34         log_level="logevidence,logbounds"; 
    3535         }, 
    3636                                 // 
     
    4747         //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 
    4848         rv = {class="RV"; names=("EKF"); sizes=[4];}; 
    49          options="logll,logbounds"; 
     49         log_level="logevidence,logbounds"; 
    5050         }, 
    5151                                                                 // 
     
    6262         //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 
    6363         rv = {class="RV"; names=("EKFw"); sizes=[4];}; 
    64          options="logll,logbounds"; 
     64         log_level="logevidence,logbounds"; 
    6565         }, 
    6666 
     
    7878         //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 
    7979         rv = {class="RV"; names=("CRB"); sizes=[5];}; 
    80          options="logll,logbounds"; 
     80         log_level="logevidence,logbounds"; 
    8181         } 
    8282 
  • applications/pmsm/Barcelona/Mz.m

    r706 r871  
    3030    'drv', Orv,... 
    3131    'rv', struct('type','rv', 'names', {{'EKFMz'}},'sizes',[5]),... 
    32          'options','logll,logbounds')}; 
     32         'log_level','logevidence,logbounds')}; 
    3333         
    3434%S.logger= struct(      'type','mexlog','maxlen',32000); 
  • applications/pmsm/Barcelona/Mz_mx.cfg

    r352 r871  
    1111        profileW = [0, 3, 10, 10, 3, 0, 0, -3, -3, -3, -10, -10, -4, 0, 0]; 
    1212        profileM = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 
    13 //      options = "modelu"; 
     13//      log_level = "logvoltage"; 
    1414}; 
    1515 
     
    2828         //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    2929         rv = {type="rv"; names=["EKFMz"]; sizes=[5];}; 
    30          options="logll,logbounds"; 
     30         log_level="logevidence,logbounds"; 
    3131         }, 
    3232                                 // 
     
    4545         //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    4646         rv = {type="rv"; names=["CRB"]; sizes=[5];}; 
    47          options="logll,logbounds"; 
     47         log_level="logevidence,logbounds"; 
    4848         }, 
    4949 
     
    6161         //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    6262         rv = {type="rv"; names=["CRB2"]; sizes=[4];}; 
    63          options="logll,logbounds"; 
     63         log_level="logevidence,logbounds"; 
    6464         } 
    6565 
  • applications/pmsm/Barcelona/pwm.cfg

    r338 r871  
    2727        //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    2828        rv = {type="rv"; names=["EKF"]; sizes=[4];}; 
    29         options="logbounds"; 
     29        log_level="logbounds"; 
    3030        }, 
    3131                /////////// 
  • applications/pmsm/Barcelona/pwm_mx.cfg

    r349 r871  
    1111        profileW = [1, 5, 10, 100, 3, 3, 0, 0]; 
    1212        //profileM = [0, 0, 10,  10, 10, 0, 10, 0]; 
    13         options = "modelu"; 
     13        log_level = "logvoltage"; 
    1414}; 
    1515 
  • applications/pmsm/Barcelona/real.cfg

    r349 r871  
    2828         //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    2929         rv = {type="rv"; names=["EKFMz"]; sizes=[5];}; 
    30          options="logll,logbounds"; 
     30         log_level="logevidence,logbounds"; 
    3131         } 
    3232); 
  • applications/pmsm/Barcelona/real_mx.cfg

    r349 r871  
    2626         drv = {type="rv"; names=["o_ia","o_ib","o_ua","o_ub"];};  // observed u 
    2727         rv = {type="rv"; names=["EKFMz"]; sizes=[5];}; 
    28          options="logll,logbounds"; 
     28         log_level="logevidence,logbounds"; 
    2929         }, 
    3030         {type="EKF"; 
     
    4141         drv = {type="rv"; names=["o_ia","o_ib","o_ua","o_ub"];};  // observed u 
    4242         rv = {type="rv"; names=["EKF"]; sizes=[4];}; 
    43          options="logll,logbounds"; 
     43         log_level="logevidence,logbounds"; 
    4444         } 
    4545); 
  • applications/pmsm/TR2245/pmsm_wishart.cpp

    r706 r871  
    8383        dirfilelog *L = UI::build<dirfilelog> ( F, "logger" );// ( "exp/mpf_test",100 ); 
    8484         
    85         KFE.set_options ( "logbounds" ); 
     85        KFE.log_level[logbounds] = true; 
    8686        KFE.log_add ( *L,"KF" ); 
    87         M.set_options ( "logbounds" ); 
     87        M.log_level[logbounds] = true; 
    8888        M.log_add ( *L,"M" ); 
    8989        DS->log_add(*L); 
  • applications/pmsm/TR2245/unitsteps.cpp

    r744 r871  
    8787        int l_Q= L->add_vector ( rQ, "" ); 
    8888 
    89         KFE.set_options ( "logbounds" ); 
     89        KFE.log_level[ logbounds] = true; 
    9090        KFE.log_register ( *L,"KF" ); 
    91         M.set_options ( "logbounds" ); 
     91        M.log_level[logbounds] = true; 
    9292        M.log_register ( *L,"M" ); 
    9393        L->init(); 
  • applications/pmsm/TR2245/wishart.cpp

    r706 r871  
    8383        int l_fullQ= L->add ( rQ, "full" ); 
    8484 
    85         KFE.set_options ( "logbounds" ); 
     85        KFE.log_level[logbounds] = true; 
    8686        KFE.log_add ( *L,"KF" ); 
    87         M.set_options ( "logbounds" ); 
     87        M.log_level[logbounds]= true; 
    8888        M.log_add ( *L,"M" ); 
    8989        L->init(); 
  • applications/pmsm/cfg/mpf_test.cfg

    r661 r871  
    1616        drv = {class="RV"; names=("o_ia","o_ib","o_ua","o_ub");}; 
    1717        rv = {class="RV"; names=("e_ia","e_ib","e_om","e_th");}; 
    18         options = "logbounds"; 
     18        log_level = "logbounds"; 
    1919        n=20; 
    2020        } 
  • applications/pmsm/cfg/sim.cfg

    r676 r871  
    2525                //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 
    2626                rv = {class="RV"; names=("EKF"); sizes=[4];}; 
    27                 options = "logbounds"; 
     27                log_level = "logbounds"; 
    2828         }                                        
    2929); 
  • applications/pmsm/cfg/uni_test.cfg

    r686 r871  
    3535        rvc = {class="RV"; names=("o_ua","o_ub");}; 
    3636        rv = {class="RV"; names=("e_ia","e_ib","e_om","e_th");}; 
    37         options = "logbounds"; 
     37        log_level = "logbounds"; 
    3838        n=1000; 
    3939        } 
  • applications/pmsm/filters.h

    r767 r871  
    137137                this->set_BM ( *kal ); 
    138138 
    139                 string opt; 
    140                 if ( UI::get ( opt,set,"options",UI::optional ) ) { 
    141                         set_options ( opt ); 
    142                 } 
    143  
    144                 validate(); 
     139                UI::get ( log_level,set,UI::optional ); 
    145140        } 
    146141        void bayes ( const vec &yt, const vec &cond ) { 
  • applications/pmsm/pmsmDS.h

    r744 r871  
    2121class pmsmDS : public DS 
    2222{ 
     23        LOG_LEVEL(pmsmDS,logvoltage); 
    2324 
    2425protected: 
     
    3233    double dt_prof; 
    3334    //! Number of miliseconds per discrete time step 
    34     int Dt; 
    35     //! options for logging, - log predictions of 'true' voltage 
    36     bool opt_modu; 
    37     //! options for logging, - 
     35    int Dt;     
    3836public: 
    3937    //! Constructor with fixed sampling period 
     
    4947        pmsmsim_set_parameters ( Rs0, Ls0, Fmag0, Bf0, p0, kp0, J0, Uc0, DT0, dt0 ); 
    5048    } 
    51     //! parse options: "modelu" => opt_modu=true; 
    52     void set_options ( string &opt ) 
    53     { 
    54         opt_modu = ( opt.find ( "modelu" ) !=string::npos ); 
    55     } 
    56     void getdata ( vec &dt ) const 
     49 
     50        void getdata ( vec &dt ) const 
    5751    { 
    5852        dt.set_subvector(0,vec ( KalmanObs,6 )); 
     
    123117        L_iu = L.add_vector ( ru, "t" ); 
    124118        // log differences 
    125         if ( opt_modu ) 
     119        if ( log_level[logvoltage] ) 
    126120        { 
    127121            L_optu = L.add_vector ( ru, "model" ); 
     
    135129        L.log_vector ( L_ou, vec_2 ( KalmanObs[0],KalmanObs[1] ) ); 
    136130        L.log_vector ( L_iu, vec_2 ( KalmanObs[4],KalmanObs[5] ) ); 
    137         if ( opt_modu ) 
     131        if ( log_level[logvoltage] ) 
    138132        { 
    139133            double sq3=sqrt ( 3.0 ); 
     
    181175 
    182176        string opts; 
    183         if ( root.lookupValue( "options", opts ) ) 
     177        if ( root.lookupValue( "log_level", opts ) ) 
    184178            set_options(opts); 
    185179    } 
  • library/bdm/base/bdmbase.cpp

    r870 r871  
    470470                        logrec->ids ( 0 ) = logrec->L.add_vector ( r, prefix + logrec->L.prefix_sep() + "mean" ); 
    471471                } 
    472                 if ( log_level[loglb]  ) { 
     472                if ( log_level[loglbound]  ) { 
    473473                        logrec->ids ( 1 ) = logrec->L.add_vector ( r, prefix + logrec->L.prefix_sep() + "lb" ); 
    474474                }        
    475                 if ( log_level[logub]  ) { 
     475                if ( log_level[logubound]  ) { 
    476476                        logrec->ids ( 2 ) = logrec->L.add_vector ( r, prefix + logrec->L.prefix_sep() + "ub" ); 
    477477                } 
     
    487487                        logrec->L.log_vector ( logrec->ids ( 0 ), mean() ); 
    488488                } 
    489                 if ( log_level[loglb] || log_level[logub] ) { 
     489                if ( log_level[loglbound] || log_level[logubound] ) { 
    490490                                vec lb; 
    491491                                vec ub; 
    492492                                qbounds ( lb, ub ); 
    493                                 if (log_level[loglb]) 
     493                                if (log_level[loglbound]) 
    494494                                        logrec->L.log_vector ( logrec->ids ( 1 ), lb ); 
    495                                 if (log_level[logub]) 
     495                                if (log_level[logubound]) 
    496496                                        logrec->L.log_vector ( logrec->ids ( 2 ), ub ); 
    497497                        } 
     
    564564         
    565565        if (log_level[logbounds]){ 
    566                 prior().log_level[epdf::loglb]=true; 
    567                 prior().log_level[epdf::logub]=true; 
     566                prior().log_level[epdf::loglbound]=true; 
     567                prior().log_level[epdf::logubound]=true; 
    568568        } 
    569569        if (log_level[logfull]){ 
  • library/bdm/base/bdmbase.h

    r870 r871  
    495495        //! TODO DOPLNIT         
    496496         
    497         //! \var log_level_enums loglb 
     497        //! \var log_level_enums loglbound 
    498498        //! TODO DOPLNIT 
    499499         
    500         //! \var log_level_enums logub 
     500        //! \var log_level_enums logubound 
    501501        //! TODO DOPLNIT 
    502502         
    503503        //! \var log_level_enums logfull 
    504504        //! TODO DOPLNIT 
    505         LOG_LEVEL(epdf,logmean,loglb,logub,logfull); 
     505        LOG_LEVEL(epdf,logmean,loglbound,logubound,logfull); 
    506506 
    507507public: 
     
    11711171                } else { 
    11721172                        if ( log_level[logbounds] ) { 
    1173                                 const_cast<epdf&> ( posterior() ).log_level[epdf::loglb] = true; 
     1173                                const_cast<epdf&> ( posterior() ).log_level[epdf::loglbound] = true; 
    11741174                        } else { 
    11751175                                const_cast<epdf&> ( posterior() ).log_level[epdf::logmean] = true;;