// v is a parameter and y is a variable public IConstraints1ConstraintElement Create( ImIndexElement mIndexElement, IrIndexElement rIndexElement, Im m, Is s, Interfaces.Parameters.MachineOperatingRoomAssignments.Iv v, Iζ ζ, Interfaces.Variables.Iy y) { IConstraints1ConstraintElement constraintElement = null; try { constraintElement = new Constraints1ConstraintElement( mIndexElement, rIndexElement, m, s, v, ζ, y); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
// v and y are both variables public IConstraints1ConstraintElement Create( ImIndexElement mIndexElement, IrIndexElement rIndexElement, Im m, Is s, Iζ ζ, Iv v, Iy y) { IConstraints1ConstraintElement constraintElement = null; try { constraintElement = new Constraints1ConstraintElement( mIndexElement, rIndexElement, m, s, ζ, v, y); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
// Constructor: v is a parameter and y is a variable (0x1) public Constraints1ConstraintElement( ImIndexElement mIndexElement, IrIndexElement rIndexElement, Im m, Is s, Interfaces.Parameters.MachineOperatingRoomAssignments.Iv v, Iζ ζ, Interfaces.Variables.Iy y) { Expression LHS = Expression.Sum( s.Value .Select( x => y.Value[x, rIndexElement] * ζ.GetElementAtAsint( x, mIndexElement))); int RHS = m.GetM() * v.GetElementAtAsint( mIndexElement, rIndexElement); this.Value = LHS <= RHS; }
// 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: 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 }
public Iζ Create( ImmutableList <IζParameterElement> value) { Iζ parameter = null; try { parameter = new ζ( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }
public Constraints1ConstraintElement( ImIndexElement mIndexElement, IrIndexElement rIndexElement, Im m, Is s, Iζ ζ, Iv v, Iy y) { Expression LHS = Expression.Sum( s.Value .Select( x => y.Value[x, rIndexElement] * ζ.GetElementAtAsint( x, mIndexElement))); Expression RHS = m.GetM() * v.Value[mIndexElement, rIndexElement]; this.Value = LHS <= RHS; }