예제 #1
0
        public void RegisterValue(float val, int myIndex, VariableManager vm)
        {
            // change detected
            if (Current == DEF_VALUE)
            {
                this.m_changed = false;
                this.Current   = val;
                Values.Add(val);
            }
            else if (val != Current)
            {
                this.m_changed = true;
                this.Current   = val;

                if (!Values.Contains(val))
                {
                    Values.Add(val);
                }
                // if no abstract aciotn is added, rise the request for it
                if (vm.GetVarNo(myIndex).MyAction == null)
                {
                    vm.ShouldBeSubspaced.Add(myIndex);
                }
            }
            else
            {
                this.m_changed = false;
            }
        }
예제 #2
0
        public MyVariableHistory(VariableManager vm, MyModuleParams setup)
        {
            this.vm    = vm;
            this.setup = setup;

            this.changed = new List <List <int> >();

            isMonitored = new bool[vm.GetMaxVariables()];
        }
예제 #3
0
 public MyRootDecisionSpace(int maxVariables, String[] actionNames, MyModuleParams setup)
 {
     VarManager    = new VariableManager(maxVariables, setup);
     ActionManager = new ActionManager(actionNames, setup);
 }
예제 #4
0
        public MyVariableHistory(VariableManager vm, MyModuleParams setup)
        {
            this.vm = vm;
            this.setup = setup;

            this.changed = new List<List<int>>();

            isMonitored = new bool[vm.GetMaxVariables()];
        }
예제 #5
0
        public void RegisterValue(float val, int myIndex, VariableManager vm)
        {
            // change detected
            if (Current == DEF_VALUE)
            {
                this.m_changed = false;
                this.Current = val;
                Values.Add(val);
            }
            else if (val != Current)
            {
                this.m_changed = true;
                this.Current = val;

                if (!Values.Contains(val))
                {
                    Values.Add(val);
                }
                // if no abstract aciotn is added, rise the request for it
                if (vm.GetVarNo(myIndex).MyAction == null)
                {
                    vm.ShouldBeSubspaced.Add(myIndex);
                }
            }
            else
            {
                this.m_changed = false;
            }
        }
예제 #6
0
 public MyRootDecisionSpace(int maxVariables, String[] actionNames, MyModuleParams setup)
 {
     VarManager = new VariableManager(maxVariables, setup);
     ActionManager = new ActionManager(actionNames, setup);
 }