public IConstraints4ConstraintElement Create( IaIndexElement aIndexElement, Is s, IBLOCKS BLOCKS, ISPz z) { IConstraints4ConstraintElement constraintElement = null; try { constraintElement = new Constraints4ConstraintElement( aIndexElement, s, BLOCKS, z); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public Constraints4ConstraintElement( IaIndexElement aIndexElement, Is s, IBLOCKS BLOCKS, ISPz z) { Expression LHS = Expression.Sum( s.Value .Select( i => z.Value[i, aIndexElement])); int RHS = BLOCKS.Value.Value.Value; this.Value = LHS <= RHS; }
public IBLOCKS Create( PositiveInt value) { IBLOCKS parameter = null; try { parameter = new BLOCKS( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }