예제 #1
0
        /// <summary>
        /// Get the column variable value (after transition) from BDD configuration. This value must be added with Lowerbound value. See the Variable Expression
        /// implementation
        /// [ REFS: '', DEREFS: '']
        /// </summary>
        public int GetColVarValue(CUDDNode currentStateDD, string variableName)
        {
            CUDDVars notSelectedVariables = new CUDDVars();

            notSelectedVariables.AddVars(this.AllColVars);
            notSelectedVariables.RemoveVars(this.GetColVars(variableName));

            CUDD.Ref(currentStateDD);
            CUDDNode selectedEventDD = CUDD.Abstract.ThereExists(currentStateDD, notSelectedVariables);
            int      selectedEvent   = CUDD.MinTermToInt(selectedEventDD, this.GetColVars(variableName));

            CUDD.Deref(selectedEventDD);

            //
            selectedEvent += this.GetVarLowerBound(variableName);
            return(selectedEvent);
        }