public IConstraints5UConstraintElement Create( IdIndexElement dIndexElement, IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, It t, IW W, Iδ2 δ2, Iδ4 δ4, Ix x) { IConstraints5UConstraintElement constraintElement = null; try { constraintElement = new Constraints5UConstraintElement( dIndexElement, rIndexElement, sIndexElement, tIndexElement, t, W, δ2, δ4, x); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public Constraints5UConstraintElement( IdIndexElement dIndexElement, IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, It t, IW W, Iδ2 δ2, Iδ4 δ4, Ix x) { OPTANO.Modeling.Optimization.Expression LHS = OPTANO.Modeling.Optimization.Expression.Sum( t.GetNthElementsAt( tIndexElement.Key, tIndexElement.Key + (δ4.GetElementAtAsint( sIndexElement, rIndexElement, dIndexElement, tIndexElement) - 1) * W.Value.Value.Value, W.Value.Value.Value) .Select( y => x.Value[sIndexElement, rIndexElement, y])); int RHS = δ2.GetElementAtAsint( sIndexElement, rIndexElement, dIndexElement); this.Value = LHS <= RHS; }
public Iδ2 Create( ImmutableList <Iδ2ParameterElement> value) { Iδ2 parameter = null; try { parameter = new δ2( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }