public IConstraints9ConstraintElement Create( IpIndexElement pIndexElement, Ia a, ITHR THR, ITPx x) { IConstraints9ConstraintElement constraintElement = null; try { constraintElement = new Constraints9ConstraintElement( pIndexElement, a, THR, x); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public Constraints9ConstraintElement( IpIndexElement pIndexElement, Ia a, ITHR THR, ITPx x) { Expression LHS = Expression.Sum( a.Value .Select( i => x.Value[pIndexElement, i])); int RHS = THR.GetElementAtAsint( pIndexElement); this.Value = LHS == RHS; }
public ITHR Create( ImmutableList <ITHRParameterElement> value) { ITHR parameter = null; try { parameter = new THR( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }