public IConstraints6UConstraintElement Create( IpIndexElement pIndexElement, Ia a, IUB UB, ISPx x) { IConstraints6UConstraintElement constraintElement = null; try { constraintElement = new Constraints6UConstraintElement( pIndexElement, a, UB, x); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public Constraints6UConstraintElement( IpIndexElement pIndexElement, Ia a, IUB UB, ISPx x) { Expression LHS = Expression.Sum( a.Value .Select( i => x.Value[pIndexElement, i])); int RHS = UB.GetElementAtAsint( pIndexElement); this.Value = LHS <= RHS; }
public IUB Create( ImmutableList <IUBParameterElement> value) { IUB parameter = null; try { parameter = new UB( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }