コード例 #1
0
        public IObjectiveFunction100 Create(
            IObjectiveFactory objectiveFactory,
            Imr mr,
            IC C,
            Iv v)
        {
            IObjectiveFunction100 objectiveFunction = null;

            try
            {
                objectiveFunction = new ObjectiveFunction100(
                    objectiveFactory,
                    mr,
                    C,
                    v);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(objectiveFunction);
        }
コード例 #2
0
 public Interfaces.Results.MachineOperatingRoomAssignments.Iv GetElementsAt(
     IvResultElementFactory vResultElementFactory,
     IvFactory vFactory,
     Imr mr)
 {
     return(vFactory.Create(
                mr.Value
                .Select(
                    i => vResultElementFactory.Create(
                        i.mIndexElement,
                        i.rIndexElement,
                        this.GetElementAt(
                            i.mIndexElement,
                            i.rIndexElement)))
                .ToImmutableList()));
 }
コード例 #3
0
        public Imr Create(
            ImmutableList <ImrCrossJoinElement> value)
        {
            Imr crossJoin = null;

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

            return(crossJoin);
        }
コード例 #4
0
        public ObjectiveFunction100(
            IObjectiveFactory objectiveFactory,
            Imr mr,
            IC C,
            Iv v)
        {
            Expression expression = Expression.Sum(
                mr.Value
                .Select(
                    x => (double)C.GetElementAtAsdecimal(
                        x.mIndexElement)
                    *
                    v.Value[x.mIndexElement, x.rIndexElement]));

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

            this.Value = objective;
        }