MultiAgentDecisionProcess  Release 0.2.1
Simulation.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _SIMULATION_H_
30 #define _SIMULATION_H_ 1
31 
32 /* the include directives */
33 #include <iostream>
34 #include "Globals.h"
35 #include <limits.h>
36 #include <stdlib.h>
37 
40 class Simulation
41 {
42 private:
43 
44  int _m_nrRuns;
45 
47 
48  bool _m_verbose;
49 
50 protected:
51 
52  static const int illegalRandomSeed=INT_MAX;
53 
54 public:
55  // Constructor, destructor and copy assignment.
56 
58  Simulation(int nrRuns, int seed=illegalRandomSeed) :
59  _m_nrRuns(nrRuns),
60  _m_random_seed(seed),
61  _m_verbose(false)
62  {}
63 
64 
66  virtual ~Simulation(){};
67 
68  void SetVerbose(bool verbose) { _m_verbose=verbose; }
69 
70  bool GetVerbose() const { return(_m_verbose); }
71  int GetNrRuns() const { return(_m_nrRuns); }
72  int GetRandomSeed() const { return(_m_random_seed); }
73  void SetRandomSeed( int s) { _m_random_seed = s; srand(s); }
74 
75 };
76 
77 #endif /* !_SIMULATION_H_ */
78 
79 // Local Variables: ***
80 // mode:c++ ***
81 // End: ***