00001 00018 #ifndef SIMULATION_H 00019 #define SIMULATION_H 00020 00021 #include <iostream> 00022 #include <fstream> 00023 #include <errno.h> 00024 #include "NodeList.h" 00025 #include "Node.h" 00026 #include "PluginManager.h" 00027 #include "lib/Matrix.h" 00028 00036 class Simulation { 00037 public: 00038 Simulation(void); 00039 ~Simulation(void); 00040 void setup(int, char**); 00041 void run(void); 00042 void analysis(void);//runs post simulation analysis 00043 00044 private: 00045 void calcModeSetup(void); 00046 void visModeSetup(void); 00047 void inputFileCheck(void); 00048 void simulate(void);//runs the simulation 00049 void load(void);//loads a previous simulation for analysis 00050 void inputGenerator(void);//runs the input conversion utility 00051 void ipause();//pauses (verbose mode) 00052 void print_help();//prints flags 00053 void patterns(void); 00054 string ROOTDIR; 00055 string SIMDIR; 00056 string NODESAVGDIR; 00057 string BITSDIR; 00058 string LOGICDIR; 00059 string EXTSDIR; 00060 string DUMP; 00061 bool noOutFiles; 00062 00063 int n; //number of times to run simulation 00064 ofstream visout, outBits, outInputBits, outAvg, outDosage; 00065 string visualFile; 00066 string ext; 00067 string bitsFileName; 00068 string inputBitsFileName; 00069 string runName; 00070 string in_specsFile; 00071 string in_logicFile; 00072 string in_patternSpecsFile; 00073 string in_patternNodesFile; 00074 string outputFile; 00075 int seedVal; 00076 bool seed; 00077 bool ND2TT; 00078 bool TT2ND; 00079 bool postPatterns; 00080 bool patternAnal; 00081 bool rand_init; 00082 bool rand_logicMut; 00083 bool rand_nodeInputs; 00084 string iTables; 00085 bool analysisMode; 00086 int mutRate_nodes; 00087 int mutRate_logic; 00088 int cycleSize; 00089 string cmd; 00090 string runDir; 00091 string avgFileName; 00092 string iNodeList; 00093 vector< Matrix > cycles; 00094 bool ptime; 00095 int runStart; 00096 int progStart; 00097 bool visMode; 00098 bool noBits; 00099 bool usePlugins; 00100 bool outputAll; 00101 PluginManager pManager; 00102 }; 00103 00104 #endif