public IConstraints16ConstraintElement Create( IaIndexElement aIndexElement, IsIndexElement sIndexElement, Ip p, Irk rk, Idur dur, ILength Length, IP P, ITPx x, ITPz z) { IConstraints16ConstraintElement constraintElement = null; try { constraintElement = new Constraints16ConstraintElement( aIndexElement, sIndexElement, p, rk, dur, Length, P, x, z); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
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 IUtilizedTime Calculate( IUtilizedTimeFactory utilizedTimeFactory, Ipa pa, Idur dur, ITPx x) { return(utilizedTimeFactory.Create( pa.Value .Select(w => x.GetElementAtAsint( w.pIndexElement, w.aIndexElement) * dur.GetElementAtAsdecimal( w.pIndexElement)) .Sum())); }
public Idur Create( ImmutableList <IdurParameterElement> value) { Idur parameter = null; try { parameter = new dur( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }
public Constraints16ConstraintElement( IaIndexElement aIndexElement, IsIndexElement sIndexElement, Ip p, Irk rk, Idur dur, ILength Length, IP P, ITPx x, ITPz 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 = Expression.Sum( rk.Value .Select( i => z.Value[sIndexElement, aIndexElement, i.rIndexElement, i.kIndexElement] * (double)Length.GetElementAtAsdecimal( i.kIndexElement))); this.Value = LHS <= RHS; }