Exemple #1
0
        public IConstraints14ConstraintElement Create(
            IdIndexElement dIndexElement,
            IwIndexElement wIndexElement,
            Interfaces.Variables.TP.WardBedOccupancyVariances.IVariance Variance_w,
            Interfaces.Variables.TP.WardDayBedRequirementVariances.IVariance Variance_wd)
        {
            IConstraints14ConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints14ConstraintElement(
                    dIndexElement,
                    wIndexElement,
                    Variance_w,
                    Variance_wd);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
        public Constraints14ConstraintElement(
            IdIndexElement dIndexElement,
            IwIndexElement wIndexElement,
            Interfaces.Variables.TP.WardBedOccupancyVariances.IVariance Variance_w,
            Interfaces.Variables.TP.WardDayBedRequirementVariances.IVariance Variance_wd)
        {
            Expression LHS =
                Variance_wd.Value[wIndexElement, dIndexElement];

            Expression RHS =
                Variance_w.Value[wIndexElement];

            this.Value = LHS <= RHS;
        }