// v and y are both variables public IConstraints1ConstraintElement Create( ImIndexElement mIndexElement, IrIndexElement rIndexElement, Im m, Is s, Iζ ζ, Iv v, Iy y) { IConstraints1ConstraintElement constraintElement = null; try { constraintElement = new Constraints1ConstraintElement( mIndexElement, rIndexElement, m, s, ζ, v, y); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public IConstraints3ConstraintElement Create( IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, Iy y, IxHat xHat) { IConstraints3ConstraintElement constraintElement = null; try { constraintElement = new Constraints3ConstraintElement( rIndexElement, sIndexElement, tIndexElement, y, xHat); } catch (Exception exception) { this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace); } return(constraintElement); }
// w and y are both variables public IConstraints5UConstraintElement Create( IjIndexElement jIndexElement, IrIndexElement rIndexElement, IsIndexElement sIndexElement, Interfaces.Parameters.SurgicalSpecialtyNumberAssignedTimeBlocks.IB BBar, Interfaces.Parameters.SurgeonNumberAssignedTimeBlocks.IB Bs, Iw w, Iy y) { IConstraints5UConstraintElement constraintElement = null; try { constraintElement = new Constraints5UConstraintElement( jIndexElement, rIndexElement, sIndexElement, BBar, Bs, w, y); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
// y is a variable public IConstraints10ConstraintElement Create( IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, Ix x, Iy y) { IConstraints10ConstraintElement constraintElement = null; try { constraintElement = new Constraints10ConstraintElement( rIndexElement, sIndexElement, tIndexElement, x, y); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(constraintElement); }
public void SellLemonade(Random r) { cr = new Customer(Actual, r); int customers = GetCustomers(Actual, r, cr); Iy.InventoryAdjuster(customers); ui.ShowDayResults(Iy, customers, iy.Money); }
public ISurgeonNumberAssignedOperatingRoomsResultElement Calculate( ISurgeonNumberAssignedOperatingRoomsResultElementFactory surgeonNumberAssignedOperatingRoomsResultElementFactory, IsIndexElement sIndexElement, Iy y) { return(surgeonNumberAssignedOperatingRoomsResultElementFactory.Create( sIndexElement, y.Value.Where(i => i.sIndexElement == sIndexElement && i.Value).Select(i => i.rIndexElement).Distinct().Count())); }
public ISurgicalSpecialtyNumberAssignedOperatingRoomsResultElement Calculate( ISurgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory surgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory, IΔParameterElement ΔParameterElement, Iy y) { return(surgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory.Create( ΔParameterElement.jIndexElement, ΔParameterElement.Value.SelectMany(a => y.Value.Where(i => i.sIndexElement == a && i.Value).Select(w => w.rIndexElement)).Distinct().Count())); }
public Constraints5LConstraintElement( IrIndexElement rIndexElement, IsIndexElement sIndexElement, Ib b, Iy y) { Expression LHS = y.Value[sIndexElement, rIndexElement]; Expression RHS = b.Value[sIndexElement, rIndexElement]; this.Value = LHS <= RHS; }
// Constructor: y is a variable (xx1) public Constraints10ConstraintElement( IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, Ix x, Iy y) { Expression LHS = x.Value[sIndexElement, rIndexElement, tIndexElement]; Expression RHS = y.Value[sIndexElement, rIndexElement]; this.Value = LHS <= RHS; }
public void FinalizePurchase(double price, double amount, int selection, int purchaseQuantity, string purchaseName) { if (Iy.MoneyValidator(price) == true) { iy.AddToInventory(purchaseName, amount); iy.PayForItem(purchaseName, se.Stock[selection - 1].Price, purchaseQuantity); } else { Console.WriteLine("Not enough money to complete transaction"); BuyItem(selection); } }
private void button7_Click(object sender, EventArgs e) { Bitmap result = new Bitmap(gray); for (int i = 0; i < gray.Width; i++) { for (int j = 0; j < gray.Height; j++) { int value = (int)Math.Sqrt((Ix.GetPixel(i, j).R *Iy.GetPixel(i, j).R)); result.SetPixel(i, j, Color.FromArgb(value, value, value)); } } pb_result.Image = result; }
public ISurgicalSpecialtyNumberAssignedOperatingRooms Calculate( ISurgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory surgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory, ISurgicalSpecialtyNumberAssignedOperatingRoomsFactory surgicalSpecialtyNumberAssignedOperatingRoomsFactory, ISurgicalSpecialtyNumberAssignedOperatingRoomsResultElementCalculation surgicalSpecialtyNumberAssignedOperatingRoomsResultElementCalculation, IΔ Δ, Iy y) { return(surgicalSpecialtyNumberAssignedOperatingRoomsFactory.Create( Δ.Value .Select(i => surgicalSpecialtyNumberAssignedOperatingRoomsResultElementCalculation.Calculate( surgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory, i, y)) .ToImmutableList())); }
public Constraints3ConstraintElement( IrIndexElement rIndexElement, IsIndexElement sIndexElement, ItIndexElement tIndexElement, Iy y, IxHat xHat) { Expression LHS = xHat.Value[sIndexElement, rIndexElement, tIndexElement]; int RHS = y.GetElementAtAsint( sIndexElement, rIndexElement); this.Value = LHS <= RHS; }
public ISurgeonNumberAssignedOperatingRooms Calculate( ISurgeonNumberAssignedOperatingRoomsResultElementFactory surgeonNumberAssignedOperatingRoomsResultElementFactory, ISurgeonNumberAssignedOperatingRoomsFactory surgeonNumberAssignedOperatingRoomsFactory, ISurgeonNumberAssignedOperatingRoomsResultElementCalculation surgeonNumberAssignedOperatingRoomsResultElementCalculation, Is s, Iy y) { return(surgeonNumberAssignedOperatingRoomsFactory.Create( s.Value .Select(w => surgeonNumberAssignedOperatingRoomsResultElementCalculation.Calculate( surgeonNumberAssignedOperatingRoomsResultElementFactory, w, y)) .ToImmutableList())); }
public ObjectiveFunction001( IObjectiveFactory objectiveFactory, Isr sr, Iy y) { Expression expression = Expression.Sum( sr.Value .Select( x => y.Value[x.sIndexElement, x.rIndexElement])); Objective objective = objectiveFactory.Create( expression, ObjectiveSense.Minimize); this.Value = objective; }
public Constraints5MConstraintElement( IrIndexElement rIndexElement, IsIndexElement sIndexElement, IB B, Ib b, Iy y) { Expression LHS = b.Value[sIndexElement, rIndexElement]; Expression RHS = B.GetElementAtAsint( sIndexElement) * y.Value[sIndexElement, rIndexElement]; this.Value = LHS <= RHS; }
public Iy Create( ImmutableList <IyParameterElement> value) { Iy parameter = null; try { parameter = new y( value); } catch (Exception exception) { this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace); } return(parameter); }
public Iy Create( VariableCollection <IsIndexElement, IrIndexElement> value) { Iy variable = null; try { variable = new y( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(variable); }
public Iy Create( ImmutableList <IyParameterElement> value) { Iy parameter = null; try { parameter = new y( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(parameter); }
public void DayMenu(List <Weather> weatherList, Inventory userInventory, Random r) { Console.Clear(); string selection = ui.SelectFromList("Please Select from the following list:", menu); switch (selection) { case "1": ui.DisplayForcast(Forcast); Console.ReadLine(); DayMenu(weatherList, userInventory, r); break; case "2": GetUserPurchase(weatherList, userInventory, r); DayMenu(weatherList, userInventory, r); break; case "3": ui.DisplayUserInventory(Iy); Console.ReadLine(); DayMenu(weatherList, userInventory, r); break; case "4": Iy.MakePitcher("Please select ingredient to make pitcher recipe"); Console.ReadLine(); DayMenu(weatherList, userInventory, r); break; case "5": //need to add method to prevent game from continuing before user has created recipe SellLemonade(r); Console.ReadLine(); break; default: Console.WriteLine("Please enter valid selection"); DayMenu(weatherList, userInventory, r); break; } Console.Clear(); }
public Iy Create( ImmutableList <IyResultElement> value) { Iy result = null; try { result = new y( value); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(result); }
public Constraints5UConstraintElement( IjIndexElement jIndexElement, IrIndexElement rIndexElement, IsIndexElement sIndexElement, Interfaces.Parameters.SurgicalSpecialtyNumberAssignedTimeBlocks.IB BBar, Interfaces.Parameters.SurgeonNumberAssignedTimeBlocks.IB Bs, Iw w, Iy y) { Expression LHS = Bs.GetElementAtAsint( sIndexElement) * y.Value[sIndexElement, rIndexElement]; Expression RHS = BBar.GetElementAtAsint( jIndexElement) * w.Value[jIndexElement, rIndexElement]; this.Value = LHS <= RHS; }
public IObjectiveFunction001 Create( IObjectiveFactory objectiveFactory, Isr sr, Iy y) { IObjectiveFunction001 objectiveFunction = null; try { objectiveFunction = new ObjectiveFunction001( objectiveFactory, sr, y); } catch (Exception exception) { this.Log.Error( exception.Message, exception); } return(objectiveFunction); }
public Constraints1ConstraintElement( ImIndexElement mIndexElement, IrIndexElement rIndexElement, Im m, Is s, Iζ ζ, Iv v, Iy y) { Expression LHS = Expression.Sum( s.Value .Select( x => y.Value[x, rIndexElement] * ζ.GetElementAtAsint( x, mIndexElement))); Expression RHS = m.GetM() * v.Value[mIndexElement, rIndexElement]; this.Value = LHS <= RHS; }
static int Gy(Iy y) { return(y.G()); }
public HM3AOutputContext( ICalculationsAbstractFactory calculationsAbstractFactory, IDependenciesAbstractFactory dependenciesAbstractFactory, IResultElementsAbstractFactory resultElementsAbstractFactory, IResultsAbstractFactory resultsAbstractFactory, IHM3AModel HM3AModel, Solution solution, HM3AEncodingEnum HM3AEncodingEnum) { // BestBound this.BestBound = resultsAbstractFactory.CreateBestBoundFactory().Create( (decimal)solution.BestBound) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // Gap this.Gap = resultsAbstractFactory.CreateGapFactory().Create( (decimal)solution.Gap) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // NumberOfExploredNodes this.NumberOfExploredNodes = resultsAbstractFactory.CreateNumberOfExploredNodesFactory().Create( solution.NumberOfExploredNodes) .GetValueForOutputContext(); // ObjectiveValue this.ObjectiveValue = resultsAbstractFactory.CreateObjectiveValueFactory().Create( (decimal)solution.ObjectiveValues.SingleOrDefault().Value) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // OverallWallTime this.OverallWallTime = resultsAbstractFactory.CreateOverallWallTimeFactory().Create( solution.OverallWallTime) .GetValueForOutputContext(); // v(m, r) this.MachineOperatingRoomAssignments = HM3AModel.v.GetElementsAt( resultElementsAbstractFactory.CreatevResultElementFactory(), resultsAbstractFactory.CreatevFactory(), HM3AModel.mr) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // w(j, r) this.SurgicalSpecialtyOperatingRoomAssignments = HM3AModel.w.GetElementsAt( resultElementsAbstractFactory.CreatewResultElementFactory(), resultsAbstractFactory.CreatewFactory(), HM3AModel.jr) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // y(s, r) Iy y = HM3AModel.y.GetElementsAt( resultElementsAbstractFactory.CreateyResultElementFactory(), resultsAbstractFactory.CreateyFactory(), HM3AModel.sr); this.SurgeonOperatingRoomAssignments = y .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // SurgeonNumberAssignedOperatingRooms this.SurgeonNumberAssignedOperatingRooms = calculationsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsCalculationFactory().Create().Calculate( resultElementsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsResultElementFactory(), resultsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsFactory(), calculationsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsResultElementCalculationFactory().Create(), HM3AModel.s, y) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // SurgicalSpecialtyNumberAssignedOperatingRooms this.SurgicalSpecialtyNumberAssignedOperatingRooms = calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsCalculationFactory().Create().Calculate( resultElementsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory(), resultsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsFactory(), calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsResultElementCalculationFactory().Create(), HM3AModel.Δ, y) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); }
public HM3BOutputContext( ICalculationsAbstractFactory calculationsAbstractFactory, IDependenciesAbstractFactory dependenciesAbstractFactory, IResultElementsAbstractFactory resultElementsAbstractFactory, IResultsAbstractFactory resultsAbstractFactory, IHM3BModel HM3BModel, Solution solution, HM3BEncodingEnum HM3BEncodingEnum) { // BestBound this.BestBound = resultsAbstractFactory.CreateBestBoundFactory().Create( (decimal)solution.BestBound) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // Gap this.Gap = resultsAbstractFactory.CreateGapFactory().Create( (decimal)solution.Gap) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // NumberOfExploredNodes this.NumberOfExploredNodes = resultsAbstractFactory.CreateNumberOfExploredNodesFactory().Create( solution.NumberOfExploredNodes) .GetValueForOutputContext(); // ObjectiveValue this.ObjectiveValue = resultsAbstractFactory.CreateObjectiveValueFactory().Create( (decimal)solution.ObjectiveValues.SingleOrDefault().Value) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // OverallWallTime this.OverallWallTime = resultsAbstractFactory.CreateOverallWallTimeFactory().Create( solution.OverallWallTime) .GetValueForOutputContext(); // x(s, r, t) Ix x = HM3BModel.x.GetElementsAt( resultElementsAbstractFactory.CreatexResultElementFactory(), resultsAbstractFactory.CreatexFactory(), HM3BModel.srt); this.SurgeonOperatingRoomDayAssignments = x .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // SurgeonNumberAssignedOperatingRooms this.SurgeonNumberAssignedOperatingRooms = calculationsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsCalculationFactory().Create().Calculate( resultElementsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsResultElementFactory(), resultsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsFactory(), calculationsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsResultElementCalculationFactory().Create(), HM3BModel.s, x) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // SurgeonNumberAssignedWeekdays this.SurgeonNumberAssignedWeekdays = calculationsAbstractFactory.CreateSurgeonNumberAssignedWeekdaysCalculationFactory().Create().Calculate( resultElementsAbstractFactory.CreateSurgeonNumberAssignedWeekdaysResultElementFactory(), resultsAbstractFactory.CreateSurgeonNumberAssignedWeekdaysFactory(), calculationsAbstractFactory.CreateSurgeonNumberAssignedWeekdaysResultElementCalculationFactory().Create(), HM3BModel.s, x) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // SurgeonScenarioNumberPatients ISurgeonScenarioNumberPatients surgeonScenarioNumberPatients = calculationsAbstractFactory.CreateSurgeonScenarioNumberPatientsCalculationFactory().Create().Calculate( resultElementsAbstractFactory.CreateSurgeonScenarioNumberPatientsResultElementFactory(), resultsAbstractFactory.CreateSurgeonScenarioNumberPatientsFactory(), calculationsAbstractFactory.CreateSurgeonScenarioNumberPatientsResultElementCalculationFactory().Create(), HM3BModel.rt, HM3BModel.sΛ, HM3BModel.n, x); this.SurgeonScenarioNumberPatients = surgeonScenarioNumberPatients.GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // SurgicalSpecialtyNumberAssignedOperatingRooms this.SurgicalSpecialtyNumberAssignedOperatingRooms = calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsCalculationFactory().Create().Calculate( resultElementsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory(), resultsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsFactory(), calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsResultElementCalculationFactory().Create(), HM3BModel.Δ, x) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // SurgicalSpecialtyNumberAssignedWeekdays this.SurgicalSpecialtyNumberAssignedWeekdays = calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedWeekdaysCalculationFactory().Create().Calculate( resultElementsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedWeekdaysResultElementFactory(), resultsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedWeekdaysFactory(), calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedWeekdaysResultElementCalculationFactory().Create(), HM3BModel.Δ, x) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // y(s, r) Iy y = HM3BEncodingEnum switch { HM3BEncodingEnum.E001 => ((IHM3B001Model)HM3BModel).y.GetElementsAt( resultElementsAbstractFactory.CreateyResultElementFactory(), resultsAbstractFactory.CreateyFactory(), ((IHM3B001Model)HM3BModel).sr), HM3BEncodingEnum.E011 => ((IHM3B011Model)HM3BModel).y.GetElementsAt( resultElementsAbstractFactory.CreateyResultElementFactory(), resultsAbstractFactory.CreateyFactory(), ((IHM3B011Model)HM3BModel).sr), HM3BEncodingEnum.E101 => ((IHM3B101Model)HM3BModel).y.GetElementsAt( resultElementsAbstractFactory.CreateyResultElementFactory(), resultsAbstractFactory.CreateyFactory(), ((IHM3B101Model)HM3BModel).sr), HM3BEncodingEnum.E111 => ((IHM3B111Model)HM3BModel).y.GetElementsAt( resultElementsAbstractFactory.CreateyResultElementFactory(), resultsAbstractFactory.CreateyFactory(), ((IHM3B111Model)HM3BModel).sr), _ => null }; if (y != null) { this.SurgeonOperatingRoomAssignments = y .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); } // z(s, t) Iz z = HM3BModel.z.GetElementsAt( resultElementsAbstractFactory.CreatezResultElementFactory(), resultsAbstractFactory.CreatezFactory(), HM3BModel.st); this.SurgeonDayAssignments = z .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // β(s, r, d) this.SurgeonOperatingRoomDayNumberAssignedTimeBlocks = HM3BModel.β.GetElementsAt( resultElementsAbstractFactory.CreateβResultElementFactory(), resultsAbstractFactory.CreateβFactory(), HM3BModel.srd) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // γ(r, t) this.OperatingRoomDayAssignedAvailabilities = HM3BModel.γ.GetElementsAt( resultElementsAbstractFactory.CreateγResultElementFactory(), resultsAbstractFactory.CreateγFactory(), HM3BModel.rt) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // ScenarioNumberPatients(Λ) this.ScenarioNumberPatients = calculationsAbstractFactory.CreateScenarioNumberPatientsCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateScenarioNumberPatientsResultElementFactory(), resultsAbstractFactory.CreateScenarioNumberPatientsFactory(), calculationsAbstractFactory.CreateScenarioNumberPatientsResultElementCalculationFactory().Create(), HM3BModel.Λ, surgeonScenarioNumberPatients) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // ExpectedValueΦ(s, l, Λ) IExpectedValueΦ expectedValueΦ = calculationsAbstractFactory.CreateExpectedValueΦCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateExpectedValueΦResultElementFactory(), resultsAbstractFactory.CreateExpectedValueΦFactory(), calculationsAbstractFactory.CreateExpectedValueΦResultElementCalculationFactory().Create(), HM3BModel.l, HM3BModel.t, HM3BModel.slΛ, HM3BModel.L, HM3BModel.p, HM3BModel.μ); // VarianceΦ(s, l, Λ) IVarianceΦ varianceΦ = calculationsAbstractFactory.CreateVarianceΦCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateVarianceΦResultElementFactory(), resultsAbstractFactory.CreateVarianceΦFactory(), calculationsAbstractFactory.CreateVarianceΦResultElementCalculationFactory().Create(), HM3BModel.l, HM3BModel.t, HM3BModel.slΛ, HM3BModel.L, HM3BModel.p, HM3BModel.μ, HM3BModel.σ); // ExpectedValueI(t, Λ) Interfaces.Results.DayScenarioRecoveryWardUtilizations.IExpectedValueI expectedValueI = calculationsAbstractFactory.CreateExpectedValueICalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateExpectedValueIResultElementFactory(), resultsAbstractFactory.CreateExpectedValueIFactory(), calculationsAbstractFactory.CreateExpectedValueIResultElementCalculationFactory().Create(), HM3BModel.l, HM3BModel.t, HM3BModel.st, HM3BModel.tΛ, expectedValueΦ, z); this.DayScenarioRecoveryWardUtilizationExpectedValues = expectedValueI .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // VarianceI(t, Λ) IVarianceI varianceI = calculationsAbstractFactory.CreateVarianceICalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateVarianceIResultElementFactory(), resultsAbstractFactory.CreateVarianceIFactory(), calculationsAbstractFactory.CreateVarianceIResultElementCalculationFactory().Create(), HM3BModel.l, HM3BModel.t, HM3BModel.st, HM3BModel.tΛ, varianceΦ, z); this.DayScenarioRecoveryWardUtilizationVariances = varianceI .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // EBS(t, Λ) IEBS EBS = calculationsAbstractFactory.CreateEBSCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateEBSResultElementFactory(), resultsAbstractFactory.CreateEBSFactory(), calculationsAbstractFactory.CreateEBSResultElementCalculationFactory().Create(), HM3BModel.tΛ, HM3BModel.Ω, expectedValueI, varianceI); this.DayScenarioExpectedBedShortages = EBS .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // TEBS(Λ) Interfaces.Results.ScenarioTotalExpectedBedShortages.ITEBS TEBS_Λ = calculationsAbstractFactory.CreateTEBSΛCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateTEBSΛResultElementFactory(), resultsAbstractFactory.CreateTEBSΛFactory(), calculationsAbstractFactory.CreateTEBSΛResultElementCalculationFactory().Create(), HM3BModel.t, HM3BModel.Λ, EBS); this.ScenarioTotalExpectedBedShortages = TEBS_Λ .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // TEBS this.TotalExpectedBedShortage = calculationsAbstractFactory.CreateTEBSCalculationFactory().Create() .Calculate( resultsAbstractFactory.CreateTEBSFactory(), HM3BModel.Λ, HM3BModel.Ρ, TEBS_Λ) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // ScenarioTotalTimes(Λ) IScenarioTotalTimes scenarioTotalTimes = calculationsAbstractFactory.CreateScenarioTotalTimesCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateScenarioTotalTimesResultElementFactory(), resultsAbstractFactory.CreateScenarioTotalTimesFactory(), calculationsAbstractFactory.CreateScenarioTotalTimesResultElementCalculationFactory().Create(), HM3BModel.Λ, HM3BModel.srt, HM3BModel.H, x); this.ScenarioTotalTimes = scenarioTotalTimes.GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // ScenarioUtilizedTimes(Λ) IScenarioUtilizedTimes scenarioUtilizedTimes = calculationsAbstractFactory.CreateScenarioUtilizedTimesCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateScenarioUtilizedTimesResultElementFactory(), resultsAbstractFactory.CreateScenarioUtilizedTimesFactory(), calculationsAbstractFactory.CreateScenarioUtilizedTimesResultElementCalculationFactory().Create(), HM3BModel.Λ, HM3BModel.srt, HM3BModel.h, HM3BModel.n, x); this.ScenarioUtilizedTimes = scenarioUtilizedTimes.GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // ScenarioUnutilizedTimes(Λ) IScenarioUnutilizedTimes scenarioUnutilizedTimes = calculationsAbstractFactory.CreateScenarioUnutilizedTimesCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateScenarioUnutilizedTimesResultElementFactory(), resultsAbstractFactory.CreateScenarioUnutilizedTimesFactory(), calculationsAbstractFactory.CreateScenarioUnutilizedTimesResultElementCalculationFactory().Create(), HM3BModel.Λ, scenarioTotalTimes, scenarioUtilizedTimes); this.ScenarioUnutilizedTimes = scenarioUnutilizedTimes.GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // ScenarioUnderutilizations(Λ) this.ScenarioUnderutilizations = calculationsAbstractFactory.CreateScenarioUnderutilizationsCalculationFactory().Create() .Calculate( resultElementsAbstractFactory.CreateScenarioUnderutilizationsResultElementFactory(), resultsAbstractFactory.CreateScenarioUnderutilizationsFactory(), calculationsAbstractFactory.CreateScenarioUnderutilizationsResultElementCalculationFactory().Create(), HM3BModel.Λ, scenarioTotalTimes, scenarioUnutilizedTimes) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); // ΦHat(s, l, Λ) this.SurgeonDayScenarioCumulativeNumberPatients = calculationsAbstractFactory.CreateΦHatCalculationFactory().Create() .Calculate( calculationsAbstractFactory.CreateExpectedValueIResultElementCalculationFactory(), calculationsAbstractFactory.CreateExpectedValueΦResultElementCalculationFactory(), calculationsAbstractFactory.CreateVarianceIResultElementCalculationFactory(), calculationsAbstractFactory.CreateVarianceΦResultElementCalculationFactory(), calculationsAbstractFactory.CreateVHatResultElementCalculationFactory(), calculationsAbstractFactory.Createυ2ResultElementCalculationFactory(), calculationsAbstractFactory.CreateΦHatResultElementCalculationFactory(), calculationsAbstractFactory.CreateExpectedValueICalculationFactory(), calculationsAbstractFactory.CreateExpectedValueΦCalculationFactory(), calculationsAbstractFactory.CreateMRNBCalculationFactory(), calculationsAbstractFactory.CreateRNBCalculationFactory(), calculationsAbstractFactory.CreatetStarCalculationFactory(), calculationsAbstractFactory.CreateVarianceICalculationFactory(), calculationsAbstractFactory.CreateVarianceΦCalculationFactory(), calculationsAbstractFactory.CreateVHatCalculationFactory(), calculationsAbstractFactory.Createυ2CalculationFactory(), dependenciesAbstractFactory.CreateNormalFactory(), resultElementsAbstractFactory.CreateExpectedValueIResultElementFactory(), resultElementsAbstractFactory.CreateExpectedValueΦResultElementFactory(), resultElementsAbstractFactory.CreateVarianceIResultElementFactory(), resultElementsAbstractFactory.CreateVarianceΦResultElementFactory(), resultElementsAbstractFactory.CreateVHatResultElementFactory(), resultElementsAbstractFactory.Createυ2ResultElementFactory(), resultElementsAbstractFactory.CreateΦHatResultElementFactory(), resultsAbstractFactory.CreateExpectedValueIFactory(), resultsAbstractFactory.CreateExpectedValueΦFactory(), resultsAbstractFactory.CreateVarianceIFactory(), resultsAbstractFactory.CreateVarianceΦFactory(), resultsAbstractFactory.CreateVHatFactory(), resultsAbstractFactory.Createυ2Factory(), resultsAbstractFactory.CreateΦHatFactory(), HM3BModel.l, HM3BModel.t, HM3BModel.Λ, HM3BModel.slΛ, HM3BModel.st, HM3BModel.tΛ, HM3BModel.L, HM3BModel.p, HM3BModel.μ, HM3BModel.σ, HM3BModel.Ω, z) .GetValueForOutputContext( dependenciesAbstractFactory.CreateNullableValueFactory()); }