public IObjectiveFunction110 Create( IObjectiveFactory objectiveFactory, IsΛ sΛ, IΡ Ρ, Iω ω, Ie1Minus e1Minus, Ie1Plus e1Plus) { IObjectiveFunction110 objectiveFunction = null; try { objectiveFunction = new ObjectiveFunction110( objectiveFactory, sΛ, Ρ, ω, e1Minus, e1Plus); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(objectiveFunction); }
public ObjectiveFunction111( IObjectiveFactory objectiveFactory, IsΛ sΛ, IΡ Ρ, Iω ω, Ie1Minus e1Minus, Ie1Plus e1Plus) { Expression expression = Expression.Sum( sΛ.Value .Select( x => (double)Ρ.GetElementAtAsdecimal( x.ΛIndexElement) * (double)ω.GetElementAtAsdecimal( x.sIndexElement) * (e1Minus.Value[x.sIndexElement, x.ΛIndexElement] + e1Plus.Value[x.sIndexElement, x.ΛIndexElement]) * (e1Minus.Value[x.sIndexElement, x.ΛIndexElement] + e1Plus.Value[x.sIndexElement, x.ΛIndexElement]))); Objective objective = objectiveFactory.Create( expression, ObjectiveSense.Minimize); this.Value = objective; }
public IConstraints3ConstraintElement Create( IsIndexElement sIndexElement, IΛIndexElement ΛIndexElement, IN N, In n, IB B, Ie1Minus e1Minus, Ie1Plus e1Plus) { IConstraints3ConstraintElement constraintElement = null; try { constraintElement = new Constraints3ConstraintElement( sIndexElement, ΛIndexElement, N, n, B, e1Minus, e1Plus); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public Ie1Plus Create( VariableCollection <IsIndexElement, IΛIndexElement> value) { Ie1Plus variable = null; try { variable = new e1Plus( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(variable); }
public Constraints3ConstraintElement( IsIndexElement sIndexElement, IΛIndexElement ΛIndexElement, IN N, In n, IB B, Ie1Minus e1Minus, Ie1Plus e1Plus) { Expression LHS = n.GetElementAtAsint( sIndexElement, ΛIndexElement) * B.Value[sIndexElement] + e1Minus.Value[sIndexElement, ΛIndexElement] - e1Plus.Value[sIndexElement, ΛIndexElement]; int RHS = N.GetElementAtAsint( sIndexElement); this.Value = LHS == RHS; }