Esempio n. 1
0
        public IConstraints13LConstraintElement Create(
            IdIndexElement dIndexElement,
            IwIndexElement wIndexElement,
            ITPy y,
            IδMinus δMinus,
            Iμ μ)
        {
            IConstraints13LConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints13LConstraintElement(
                    dIndexElement,
                    wIndexElement,
                    y,
                    δMinus,
                    μ);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
Esempio n. 2
0
        public Constraint2(
            Iw w,
            IBEDS BEDS,
            ITPy y)
        {
            Expression LHS = Expression.Sum(
                w.Value
                .Select(
                    i => y.Value[i]));

            int RHS = BEDS.Value.Value.Value;

            this.Value = LHS <= RHS;
        }
        public Constraints13MConstraintElement(
            IdIndexElement dIndexElement,
            IwIndexElement wIndexElement,
            ITPy y,
            IδPlus δPlus,
            Iμ μ)
        {
            Expression LHS =
                y.Value[wIndexElement]
                -
                μ.Value[wIndexElement, dIndexElement];

            Expression RHS = δPlus.Value[wIndexElement, dIndexElement];

            this.Value = LHS <= RHS;
        }
Esempio n. 4
0
        public ITPy Create(
            VariableCollection <IwIndexElement> value)
        {
            ITPy variable = null;

            try
            {
                variable = new TPy(
                    value);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(variable);
        }
Esempio n. 5
0
        public ITPy Create(
            ImmutableList <ITPyResultElement> value)
        {
            ITPy result = null;

            try
            {
                result = new TPy(
                    value);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(result);
        }
        public IConstraint2 Create(
            Iw w,
            IBEDS BEDS,
            ITPy y)
        {
            IConstraint2 constraint = null;

            try
            {
                constraint = new Constraint2(
                    w,
                    BEDS,
                    y);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraint);
        }