public Constraints8ConstraintElement( Id2IndexElement d2IndexElement, IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, Id1 d1, It t, Ix x, IxHat xHat, Iα α) { Expression LHS = xHat.Value[ sIndexElement, rIndexElement, t.GetElementAt( tIndexElement.Key + d2IndexElement.Value.Value.Value)]; Expression RHS = Expression.Sum( d1.Value .Select( y => x.GetElementAtAsint( sIndexElement, rIndexElement, t.GetElementAt( tIndexElement.Key + y.Value.Value.Value)) * α.Value[rIndexElement, y, d2IndexElement])); this.Value = LHS == RHS; }
public ITPObjectiveFunction Create( IObjectiveFactory objectiveFactory, Id d, Iw w, Iα α, Iβ β, Iγ γ, IδMinus δMinus, Interfaces.Variables.TP.WardSpareBeds.IδPlus δPlus_w, Interfaces.Variables.TP.WardBedOccupancyVariances.IVariance Variance_w) { ITPObjectiveFunction objectiveFunction = null; try { objectiveFunction = new TPObjectiveFunction( objectiveFactory, d, w, α, β, γ, δMinus, δPlus_w, Variance_w); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(objectiveFunction); }
public IConstraints8ConstraintElement Create( Id2IndexElement d2IndexElement, IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, Id1 d1, It t, Ix x, IxHat xHat, Iα α) { IConstraints8ConstraintElement constraintElement = null; try { constraintElement = new Constraints8ConstraintElement( d2IndexElement, rIndexElement, sIndexElement, tIndexElement, d1, t, x, xHat, α); } catch (Exception exception) { this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace); } return(constraintElement); }
public Constraints7ConstraintElement( IrIndexElement rIndexElement, Id1IndexElement d1IndexElement, Id2IndexElement d2IndexElement, Iα α) { Expression LHS = α.Value[rIndexElement, d1IndexElement, d2IndexElement]; int RHS = 0; this.Value = LHS == RHS; }
public Constraints6ConstraintElement( Id2IndexElement d2IndexElement, IrIndexElement rIndexElement, Id1 d1, Iα α) { Expression LHS = Expression.Sum( d1.Value .Select( y => α.Value[rIndexElement, y, d2IndexElement])); int RHS = 1; this.Value = LHS == RHS; }
public Constraints5ConstraintElement( Id1IndexElement d1IndexElement, IrIndexElement rIndexElement, Id2 d2, Iα α) { Expression LHS = Expression.Sum( d2.Value .Select( y => α.Value[rIndexElement, d1IndexElement, y])); int RHS = 1; this.Value = LHS == RHS; }
public Iα Create( VariableCollection <IrIndexElement, Id1IndexElement, Id2IndexElement> value) { Iα variable = null; try { variable = new α( value); } catch (Exception exception) { this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace); } return(variable); }
public decimal GetdHdt( Iα α, C19M.M.C.A.Safi2010.Interfaces.Parameters.RecoveryRateHospitalizedIndividuals.Iγ γ_2, C19M.M.C.A.Safi2010.Interfaces.Parameters.DiseaseInducedDeathRateHospitalizedIndividuals.Iδ δ_2, Iμ μ, Iϕ ϕ, double H, double I, double Q) { return (α.Value.Value.Value * (decimal)Q - ϕ.Value.Value.Value * (decimal)I - (γ_2.Value.Value.Value + μ.Value.Value.Value + δ_2.Value.Value.Value) * (decimal)H); }
public decimal GetdQdt( Iα α, Iμ μ, Iσ σ, double E, double Q) { return (σ.Value.Value.Value * (decimal)E - (α.Value.Value.Value + μ.Value.Value.Value) * (decimal)Q); }
public Iα Create( ImmutableList <IαParameterElement> value) { Iα parameter = null; try { parameter = new α( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }
public TPObjectiveFunction( IObjectiveFactory objectiveFactory, Id d, Iw w, Iα α, Iβ β, Iγ γ, IδMinus δMinus, Interfaces.Variables.TP.WardSpareBeds.IδPlus δPlus_w, Interfaces.Variables.TP.WardBedOccupancyVariances.IVariance Variance_w) { Expression expression = Expression.Sum( w.Value .Select( i => (double)α.GetElementAtAsdecimal( i) * Expression.Sum( d.Value .Select( j => δMinus.Value[i, j])) + (double)β.GetElementAtAsdecimal( i) * δPlus_w.Value[i] + (double)γ.GetElementAtAsdecimal( i) * Variance_w.Value[i])); Objective objective = objectiveFactory.Create( expression, ObjectiveSense.Minimize); this.Value = objective; }
public IConstraints5ConstraintElement Create( Id1IndexElement d1IndexElement, IrIndexElement rIndexElement, Id2 d2, Iα α) { IConstraints5ConstraintElement constraintElement = null; try { constraintElement = new Constraints5ConstraintElement( d1IndexElement, rIndexElement, d2, α); } catch (Exception exception) { this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace); } return(constraintElement); }