Exemple #1
0
        // y is a parameter
        public IConstraints10ConstraintElement Create(
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
            Ix x)
        {
            IConstraints10ConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints10ConstraintElement(
                    rIndexElement,
                    sIndexElement,
                    tIndexElement,
                    y,
                    x);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
        // v is a variable and y is a parameter
        public IConstraints1ConstraintElement Create(
            ImIndexElement mIndexElement,
            IrIndexElement rIndexElement,
            Im m,
            Is s,
            Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
            Iζ ζ,
            Interfaces.Variables.Iv v)
        {
            IConstraints1ConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints1ConstraintElement(
                    mIndexElement,
                    rIndexElement,
                    m,
                    s,
                    y,
                    ζ,
                    v);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
        // w is a variable and y is a parameter
        public IConstraints5UConstraintElement Create(
            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)
        {
            IConstraints5UConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints5UConstraintElement(
                    jIndexElement,
                    rIndexElement,
                    sIndexElement,
                    BBar,
                    Bs,
                    y,
                    w);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
Exemple #4
0
        // Constructor: v is a variable and y is a parameter (1x0)
        public Constraints1ConstraintElement(
            ImIndexElement mIndexElement,
            IrIndexElement rIndexElement,
            Im m,
            Is s,
            Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
            Iζ ζ,
            Interfaces.Variables.Iv v)
        {
            int LHS = s.Value
                      .Select(
                x => y.GetElementAtAsint(
                    x,
                    rIndexElement)
                *
                ζ.GetElementAtAsint(
                    x,
                    mIndexElement))
                      .Sum();

            Expression RHS = m.GetM()
                             *
                             v.Value[mIndexElement, rIndexElement];

            this.Value = LHS <= RHS;
        }
 // Constructor: w and y are both parameters (x00)
 public Constraints5UConstraintElement(
     IjIndexElement jIndexElement,
     IrIndexElement rIndexElement,
     IsIndexElement sIndexElement,
     Interfaces.Parameters.SurgicalSpecialtyNumberAssignedTimeBlocks.IB BBar,
     Interfaces.Parameters.SurgeonNumberAssignedTimeBlocks.IB Bs,
     Interfaces.Parameters.SurgicalSpecialtyOperatingRoomAssignments.Iw w,
     Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y)
 {
     // Not needed
 }
Exemple #6
0
 // Constructor: v and y are both parameters (0x0)
 public Constraints1ConstraintElement(
     ImIndexElement mIndexElement,
     IrIndexElement rIndexElement,
     Im m,
     Is s,
     Interfaces.Parameters.MachineOperatingRoomAssignments.Iv v,
     Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
     Iζ ζ)
 {
     // Not needed
 }
        // Constructor: y is a parameter (xx0)
        public Constraints5LConstraintElement(
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
            Ib b)
        {
            int LHS = y.GetElementAtAsint(
                sIndexElement,
                rIndexElement);

            Expression RHS = b.Value[sIndexElement, rIndexElement];

            this.Value = LHS <= RHS;
        }
Exemple #8
0
        // Constructor: y is a parameter (xx0)
        public Constraints10ConstraintElement(
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
            Ix x)
        {
            Expression LHS = x.Value[sIndexElement, rIndexElement, tIndexElement];

            int RHS = y.GetElementAtAsint(
                sIndexElement,
                rIndexElement);

            this.Value = LHS <= RHS;
        }
        // Constructor: y is a parameter (xx0)
        public Constraints5MConstraintElement(
            IrIndexElement rIndexElement,
            IsIndexElement sIndexElement,
            IB B,
            Interfaces.Parameters.SurgeonOperatingRoomAssignments.Iy y,
            Interfaces.Variables.Ib b)
        {
            Expression LHS = b.Value[sIndexElement, rIndexElement];

            int RHS = B.GetElementAtAsint(
                sIndexElement)
                      *
                      y.GetElementAtAsint(
                sIndexElement,
                rIndexElement);

            this.Value = LHS <= RHS;
        }
        // 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;
        }