Beispiel #1
0
 /// <summary>
 /// Construct a Automaton.
 /// </summary>
 /// <param name="initialState">The initial state.</param>
 /// <param name="transitionFunction">Queried to get the transitions associated to a particular state.</param>
 /// <param name="stack">The stack that holds the history of previous states.</param>
 public Automaton(IState initialState, ITransitionTable transitionFunction, IStateStack stack)
 {
     InitialState = initialState ?? throw new ArgumentNullException("Invalid initialState reference.");
     _table       = transitionFunction ?? throw new ArgumentNullException("Invalid transitionTable reference.");
     _stack       = stack ?? throw new ArgumentNullException("Invalid stack reference.");
     Reset();
 }
Beispiel #2
0
        private void Init( IntInterval horizon )
        {
            m_Horizon			= horizon;

            m_VarList			= new List<Variable>();
            m_IntVarList		= new List<IntVar>();
            m_FltVarList		= new List<FltVar>();
            m_ConstraintList	= new List<Constraint>();

            m_StateStack		= new StateStack();
            m_GoalStack			= new GoalStack( m_IntObjective );

            m_Out				= Console.Out;
            m_Time				= DateTime.Now;
        }
Beispiel #3
0
 protected RevBase(IStateStack stateStack)
 {
     m_StateStack = stateStack;
 }
Beispiel #4
0
 public RevObject(IStateStack stateStack, T obj) :
     base(stateStack)
 {
     m_Object = obj;
 }
Beispiel #5
0
 public RevObject(IStateStack stateStack) :
     base(stateStack)
 {
 }
Beispiel #6
0
 protected RevBase( IStateStack stateStack )
 {
     m_StateStack	= stateStack;
 }
Beispiel #7
0
 public RevList(IStateStack stateStack) :
     base(stateStack)
 {
     m_List = new List <T>();
 }
Beispiel #8
0
 /// <summary>
 /// Registers a state stack. State stacks need to be registered to be notified when the entire state is pushed or popped.
 /// </summary>
 /// <param name="stack">The state stack to register.</param>
 protected void RegisterState(IStateStack stack)
 {
     _stacks.Add(stack);
 }
Beispiel #9
0
 public RevValue(IStateStack stateStack, T value) :
     base(stateStack)
 {
     m_Value = value;
 }
Beispiel #10
0
 public RevValue(IStateStack stateStack) :
     base(stateStack)
 {
 }