Exemplo n.º 1
0
        public IObjectiveFunction110 Create(
            IObjectiveFactory objectiveFactory,
            IsΛ sΛ,
            IΡ Ρ,
            Iω ω,
            Ie1Minus e1Minus,
            Ie1Plus e1Plus)
        {
            IObjectiveFunction110 objectiveFunction = null;

            try
            {
                objectiveFunction = new ObjectiveFunction110(
                    objectiveFactory,
                    sΛ,
                    Ρ,
                    ω,
                    e1Minus,
                    e1Plus);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(objectiveFunction);
        }
Exemplo n.º 2
0
        public ObjectiveFunction111(
            IObjectiveFactory objectiveFactory,
            IsΛ sΛ,
            IΡ Ρ,
            Iω ω,
            Ie1Minus e1Minus,
            Ie1Plus e1Plus)
        {
            Expression expression = Expression.Sum(
                sΛ.Value
                .Select(
                    x => (double)Ρ.GetElementAtAsdecimal(
                        x.ΛIndexElement)
                    *
                    (double)ω.GetElementAtAsdecimal(
                        x.sIndexElement)
                    *
                    (e1Minus.Value[x.sIndexElement, x.ΛIndexElement]
                     +
                     e1Plus.Value[x.sIndexElement, x.ΛIndexElement])
                    *
                    (e1Minus.Value[x.sIndexElement, x.ΛIndexElement]
                     +
                     e1Plus.Value[x.sIndexElement, x.ΛIndexElement])));

            Objective objective = objectiveFactory.Create(
                expression,
                ObjectiveSense.Minimize);

            this.Value = objective;
        }
Exemplo n.º 3
0
        public Iω Create(
            ImmutableList <IωParameterElement> value)
        {
            Iω parameter = null;

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

            return(parameter);
        }