示例#1
0
 public double equipmentCost(CostInfo costInfo, RoomType[] rooms, string type)
 {
     double value = 0;
     for (var i = 0; i < 6; i++) {
         if (rooms[i].included == true)
         {
             if (type == "num")
             {
                 value += costInfo.capital[i].equipment * (rooms[i].num - rooms[i].originalNum);
             }
             else if (type == "opt")
             {
                 value += costInfo.capital[i].equipment * (rooms[i].optNum - rooms[i].originalNum);
             }
         }
     }
     return value;
 }
示例#2
0
 public double initialCost(CostInfo costInfo, RoomType[] rooms, string type)
 {
     return constructionCost(costInfo, rooms, type) + equipmentCost(costInfo, rooms, type);
 }
示例#3
0
 //value at construction start
 public double costAtConstructionStart(CostInfo costInfo, RoomType[] rooms, Response[] acuityInfo, Response[] arrivalInfo, double interestRate, double growthRate, double yearsToCompletion, double yearsAhead, ResponseInt daystoRun, double[] simulationResponses, double lwbs, string type)
 {
     //Console.WriteLine(annualCost(costInfo, rooms, acuityInfo, arrivalInfo, daystoRun, simulationResponses, lwbs) * ((1 - Math.Pow((1 + growthRate) / (1 + interestRate), yearsAhead)) / ((interestRate - growthRate) * Math.Pow(1 + interestRate, yearsToCompletion))));
     double annuityOfAnnualCost = annualCost(costInfo, rooms, acuityInfo, arrivalInfo, daystoRun, simulationResponses, lwbs, type) * ((1 - Math.Pow((1 + growthRate) / (1 + interestRate), yearsAhead)) / ((interestRate - growthRate) * Math.Pow(1 + interestRate, yearsToCompletion)));
     return initialCost(costInfo,rooms, type) + annuityOfAnnualCost;
 }
示例#4
0
 public double utilityCost(CostInfo costInfo, RoomType[] rooms, string type)
 {
     double value = 0;
     for (var i = 0; i < 6; i++) {
         if (rooms[i].included == true)
         {
             if (type == "num")
             {
                 value += costInfo.utility.value * rooms[i].num * costInfo.capital[i].sqft;
             }
             else if (type == "opt")
             {
                 value += costInfo.utility.value * rooms[i].optNum * costInfo.capital[i].sqft;
             }
         }
     }
     return value;
 }
示例#5
0
 public double annualCost(CostInfo costInfo, RoomType[] rooms, Response[] acuityInfo, Response[] arrivalInfo, ResponseInt daysToRun, double[] simulationResponses, double lwbs, string type)
 {
     //System.Diagnostics.Debug.WriteLine(utilityCost(costInfo, rooms) + " " + staffCost(costInfo, rooms, simulationResponses) + " " + lwbsCost(acuityInfo, arrivalInfo, lwbs, daysToRun));
     return utilityCost(costInfo, rooms, type) + staffCost(costInfo, rooms, simulationResponses, type) + lwbsCost(acuityInfo, arrivalInfo, lwbs, daysToRun); //getUtilizationAndLWBS(rooms)
 }
示例#6
0
        //TODO: utilization - (from Simio)
        public double staffCost(CostInfo costInfo, RoomType[] rooms, double[] simulationResponses, string type)
        {
            double value = 0;
            for (var i = 0; i < 3; i++) {
                for (var j = 0; j < 6; j++) {
                    double utilization, ratio = 0;
                    //if (j == 0) { utilization = simulationResponses[j]/100; } //ExamRoomUtilization/100; }
                    //else if (j == 1) { utilization = simulationResponses[j]/100; } //TraumaUtilization/100; }
                    //else if (j == 2) { utilization = simulationResponses[j]/100; } //FastTrackUtilization/100; }
                    //else if (j == 3) { utilization = simulationResponses[j]/100; } //RapidAdmissionUnitUtilization/100; }
                    //else if (j == 4) { utilization = simulationResponses[j]/100; } //BehavioralUtilization/100; }
                    //else if (j == 5) { utilization = simulationResponses[j]/100; } //ObservationUtilization/100; }

                    utilization = simulationResponses[j]/100;

                    if (i == 2 && j == 3) { ratio = 0; }
                    else if (i == 2 && j == 4) { ratio = 0; }
                    else if (i == 2 && j == 5) { ratio = 0; }
                    else { ratio = 1.0/costInfo.labor[i].rooms[j].value; }

                    //System.Diagnostics.Debug.WriteLine(i + " " + j + " " + rooms[j].num + " " + costInfo.labor[i].wage + " " + utilization + " " + ratio);
                    //System.Diagnostics.Debug.WriteLine(i + " " + j + " " + rooms[j].optNum + " " + costInfo.labor[i].wage + " " + utilization + " " + ratio);

                    if (rooms[j].included == true)
                    {
                        if (type == "num")
                        {
                            value += rooms[j].num * costInfo.labor[i].wage * utilization * ratio;
                        }
                        else if (type == "opt")
                        {
                            value += rooms[j].optNum * costInfo.labor[i].wage * utilization * ratio;
                        }
                    }
                }
            }
            return value;
        }