// w is a parameter and y is a variable public IConstraints5UConstraintElement Create( IjIndexElement jIndexElement, IrIndexElement rIndexElement, IsIndexElement sIndexElement, Interfaces.Parameters.SurgicalSpecialtyNumberAssignedTimeBlocks.IB BBar, Interfaces.Parameters.SurgeonNumberAssignedTimeBlocks.IB Bs, Interfaces.Parameters.SurgicalSpecialtyOperatingRoomAssignments.Iw w, Interfaces.Variables.Iy y) { IConstraints5UConstraintElement constraintElement = null; try { constraintElement = new Constraints5UConstraintElement( jIndexElement, rIndexElement, sIndexElement, BBar, Bs, w, y); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
// 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 }
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; }
// 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; }