NEURON
nrnste.h
Go to the documentation of this file.
1 #ifndef nrnste_h
2 #define nrnste_h
3 //StateTransitionEvent is a finite state machine in which a transtion occurs
4 // when the transition condition is true. For speed the transition condition
5 // is of the form *var1 > *var2 and allows second order interpolation.
6 // Transition conditions are checked only if the source state is the
7 // current state.
8 
9 class HocCommand;
11 class STECondition;
12 
14 public:
15  STETransition();
16  virtual ~STETransition();
17  void event(); // from STECondition::deliver
18  virtual double value() { return *var1_ - *var2_;}
19  void activate(); // add ste_ to watch list
20  void deactivate(); // remove ste_ from watch list
21 
22  double* var1_;
23  double* var2_;
27  int dest_;
29 };
30 
31 class STEState {
32 public:
33  STEState();
34  virtual ~STEState();
35  STETransition* add_transition();
36  int ntrans_;
38 };
39 
41 public:
43  virtual ~StateTransitionEvent();
44  void transition(int src, int dest, double* var1, double* var2, HocCommand*);
45  void state(int i); // set current state -- update watch list.
46  int state(){return istate_;}
47  int nstate() { return nstate_;}
48  void activate();
49  void deactivate();
50 
51  int nstate_;
52  int istate_;
56 };
57 
58 
59 #endif
virtual double value()
Definition: nrnste.h:18
bool var1_is_time_
Definition: nrnste.h:28
STETransition * transitions_
Definition: nrnste.h:37
void activate()
Definition: netcvode.cpp:5390
StateTransitionEvent * ste_
Definition: nrnste.h:25
STECondition * stec_
Definition: nrnste.h:26
Point_process * pnt_
Definition: nrnste.h:54
double * var1_
Definition: nrnste.h:22
int ntrans_
Definition: nrnste.h:36
static int nstate
Definition: simultan.cpp:192
static int nstate_[MAXKINBLK]
Definition: kinetic.cpp:107
virtual ~STETransition()
Definition: nrnste.cpp:153
int dest_
Definition: nrnste.h:27
void deactivate()
Definition: netcvode.cpp:5401
#define i
Definition: md1redef.h:12
double * var2_
Definition: nrnste.h:23
void event()
Definition: nrnste.cpp:162
HocCommand * hc_
Definition: nrnste.h:24
STEState * states_
Definition: nrnste.h:53