public Constraints5ConstraintElement( IaIndexElement aIndexElement, IsIndexElement sIndexElement, Ip p, Idur dur, ILENGTH LENGTH, IP P, ISPx x, ISPz z) { Expression LHS = Expression.Sum( p.Value .Where( i => P.IsThereElementAt( sIndexElement, i)) .Select( i => (double)dur.GetElementAtAsdecimal( i) * x.Value[i, aIndexElement])); Expression RHS = z.Value[sIndexElement, aIndexElement] * (double)LENGTH.Value.Value.Value; this.Value = LHS <= RHS; }
public IConstraints5ConstraintElement Create( IaIndexElement aIndexElement, IsIndexElement sIndexElement, Ip p, Idur dur, ILENGTH LENGTH, IP P, ISPx x, ISPz z) { IConstraints5ConstraintElement constraintElement = null; try { constraintElement = new Constraints5ConstraintElement( aIndexElement, sIndexElement, p, dur, LENGTH, P, x, z); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public ILENGTH Create( Duration value) { ILENGTH parameter = null; try { parameter = new LENGTH( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }