public Constraints8ConstraintElement(
            Id2IndexElement d2IndexElement,
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            Id1 d1,
            It t,
            Ix x,
            IxHat xHat,
            Iα α)
        {
            Expression LHS = xHat.Value[
                sIndexElement,
                rIndexElement,
                t.GetElementAt(
                    tIndexElement.Key + d2IndexElement.Value.Value.Value)];

            Expression RHS = Expression.Sum(
                d1.Value
                .Select(
                    y => x.GetElementAtAsint(
                        sIndexElement,
                        rIndexElement,
                        t.GetElementAt(
                            tIndexElement.Key + y.Value.Value.Value))
                    *
                    α.Value[rIndexElement, y, d2IndexElement]));

            this.Value = LHS == RHS;
        }
Example #2
0
        public IConstraints8ConstraintElement Create(
            Id2IndexElement d2IndexElement,
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            Id1 d1,
            It t,
            Ix x,
            IxHat xHat,
            Iα α)
        {
            IConstraints8ConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints8ConstraintElement(
                    d2IndexElement,
                    rIndexElement,
                    sIndexElement,
                    tIndexElement,
                    d1,
                    t,
                    x,
                    xHat,
                    α);
            }
            catch (Exception exception)
            {
                this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace);
            }

            return(constraintElement);
        }
        public rd2CrossJoinElement(
            IrIndexElement rIndexElement,
            Id2IndexElement d2IndexElement)
        {
            this.rIndexElement = rIndexElement;

            this.d2IndexElement = d2IndexElement;
        }
        public srd2CrossJoinElement(
            IsIndexElement sIndexElement,
            IrIndexElement rIndexElement,
            Id2IndexElement d2IndexElement)
        {
            this.sIndexElement = sIndexElement;

            this.rIndexElement = rIndexElement;

            this.d2IndexElement = d2IndexElement;
        }
Example #5
0
        public S2ParameterElement(
            IrIndexElement rIndexElement,
            Id1IndexElement d1IndexElement,
            Id2IndexElement d2IndexElement)
        {
            this.rIndexElement = rIndexElement;

            this.d1IndexElement = d1IndexElement;

            this.d2IndexElement = d2IndexElement;
        }
        public Constraints7ConstraintElement(
            IrIndexElement rIndexElement,
            Id1IndexElement d1IndexElement,
            Id2IndexElement d2IndexElement,
            Iα α)
        {
            Expression LHS = α.Value[rIndexElement, d1IndexElement, d2IndexElement];

            int RHS = 0;

            this.Value = LHS == RHS;
        }
Example #7
0
        public Constraints6ConstraintElement(
            Id2IndexElement d2IndexElement,
            IrIndexElement rIndexElement,
            Id1 d1,
            Iα α)
        {
            Expression LHS = Expression.Sum(
                d1.Value
                .Select(
                    y => α.Value[rIndexElement, y, d2IndexElement]));

            int RHS = 1;

            this.Value = LHS == RHS;
        }
        public Id2IndexElement Create(
            PositiveInt value)
        {
            Id2IndexElement indexElement = null;

            try
            {
                indexElement = new d2IndexElement(
                    value);
            }
            catch (Exception exception)
            {
                this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace);
            }

            return(indexElement);
        }
        public Ird2CrossJoinElement Create(
            IrIndexElement rIndexElement,
            Id2IndexElement d2IndexElement)
        {
            Ird2CrossJoinElement crossJoinElement = null;

            try
            {
                crossJoinElement = new rd2CrossJoinElement(
                    rIndexElement,
                    d2IndexElement);
            }
            catch (Exception exception)
            {
                this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace);
            }

            return(crossJoinElement);
        }
Example #10
0
        public bool IsThereElementAt(
            IrIndexElement rIndexElement,
            Id1IndexElement d1IndexElement,
            Id2IndexElement d2IndexElement)
        {
            int count = this.Value
                        .Where(x => x.rIndexElement == rIndexElement && x.d1IndexElement == d1IndexElement && x.d2IndexElement == d2IndexElement)
                        .Distinct()
                        .Count();

            if (count == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #11
0
        public IS2ParameterElement Create(
            IrIndexElement rIndexElement,
            Id1IndexElement d1IndexElement,
            Id2IndexElement d2IndexElement)
        {
            IS2ParameterElement parameterElement = null;

            try
            {
                parameterElement = new S2ParameterElement(
                    rIndexElement,
                    d1IndexElement,
                    d2IndexElement);
            }
            catch (Exception exception)
            {
                this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace);
            }

            return(parameterElement);
        }
Example #12
0
        public IConstraints7ConstraintElement Create(
            IrIndexElement rIndexElement,
            Id1IndexElement d1IndexElement,
            Id2IndexElement d2IndexElement,
            Iα α)
        {
            IConstraints7ConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints7ConstraintElement(
                    rIndexElement,
                    d1IndexElement,
                    d2IndexElement,
                    α);
            }
            catch (Exception exception)
            {
                this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace);
            }

            return(constraintElement);
        }