00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __rdManager_h__
00010 #define __rdManager_h__
00011
00012
00013
00014 #include <rdObject.h>
00015 #include "rdSimulationDLL.h"
00016 #include <stdlib.h>
00017 #include <stdio.h>
00018 #include <rdTools.h>
00019 #include <rdModel.h>
00020 #include <rdControlSet.h>
00021 #include <rdIntegRKF.h>
00022
00023
00024
00025
00029 class RDSIMULATION_API rdManager
00030 {
00031
00032
00033
00034
00035 private:
00037 char _sessionName[rdObject_NAME_LENGTH];
00039 rdModel *_model;
00041 int _ny;
00043 double *_y;
00045 int _nyp;
00047 double *_yp;
00049 rdControlSet *_controlSet;
00052 rdControlSet *_defaultControlSet;
00054 rdIntegRKF *_integ;
00056 double _ti;
00058 double _tf;
00060 double _firstDT;
00061
00062
00063
00064
00065 public:
00066 virtual ~rdManager();
00067 rdManager(rdModel *model,rdControlSet *aControlSet=NULL);
00068 private:
00069 void setNull();
00070 bool constructStates();
00071 bool constructIntegrator();
00072 bool constructStorage();
00073
00074
00075
00076
00077 public:
00078 void setSessionName(const char *name);
00079 const char* getSessionName() const;
00080 rdModel* getModel() const;
00081 rdControlSet* setControlSet(rdControlSet *aControlSet);
00082 rdControlSet* getControlSet() const;
00083 rdIntegRKF* getIntegrator() const;
00084 void setInitialTime(double aTI);
00085 double getInitialTime() const;
00086 void setFinalTime(double aTF);
00087 double getFinalTime() const;
00088 void setFirstDT(double aDT);
00089 double getFirstDT() const;
00090
00091
00092
00093
00094 bool initializeStates();
00095 bool initializeStates(double *aY,double *aYP=NULL);
00096 bool integrate();
00097 bool integrate(int startIndex);
00098 bool integrate(double startTime);
00099
00100
00101
00102
00103 rdControlSet* constructControlSet();
00104
00105
00106
00107
00108
00109
00110
00111 };
00112
00113
00114
00115 #endif // __rdManager_h__
00116