public IConstraints13LConstraintElement Create( IdIndexElement dIndexElement, IwIndexElement wIndexElement, ITPy y, IδMinus δMinus, Iμ μ) { IConstraints13LConstraintElement constraintElement = null; try { constraintElement = new Constraints13LConstraintElement( dIndexElement, wIndexElement, y, δMinus, μ); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
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 Constraints13LConstraintElement( IdIndexElement dIndexElement, IwIndexElement wIndexElement, ITPy y, IδMinus δMinus, Iμ μ) { Expression LHS = -δMinus.Value[wIndexElement, dIndexElement]; Expression RHS = y.Value[wIndexElement] - μ.Value[wIndexElement, dIndexElement]; this.Value = LHS <= RHS; }
public IδMinus Create( ImmutableList <IδMinusResultElement> value) { IδMinus result = null; try { result = new δMinus( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(result); }
public IδMinus Create( VariableCollection <IwIndexElement, IdIndexElement> value) { IδMinus variable = null; try { variable = new δMinus( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(variable); }
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; }