public IConstraints5LConstraintElement Create(
            IdIndexElement dIndexElement,
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            It t,
            IW W,
            Iδ1 δ1,
            Iδ4 δ4,
            Ix x)
        {
            IConstraints5LConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints5LConstraintElement(
                    dIndexElement,
                    rIndexElement,
                    sIndexElement,
                    tIndexElement,
                    t,
                    W,
                    δ1,
                    δ4,
                    x);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
Ejemplo n.º 2
0
        public Constraints5LConstraintElement(
            IdIndexElement dIndexElement,
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            It t,
            IW W,
            Iδ1 δ1,
            Iδ4 δ4,
            Ix x)
        {
            int LHS = δ1.GetElementAtAsint(
                sIndexElement,
                rIndexElement,
                dIndexElement);

            OPTANO.Modeling.Optimization.Expression RHS = OPTANO.Modeling.Optimization.Expression.Sum(
                t.GetNthElementsAt(
                    tIndexElement.Key,
                    tIndexElement.Key
                    +
                    (δ4.GetElementAtAsint(
                         sIndexElement,
                         rIndexElement,
                         dIndexElement,
                         tIndexElement)
                     - 1)
                    *
                    W.Value.Value.Value,
                    W.Value.Value.Value)
                .Select(
                    y => x.Value[sIndexElement, rIndexElement, y]));

            this.Value = LHS <= RHS;
        }
Ejemplo n.º 3
0
        public Iδ4 Create(
            ImmutableList <Iδ4ParameterElement> value)
        {
            Iδ4 parameter = null;

            try
            {
                parameter = new δ4(
                    value);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(parameter);
        }