コード例 #1
0
        public Constraints5UConstraintElement(
            IjIndexElement jIndexElement,
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            Interfaces.Parameters.SurgicalSpecialtyNumberAssignedTimeBlocks.IB BBar,
            Interfaces.Parameters.SurgeonNumberAssignedTimeBlocks.IB Bs,
            Iw w,
            Iy y)
        {
            Expression LHS = Bs.GetElementAtAsint(
                sIndexElement)
                             *
                             y.Value[sIndexElement, rIndexElement];

            Expression RHS = BBar.GetElementAtAsint(
                jIndexElement)
                             *
                             w.Value[jIndexElement, rIndexElement];

            this.Value = LHS <= RHS;
        }
コード例 #2
0
        // Constructor: w is a variable and y is a parameter (x10)
        public Constraints5UConstraintElement(
            IjIndexElement jIndexElement,
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            Interfaces.Parameters.SurgicalSpecialtyNumberAssignedTimeBlocks.IB BBar,
            Interfaces.Parameters.SurgeonNumberAssignedTimeBlocks.IB Bs,
            Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
            Interfaces.Variables.Iw w)
        {
            int LHS = Bs.GetElementAtAsint(
                sIndexElement)
                      *
                      y.GetElementAtAsint(
                sIndexElement,
                rIndexElement);

            Expression RHS = BBar.GetElementAtAsint(
                jIndexElement)
                             *
                             w.Value[jIndexElement, rIndexElement];

            this.Value = LHS <= RHS;
        }