Пример #1
0
        /// <summary>
        /// Re-solve the current collection of constraints, given the new
        /// values for the edit variables that have already been
        /// suggested (see <see cref="IEditContext.SuggestValue"/> method).
        /// </summary>
        IEditContext IEditContext.Resolve()
        {
            DualOptimize();
            SetExternalVariables();
            InfeasibleRows.Clear();
            ResetStayConstants();

            return(this);
        }
Пример #2
0
        /// <summary>
        /// Marks the start of an edit session.
        /// </summary>
        /// <remarks>
        /// BeginEdit should be called before sending Resolve()
        /// messages, after adding the appropriate edit variables.
        /// </remarks>
        public IEditContext BeginEdit(params ClVariable[] editVar)
        {
            foreach (ClVariable variable in editVar)
            {
                AddEditVar(variable, ClStrength.Strong);
            }

            Assert(_editVarMap.Count > 0, "_editVarMap.Count > 0");
            // may later want to do more in here
            InfeasibleRows.Clear();
            ResetStayConstants();
            _stkCedcns.Push(_editVarMap.Count);

            return(this);
        }