root/pmsm/sim.cpp @ 278

Revision 278, 0.7 kB (checked in by smidl, 15 years ago)

props

  • Property svn:eol-style set to native
Line 
1/*!
2  \file
3  \brief Simulation of disturbances in PMSM model, PWM and integration disturbances are distinguished
4  \author Vaclav Smidl.
5
6  -----------------------------------
7  BDM++ - C++ library for Bayesian Decision Making under Uncertainty
8
9  Using IT++ for numerical operations
10  -----------------------------------
11*/
12
13#include "pmsm_ui.h"
14#include <stat/loggers_ui.h>
15
16using namespace bdm;
17int main() {
18        UIFile F("sim.txt");
19
20        logger* L; 
21        UIbuild(F.lookup("logger"),L);
22        pmsmDS * DS;
23        UIbuild(F.lookup("system"),DS);
24        int Ndat;
25        F.lookupValue("ndat",Ndat);
26        // SET SIMULATOR
27
28        DS->log_add(*L);
29        L->init();
30       
31        for ( int tK=1;tK<Ndat;tK++ ) {
32                DS->step();
33                DS->logit(*L);
34                L->step();
35        }
36       
37        L->finalize(); 
38       
39        delete L;
40        delete DS;
41        return 0;
42}
Note: See TracBrowser for help on using the browser.