//set the class properties using the XElement public virtual void SetHealthBenefit1Properties(XElement currentCalculationsElement) { if (Demographics == null) { Demographics = new Demog1(); } Demographics.SetDemog1Properties(currentCalculationsElement); //don't set any input properties; each calculator should set what's needed separately this.OutputCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cOutputCost); this.BenefitAdjustment = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cBenefitAdjustment); this.AdjustedBenefit = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cAdjustedBenefit); this.OutputEffect1Name = CalculatorHelpers.GetAttribute(currentCalculationsElement, cOutputEffect1Name); this.OutputEffect1Unit = CalculatorHelpers.GetAttribute(currentCalculationsElement, cOutputEffect1Unit); this.OutputEffect1Amount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cOutputEffect1Amount); this.OutputEffect1Price = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cOutputEffect1Price); this.OutputEffect1Cost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cOutputEffect1Cost); this.AverageBenefitRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cAverageBenefitRating); this.PhysicalHealthRating = CalculatorHelpers.GetAttributeInt(currentCalculationsElement, cPhysicalHealthRating); this.EmotionalHealthRating = CalculatorHelpers.GetAttributeInt(currentCalculationsElement, cEmotionalHealthRating); this.SocialHealthRating = CalculatorHelpers.GetAttributeInt(currentCalculationsElement, cSocialHealthRating); this.EconomicHealthRating = CalculatorHelpers.GetAttributeInt(currentCalculationsElement, cEconomicHealthRating); this.HealthCareDeliveryRating = CalculatorHelpers.GetAttributeInt(currentCalculationsElement, cHealthCareDeliveryRating); this.BeforeQOLRating = CalculatorHelpers.GetAttributeInt(currentCalculationsElement, cBeforeQOLRating); this.AfterQOLRating = CalculatorHelpers.GetAttributeInt(currentCalculationsElement, cAfterQOLRating); this.BeforeYears = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cBeforeYears); this.AfterYears = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cAfterYears); this.AfterYearsProb = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cAfterYearsProb); this.TimeTradeoffYears = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTimeTradeoffYears); this.EquityMultiplier = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cEquityMultiplier); this.BenefitAssessment = CalculatorHelpers.GetAttribute(currentCalculationsElement, cBenefitAssessment); this.QALY = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cQALY); this.ICERQALY = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cICERQALY); this.TTOQALY = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTTOQALY); this.WillDoSurvey = CalculatorHelpers.GetAttributeBool(currentCalculationsElement, cWillDoSurvey); }
public void SetTotalME2Change1Properties(ME2Change1 ind, string attNameExtension, XElement calculator) { //stats always based on indicators ind.SetTotalME2IndicatorStockProperties(ind, attNameExtension, calculator); ind.TotalME2MAmountChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MAmountChange, attNameExtension)); ind.TotalME2MPercentChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MPercentChange, attNameExtension)); ind.TotalME2MBaseChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MBaseChange, attNameExtension)); ind.TotalME2MBasePercentChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MBasePercentChange, attNameExtension)); ind.TotalME2LAmountChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LAmountChange, attNameExtension)); ind.TotalME2LPercentChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LPercentChange, attNameExtension)); ind.TotalME2LBaseChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LBaseChange, attNameExtension)); ind.TotalME2LBasePercentChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LBasePercentChange, attNameExtension)); ind.TotalME2UAmountChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UAmountChange, attNameExtension)); ind.TotalME2UPercentChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UPercentChange, attNameExtension)); ind.TotalME2UBaseChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UBaseChange, attNameExtension)); ind.TotalME2UBasePercentChange = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UBasePercentChange, attNameExtension)); }
//set the class properties using the XElement public virtual void SetTotalOutputHCStockProperties(XElement currentCalculationsElement) { this.TotalOutputCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TOutputCost); this.TotalBenefitAdjustment = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TBenefitAdjustment); this.TotalAdjustedBenefit = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdjustedBenefit); this.TotalOutputEffect1Amount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TOutputEffect1Amount); this.TotalOutputEffect1Price = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TOutputEffect1Price); this.TotalOutputEffect1Cost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TOutputEffect1Cost); this.TotalPhysicalHealthRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TPhysicalHealthRating); this.TotalEmotionalHealthRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TEmotionalHealthRating); this.TotalSocialHealthRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TSocialHealthRating); this.TotalEconomicHealthRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TEconomicHealthRating); this.TotalHealthCareDeliveryRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, THealthCareDeliveryRating); this.TotalBeforeQOLRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TBeforeQOLRating); this.TotalAfterQOLRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAfterQOLRating); this.TotalBeforeYears = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TBeforeYears); this.TotalAfterYears = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAfterYears); this.TotalAfterYearsProb = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAfterYearsProb); this.TotalTimeTradeoffYears = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TTimeTradeoffYears); this.TotalEquityMultiplier = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TEquityMultiplier); this.TotalAverageBenefitRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAverageBenefitRating); this.TotalQALY = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TQALY); this.TotalICERQALY = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TICERQALY); this.TotalTTOQALY = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TTTOQALY); }
//set the class properties using the XElement public virtual void SetLCC1Properties(XElement calculator, XElement currentElement) { this.SetCalculatorProperties(calculator); //need the aggregating params (label, groupid, typeid and Date for sorting) this.SetSharedObjectProperties(currentElement); this.SetSubPrice1sProperties(calculator); this.ServiceLifeYears = CalculatorHelpers.GetAttributeDouble(calculator, cServiceLifeYears); this.YearsFromBaseDate = CalculatorHelpers.GetAttributeDouble(calculator, cYearsFromBaseDate); this.PlanningConstructionYears = CalculatorHelpers.GetAttributeDouble(calculator, cPlanningConstructionYears); this.PerUnitAmount = CalculatorHelpers.GetAttributeDouble(calculator, cPerUnitAmount); this.PerUnitUnit = CalculatorHelpers.GetAttribute(calculator, cPerUnitUnit); this.OCTotalCost = CalculatorHelpers.GetAttributeDouble(calculator, cOCTotalCost); this.AOHTotalCost = CalculatorHelpers.GetAttributeDouble(calculator, cAOHTotalCost); this.CAPTotalCost = CalculatorHelpers.GetAttributeDouble(calculator, cCAPTotalCost); this.LCCTotalCost = CalculatorHelpers.GetAttributeDouble(calculator, cLCCTotalCost); this.EAATotalCost = CalculatorHelpers.GetAttributeDouble(calculator, cEAATotalCost); this.UnitTotalCost = CalculatorHelpers.GetAttributeDouble(calculator, cUnitTotalCost); }
//set the class properties using the XElement public virtual void SetTimelinessOC1Properties(XElement currentCalculationsElement) { this.PlannedStartDate = CalculatorHelpers.GetAttributeDate(currentCalculationsElement, cPlannedStartDate); this.ActualStartDate = CalculatorHelpers.GetAttributeDate(currentCalculationsElement, cActualStartDate); this.LaborAvailable = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cLaborAvailable); this.WorkdayProbability = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cWorkdayProbability); this.TimelinessPenalty1 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTimelinessPenalty1); this.TimelinessPenaltyDaysFromStart1 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTimelinessPenaltyDaysFromStart1); this.TimelinessPenalty2 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTimelinessPenalty2); this.TimelinessPenaltyDaysFromStart2 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTimelinessPenaltyDaysFromStart2); this.WorkdaysLimit = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cWorkdaysLimit); this.Amount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, Constants.AMOUNT); this.Unit = CalculatorHelpers.GetAttribute(currentCalculationsElement, Constants.UNIT); this.FieldCapacity = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cFieldCapacity); this.AreaCovered = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cAreaCovered); this.FieldDays = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cFieldDays); this.OutputName = CalculatorHelpers.GetAttribute(currentCalculationsElement, cOutputName); this.OutputUnit = CalculatorHelpers.GetAttribute(currentCalculationsElement, cOutputUnit); this.OutputPrice = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cOutputPrice); this.OutputYield = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cOutputYield); this.CompositionUnit = CalculatorHelpers.GetAttribute(currentCalculationsElement, cCompositionUnit); this.CompositionAmount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cCompositionAmount); this.OutputTimes = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cOutputTimes); this.ProbableFieldDays = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cProbableFieldDays); this.ProbableFinishDate = CalculatorHelpers.GetAttributeDate(currentCalculationsElement, cProbableFinishDate); this.TimelinessPenaltyCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTimelinessPenaltyCost); this.TimelinessPenaltyCostPerHour = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTimelinessPenaltyCostPerHour); this.TotalR = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, CostBenefitCalculator.TR); }
private void SetTotalSubPrice3StockProperties(SubPrice3Stock ind, string attNameExtension, XElement calculator) { ind.TotalInd1Description = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalInd1Description, attNameExtension)); ind.TotalInd1RiskType = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalInd1RiskType, attNameExtension)); ind.TotalInd1Name = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalInd1Name, attNameExtension)); ind.TotalInd1Label = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalInd1Label, attNameExtension)); ind.TotalInd1Total = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalInd1Total, attNameExtension)); ind.TotalInd1BM = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalInd1BM, attNameExtension)); ind.TotalInd1BMProg = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalInd1BMProg, attNameExtension)); ind.TotalInd1Unit = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalInd1Unit, attNameExtension)); //ind.SubP1PTDate = CalculatorHelpers.GetAttributeDate(calculator, // string.Concat(cInd1PTDate, attNameExtension)); //ind.SubP1YTDDate = CalculatorHelpers.GetAttributeDate(calculator, // string.Concat(cInd1YTDDate, attNameExtension)); ind.TotalInd1PartTarget = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalInd1PartTarget, attNameExtension)); ind.TotalInd1FullTarget = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalInd1FullTarget, attNameExtension)); ind.TotalInd1PTProg = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalInd1PTProg, attNameExtension)); ind.TotalInd1FTProg = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalInd1FTProg, attNameExtension)); }
public void SetLocalProperties(CalculatorParameters calcParameters, XElement elementWithLocals, XElement currentElement) { //the host base is based on base calculator/analyzer properties (not currentElement) this.SetSharedObjectProperties(currentElement); this.Id = CalculatorHelpers.GetAttributeInt(currentElement, Calculator1.cId); this.UnitGroupId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.UNITGROUP_ID); this.CurrencyGroupId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.CURRENCYGROUP_ID); this.RealRateId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.REAL_RATE_ID); this.NominalRateId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.NOMINAL_RATE_ID); this.RatingGroupId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.RATINGGROUP_ID); if (calcParameters.SubApplicationType == Constants.SUBAPPLICATION_TYPES.locals) { this.DataSourcePriceId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.DATASOURCEPRICE_ID); this.GeoCodePriceId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.GEOCODEPRICE_ID); this.DataSourceTechId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.DATASOURCETECH_ID); this.GeoCodeTechId = CalculatorHelpers.GetAttributeInt(elementWithLocals, DataAppHelpers.Locals.GEOCODETECH_ID); } this.RealRate = CalculatorHelpers.GetAttributeDouble(elementWithLocals, DataAppHelpers.Locals.REAL_RATE); this.NominalRate = CalculatorHelpers.GetAttributeDouble(elementWithLocals, DataAppHelpers.Locals.NOMINAL_RATE); this.InflationRate = CalculatorHelpers.GetAttributeDouble(elementWithLocals, DataAppHelpers.Locals.INFLATION_RATE); this.XmlDocElement = elementWithLocals; }
public virtual void SetTotalMachinery1StockProperties(XElement calculator) { this.TotalSalvageValue = CalculatorHelpers.GetAttributeDouble(calculator, TSalvageValue); this.TotalMarketValue = CalculatorHelpers.GetAttributeDouble(calculator, TMarketValue); this.TotalFuelAmount = CalculatorHelpers.GetAttributeDouble(calculator, TFuelAmount); this.TotalFuelPrice = CalculatorHelpers.GetAttributeDouble(calculator, TFuelPrice); this.TotalFuelCost = CalculatorHelpers.GetAttributeDouble(calculator, TFuelCost); this.TotalLubeOilAmount = CalculatorHelpers.GetAttributeDouble(calculator, TLubeOilAmount); this.TotalLubeOilPrice = CalculatorHelpers.GetAttributeDouble(calculator, TLubeOilPrice); this.TotalLubeOilCost = CalculatorHelpers.GetAttributeDouble(calculator, TLubeOilCost); this.TotalRepairCost = CalculatorHelpers.GetAttributeDouble(calculator, TRepairCost); this.TotalLaborAmount = CalculatorHelpers.GetAttributeDouble(calculator, TLaborAmount); this.TotalLaborPrice = CalculatorHelpers.GetAttributeDouble(calculator, TLaborPrice); this.TotalLaborCost = CalculatorHelpers.GetAttributeDouble(calculator, TLaborCost); this.TotalCapitalRecoveryCost = CalculatorHelpers.GetAttributeDouble(calculator, TCapitalRecoveryCost); this.TotalTaxesHousingInsuranceCost = CalculatorHelpers.GetAttributeDouble(calculator, TTaxesHousingInsuranceCost); }
public void SetTotalME2Stat1Properties(ME2Stat1 ind, string attNameExtension, XElement calculator) { //stats always based on indicators SetTotalME2IndicatorStockProperties(ind, attNameExtension, calculator); //stats ind.TME2N = CalculatorHelpers.GetAttributeInt(calculator, string.Concat(cTME2N, attNameExtension)); ind.TotalME2MMean = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MMean, attNameExtension)); ind.TotalME2MMedian = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MMedian, attNameExtension)); ind.TotalME2MVariance = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MVariance, attNameExtension)); ind.TotalME2MStandDev = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2MStandDev, attNameExtension)); ind.TotalME2LMean = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LMean, attNameExtension)); ind.TotalME2LMedian = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LMedian, attNameExtension)); ind.TotalME2LVariance = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LVariance, attNameExtension)); ind.TotalME2LStandDev = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2LStandDev, attNameExtension)); ind.TotalME2UMean = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UMean, attNameExtension)); ind.TotalME2UMedian = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UMedian, attNameExtension)); ind.TotalME2UVariance = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UVariance, attNameExtension)); ind.TotalME2UStandDev = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalME2UStandDev, attNameExtension)); }
//set the class properties using the XElement public void SetBudgetInvestmentProperties(CalculatorParameters calcParameters, XElement currentCalculationsElement, XElement currentElement) { //several extensions store some calculator props in base element (observations, targettype) //no harm done in setting them but never set their attributes in base element this.SetCalculatorProperties(currentCalculationsElement); this.SetSharedObjectProperties(currentElement); this.SetTotalBenefitsProperties(currentElement); this.SetTotalCostsProperties(currentElement); //this.Id = CalculatorHelpers.GetAttributeInt(currentElement, Calculator1.cId); this.InitialValue = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.Prices.INITIAL_VALUE); this.SalvageValue = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.Prices.SALVAGE_VALUE); this.InvestmentEAA = CalculatorHelpers.GetAttributeDouble(currentElement, INVESTMENTEAA); this.Local = new Local(); //can't use calcParams.CurrentElementURIPattern because also gets set from ancestors string sCurrentNodeURIPattern = CalculatorHelpers.MakeNewURIPatternFromElement( calcParameters.ExtensionDocToCalcURI.URIPattern, currentElement); this.Local = CalculatorHelpers.GetLocal(sCurrentNodeURIPattern, calcParameters, currentCalculationsElement, currentElement); this.XmlDocElement = currentCalculationsElement; }
public void SetOutputProperties(XElement currentElement) { this.SetSharedObjectProperties(currentElement); this.SetTotalBenefitsProperties(currentElement); this.AnnuityType = TimePeriod.GetAnnuityType(currentElement); this.Amount = CalculatorHelpers.GetAttributeDouble(currentElement, OUTPUT_AMOUNT); this.Price = CalculatorHelpers.GetAttributeDouble(currentElement, OUTPUT_PRICE); this.Date = CalculatorHelpers.GetAttributeDate(currentElement, OUTPUT_DATE); this.Unit = CalculatorHelpers.GetAttribute(currentElement, OUTPUT_BASE_UNIT); this.CompositionAmount = CalculatorHelpers.GetAttributeDouble(currentElement, COMPOSITION_AMOUNT); this.CompositionUnit = CalculatorHelpers.GetAttribute(currentElement, COMPOSITION_UNIT); this.Times = CalculatorHelpers.GetAttributeDouble(currentElement, OUTPUT_TIMES); this.IncentiveAmount = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.General.INCENTIVE_AMOUNT); this.IncentiveRate = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.General.INCENTIVE_RATE); this.OutputGroupId = CalculatorHelpers.GetAttributeInt(currentElement, DataAppHelpers.Prices.OUTPUT_GROUP_ID); this.OutputGroupName = CalculatorHelpers.GetAttribute(currentElement, DataAppHelpers.Prices.OUTPUT_GROUP_NAME); }
public virtual void SetGeneralCapital1InputProperties(XElement calculator) { //set this object's properties this.EnergyUseHr = CalculatorHelpers.GetAttributeDouble(calculator, cEnergyUseHr); this.EnergyEffTypical = CalculatorHelpers.GetAttributeDouble(calculator, cEnergyEffTypical); }
private void SetStatistic02Properties(Statistic02 stat, string attNameExtension, XElement calculator) { stat.Amount = CalculatorHelpers.GetAttributeDouble(calculator, cAmount); stat.Likelihood = CalculatorHelpers.GetAttributeDouble(calculator, cLikelihood); }
public void SetTimelinessBaseProperties(XElement currentElement) { //need some base props to be displayed in calculator //opcomp.amount this.Amount = CalculatorHelpers.GetAttributeDouble(currentElement, Constants.AMOUNT); //opcomp.unit this.Unit = CalculatorHelpers.GetAttribute(currentElement, Constants.UNIT); }
//set the class properties using the XElement public virtual void SetTotalFNSR01StockProperties(XElement currentCalculationsElement) { //set the calculator properties this.TotalMarketValue = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TMarketValue); this.TotalContainerSizeUsingServingSizeUnit = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TContainerSizeUsingServingSizeUnit); this.TotalServingCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TServingCost); this.TotalActualServingSize = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TActualServingSize); this.TotalTypicalServingsPerContainer = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TTypicalServingsPerContainer); this.TotalActualServingsPerContainer = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TActualServingsPerContainer); this.TotalTypicalServingSize = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TTypicalServingSize); this.TotalWater_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TWater_g); this.TotalEnerg_Kcal = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TEnerg_Kcal); this.TotalProtein_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TProtein_g); this.TotalLipid_Tot_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TLipid_Tot_g); this.TotalAsh_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAsh_g); this.TotalCarbohydrt_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCarbohydrt_g); this.TotalFiber_TD_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFiber_TD_g); this.TotalSugar_Tot_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TSugar_Tot_g); this.TotalCalcium_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCalcium_mg); this.TotalIron_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TIron_mg); this.TotalMagnesium_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TMagnesium_mg); this.TotalPhosphorus_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TPhosphorus_mg); this.TotalPotassium_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TPotassium_mg); this.TotalSodium_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TSodium_mg); this.TotalZinc_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TZinc_mg); this.TotalCopper_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCopper_mg); this.TotalManganese_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TManganese_mg); this.TotalSelenium_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TSelenium_pg); this.TotalVit_C_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_C_mg); this.TotalThiamin_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TThiamin_mg); this.TotalRiboflavin_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TRiboflavin_mg); this.TotalNiacin_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TNiacin_mg); this.TotalPanto_Acid_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TPanto_Acid_mg); this.TotalVit_B6_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_B6_mg); this.TotalFolate_Tot_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFolate_Tot_pg); this.TotalFolic_Acid_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFolic_Acid_pg); this.TotalFood_Folate_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFood_Folate_pg); this.TotalFolate_DFE_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFolate_DFE_pg); this.TotalCholine_Tot_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCholine_Tot_mg); this.TotalVit_B12_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_B12_pg); this.TotalVit_A_IU = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_A_IU); this.TotalVit_A_RAE = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_A_RAE); this.TotalRetinol_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TRetinol_pg); this.TotalAlpha_Carot_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAlpha_Carot_pg); this.TotalBeta_Carot_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TBeta_Carot_pg); this.TotalBeta_Crypt_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TBeta_Crypt_pg); this.TotalLycopene_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TLycopene_pg); this.TotalLut_Zea_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TLut_Zea_pg); this.TotalVit_E_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_E_mg); this.TotalVit_D_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_D_pg); this.TotalViVit_D_IU = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TViVit_D_IU); this.TotalVit_K_pg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TVit_K_pg); this.TotalFA_Sat_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFA_Sat_g); this.TotalFA_Mono_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFA_Mono_g); this.TotalFA_Poly_g = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TFA_Poly_g); this.TotalCholestrl_mg = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCholestrl_mg); }
public virtual void SetTotalGeneralCapital1StockProperties(XElement calculator) { this.TotalEnergyEffTypical = CalculatorHelpers.GetAttributeDouble(calculator, TEnergyEffTypical); this.TotalEnergyUseHr = CalculatorHelpers.GetAttributeDouble(calculator, TEnergyUseHr); this.TotalRandMPercent = CalculatorHelpers.GetAttributeDouble(calculator, TRandMPercent); }
public virtual void SetMachinery1InputProperties(XElement calculator) { //set this object's properties this.MarketValue = CalculatorHelpers.GetAttributeDouble(calculator, cMarketValue); this.ListPriceAdj = CalculatorHelpers.GetAttributeDouble(calculator, cListPriceAdj); this.SalvageValue = CalculatorHelpers.GetAttributeDouble(calculator, cSalvageValue); this.FuelAmount = CalculatorHelpers.GetAttributeDouble(calculator, cFuelAmount); this.FuelUnit = CalculatorHelpers.GetAttribute(calculator, cFuelUnit); this.FuelPrice = CalculatorHelpers.GetAttributeDouble(calculator, cFuelPrice); this.FuelCost = CalculatorHelpers.GetAttributeDouble(calculator, cFuelCost); this.LubeOilAmount = CalculatorHelpers.GetAttributeDouble(calculator, cLubeOilAmount); this.LubeOilUnit = CalculatorHelpers.GetAttribute(calculator, cLubeOilUnit); this.LubeOilPrice = CalculatorHelpers.GetAttributeDouble(calculator, cLubeOilPrice); this.LubeOilCost = CalculatorHelpers.GetAttributeDouble(calculator, cLubeOilCost); this.RepairCost = CalculatorHelpers.GetAttributeDouble(calculator, cRepairCost); this.LaborAmount = CalculatorHelpers.GetAttributeDouble(calculator, cLaborAmount); this.LaborUnit = CalculatorHelpers.GetAttribute(calculator, cLaborUnit); this.LaborPrice = CalculatorHelpers.GetAttributeDouble(calculator, cLaborPrice); this.LaborCost = CalculatorHelpers.GetAttributeDouble(calculator, cLaborCost); this.ServiceUnits = CalculatorHelpers.GetAttribute(calculator, cServiceUnits); this.ServiceCapacityUnits = CalculatorHelpers.GetAttribute(calculator, cServiceCapacityUnits); this.CapitalRecoveryCost = CalculatorHelpers.GetAttributeDouble(calculator, cCapitalRecoveryCost); this.TaxesHousingInsuranceCost = CalculatorHelpers.GetAttributeDouble(calculator, cTaxesHousingInsuranceCost); this.OptionForCapacity = CalculatorHelpers.GetAttributeInt(calculator, cOptionForCapacity); this.OptionForInflation = CalculatorHelpers.GetAttributeInt(calculator, cOptionForInflation); this.OptionForTime = CalculatorHelpers.GetAttributeInt(calculator, cOptionForTime); this.OptionForFuel = CalculatorHelpers.GetAttributeInt(calculator, cOptionForFuel); this.LaborAmountAdj = CalculatorHelpers.GetAttributeDouble(calculator, cLaborAmountAdj); }
public void SetCapital1ConstantProperties(XElement currentCalculationsElement) { this.RandMPercent = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cRandMPercent); this.ReplacementCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cReplacementCost); this.TotalReplacementCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cTotalReplacementCost); this.ReplacementYrsFromBaseDate = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cReplacementYrsFromBaseDate); }
//set the class properties using the XElement public virtual void SetDemog1Properties(XElement currentCalculationsElement) { //don't set any input properties; each calculator should set what's needed separately this.Age = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cAge); this.EducationYears = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, cEducationYears); this.Race = CalculatorHelpers.GetAttribute(currentCalculationsElement, cRace); this.Housing = CalculatorHelpers.GetAttribute(currentCalculationsElement, cHousing); this.Gender = CalculatorHelpers.GetAttribute(currentCalculationsElement, cGender); this.WorkStatus = CalculatorHelpers.GetAttribute(currentCalculationsElement, cWorkStatus); this.MaritalStatus = CalculatorHelpers.GetAttribute(currentCalculationsElement, cMaritalStatus); this.LocationId = CalculatorHelpers.GetAttribute(currentCalculationsElement, cLocationId); }
private void SetSubPrice3Properties(SubPrice3 subP, string attNameExtension, XElement calculator) { //set this object's properties subP.SubPName = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPName, attNameExtension)); subP.SubPDescription = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPDescription, attNameExtension)); subP.SubPLabel = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPLabel, attNameExtension)); subP.SubPAltType = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPAltType, attNameExtension)); subP.SubPType = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPType, attNameExtension)); subP.SubPAmount = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPAmount, attNameExtension)); subP.SubPUnit = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPUnit, attNameExtension)); subP.SubPPrice = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPPrice, attNameExtension)); subP.SubPFactor = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPFactor, attNameExtension)); subP.SubPYears = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPYears, attNameExtension)); subP.SubPEscRate = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPEscRate, attNameExtension)); subP.SubPEscType = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPEscType, attNameExtension)); subP.SubPTotal = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPTotal, attNameExtension)); subP.SubPTotalPerUnit = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPTotalPerUnit, attNameExtension)); subP.SubPDistType = CalculatorHelpers.GetAttribute(calculator, string.Concat(cSubPDistType, attNameExtension)); subP.SubPAmountB = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPAmountB, attNameExtension)); subP.SubPPriceB = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPPriceB, attNameExtension)); subP.SubPEscRateB = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPEscRateB, attNameExtension)); subP.SubPTotalB = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPTotalB, attNameExtension)); subP.SubPAmountC = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPAmountC, attNameExtension)); subP.SubPPriceC = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPPriceC, attNameExtension)); subP.SubPEscRateC = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPEscRateC, attNameExtension)); subP.SubPTotalC = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cSubPTotalC, attNameExtension)); }
//set the class properties using the XElement public void SetOperationComponentProperties(CalculatorParameters calcParameters, XElement currentCalculationsElement, XElement currentElement) { //several extensions store some calculator props in base element (observations, targettype) //no harm done in setting them but never set their attributes in base element this.SetCalculatorProperties(currentCalculationsElement); this.SetSharedObjectProperties(currentElement); this.SetTotalCostsProperties(currentElement); this.AnnuityType = TimePeriod.GetAnnuityType(currentElement); if (currentElement.Name.LocalName != DataAppHelpers.Prices.OPERATION_PRICE_TYPES.operationgroup.ToString() && currentElement.Name.LocalName != DataAppHelpers.Prices.COMPONENT_PRICE_TYPES.componentgroup.ToString()) { this.Amount = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.General.AMOUNT); this.Date = CalculatorHelpers.GetAttributeDate(currentElement, ENDOFPERIOD_DATE); this.Unit = CalculatorHelpers.GetAttribute(currentElement, DataAppHelpers.General.UNIT); this.Weight = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.Prices.WEIGHT); this.EffectiveLife = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.Prices.EFFECTIVE_LIFE); this.SalvageValue = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.Prices.SALVAGE_VALUE); this.IncentiveAmount = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.General.INCENTIVE_AMOUNT); this.IncentiveRate = CalculatorHelpers.GetAttributeDouble(currentElement, DataAppHelpers.General.INCENTIVE_RATE); if (this.SubApplicationType == Constants.SUBAPPLICATION_TYPES.budgets.ToString()) { this.TimePeriodId = CalculatorHelpers.GetAttributeInt(currentElement, DataAppHelpers.Economics1.BUDGETSYSTEM_TO_TIME_ID); } else if (this.SubApplicationType == Constants.SUBAPPLICATION_TYPES.investments.ToString()) { this.TimePeriodId = CalculatorHelpers.GetAttributeInt(currentElement, DataAppHelpers.Economics1.COSTSYSTEM_TO_TIME_ID); } } this.AnnuityCount = 0; this.Local = new Local(); string sCurrentNodeURIPattern = CalculatorHelpers.MakeNewURIPatternFromElement( calcParameters.ExtensionDocToCalcURI.URIPattern, currentElement); this.Local = CalculatorHelpers.GetLocal(sCurrentNodeURIPattern, calcParameters, currentCalculationsElement, currentElement); this.XmlDocElement = currentCalculationsElement; }
public bool ElementHasGoodLocals(XElement elementWithLocals) { bool bHasGoodLocals = false; double RealRate = CalculatorHelpers.GetAttributeDouble(elementWithLocals, DataAppHelpers.Locals.REAL_RATE); double NominalRate = CalculatorHelpers.GetAttributeDouble(elementWithLocals, DataAppHelpers.Locals.NOMINAL_RATE); if (RealRate != 0 && NominalRate != 0) { bHasGoodLocals = true; } return(bHasGoodLocals); }
public virtual void SetTotalMachinery1ConstantProperties(XElement calculator) { this.TotalPriceDiesel = CalculatorHelpers.GetAttributeDouble(calculator, TPriceDiesel); this.TotalPriceGas = CalculatorHelpers.GetAttributeDouble(calculator, TPriceGas); this.TotalPriceLP = CalculatorHelpers.GetAttributeDouble(calculator, TPriceLP); this.TotalPriceElectric = CalculatorHelpers.GetAttributeDouble(calculator, TPriceElectric); this.TotalPriceNG = CalculatorHelpers.GetAttributeDouble(calculator, TPriceNG); this.TotalPriceOil = CalculatorHelpers.GetAttributeDouble(calculator, TPriceOil); this.TotalPriceRegularLabor = CalculatorHelpers.GetAttributeDouble(calculator, TPriceRegularLabor); this.TotalPriceMachineryLabor = CalculatorHelpers.GetAttributeDouble(calculator, TPriceMachineryLabor); this.TotalPriceSupervisorLabor = CalculatorHelpers.GetAttributeDouble(calculator, TPriceSupervisorLabor); this.TotalStartingHrs = CalculatorHelpers.GetAttributeDouble(calculator, TStartingHrs); this.TotalPlannedUseHrs = CalculatorHelpers.GetAttributeDouble(calculator, TPlannedUseHrs); this.TotalUsefulLifeHrs = CalculatorHelpers.GetAttributeDouble(calculator, TUsefulLifeHrs); this.TotalHousingPercent = CalculatorHelpers.GetAttributeDouble(calculator, THousingPercent); this.TotalTaxPercent = CalculatorHelpers.GetAttributeDouble(calculator, TTaxPercent); this.TotalInsurePercent = CalculatorHelpers.GetAttributeDouble(calculator, TInsurePercent); this.TotalSpeed = CalculatorHelpers.GetAttributeDouble(calculator, TSpeed); this.TotalWidth = CalculatorHelpers.GetAttributeDouble(calculator, TWidth); this.TotalHorsepower = CalculatorHelpers.GetAttributeDouble(calculator, THorsepower); this.TotalHPPTOEquiv = CalculatorHelpers.GetAttributeDouble(calculator, THPPTOEquiv); this.TotalFieldEffTypical = CalculatorHelpers.GetAttributeDouble(calculator, TFieldEffTypical); }
public void SetTotalNPV1Stat1Properties(NPV1Stat1 ind, string attNameExtension, XElement calculator) { ind.SetTotalBenefitsSummaryProperties(attNameExtension, calculator); ind.SetTotalCostsSummaryProperties(attNameExtension, calculator); ind.SetMeanBenefitsProperties(calculator); ind.SetMeanCostsProperties(calculator); ind.SetMedianBenefitsProperties(calculator); ind.SetMedianCostsProperties(calculator); ind.SetVarianceBenefitsProperties(calculator); ind.SetVarianceCostsProperties(calculator); ind.SetStdDevBenefitsProperties(calculator); ind.SetStdDevCostsProperties(calculator); ind.TotalCostN = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(TCostN, attNameExtension)); ind.TotalBenefitN = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(TBenefitN, attNameExtension)); }
//set the class properties using the XElement public virtual void SetTotalInputHCStockProperties(XElement currentCalculationsElement) { this.TotalBasePrice = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TBasePrice); this.TotalBasePriceAdjustment = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TBasePriceAdjustment); this.TotalAdjustedPrice = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdjustedPrice); this.TotalContractedPrice = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TContractedPrice); this.TotalListPrice = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TListPrice); this.TotalMarketPrice = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TMarketPrice); this.TotalProductionCostPrice = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TProductionCostPrice); this.TotalAnnualPremium1 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAnnualPremium1); this.TotalAnnualPremium2 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAnnualPremium2); this.TotalAssignedPremiumCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAssignedPremiumCost); this.TotalAdditionalPrice1 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdditionalPrice1); this.TotalAdditionalAmount1 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdditionalAmount1); this.TotalAdditionalCost1 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdditionalCost1); this.TotalAdditionalPrice2 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdditionalPrice2); this.TotalAdditionalAmount2 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdditionalAmount2); this.TotalAdditionalCost2 = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdditionalCost2); this.TotalHealthCareProviderCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, THealthCareProviderCost); this.TotalAdditionalCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TAdditionalCost); this.TotalKnowledgeTransferRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TKnowledgeTransferRating); this.TotalConstrainedChoiceRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TConstrainedChoiceRating); this.TotalCoPay1Amount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCoPay1Amount); this.TotalCoPay1Rate = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCoPay1Rate); this.TotalCoPay2Amount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCoPay2Amount); this.TotalCoPay2Rate = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCoPay2Rate); this.TotalIncentive1Amount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TIncentive1Amount); this.TotalIncentive1Rate = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TIncentive1Rate); this.TotalIncentive2Amount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TIncentive2Amount); this.TotalIncentive2Rate = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TIncentive2Rate); this.TotalInsuranceProviderCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TInsuranceProviderCost); this.TotalIncentivesCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TIncentivesCost); this.TotalReceiverCost = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TReceiverCost); this.TotalDiagnosisQualityRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TDiagnosisQualityRating); this.TotalTreatmentQualityRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TTreatmentQualityRating); this.TotalTreatmentBenefitRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TTreatmentBenefitRating); this.TotalTreatmentCostRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TTreatmentCostRating); this.TotalInsuranceCoverageRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TInsuranceCoverageRating); this.TotalCostRating = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, TCostRating); }
private void SetStatistic01Properties(Statistic01 stat, string attNameExtension, XElement calculator) { stat.Total = CalculatorHelpers.GetAttributeDouble(calculator, cTotal); stat.Mean = CalculatorHelpers.GetAttributeDouble(calculator, cMean); stat.Variance = CalculatorHelpers.GetAttributeDouble(calculator, cVariance); stat.StandardDeviation = CalculatorHelpers.GetAttributeDouble(calculator, cStandardDeviation); stat.Median = CalculatorHelpers.GetAttributeDouble(calculator, cMedian); stat.Observations = CalculatorHelpers.GetAttributeDouble(calculator, cObservations); stat.CI5Percent = CalculatorHelpers.GetAttributeDouble(calculator, cCI5Percent); stat.CI95Percent = CalculatorHelpers.GetAttributeDouble(calculator, cCI95Percent); }
private void SetTotalSubPrice2StockProperties(SubPrice2Stock ind, string attNameExtension, XElement calculator) { ind.TotalSubP2Description = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalSubP2Description, attNameExtension)); ind.TotalSubP2Name = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalSubP2Name, attNameExtension)); ind.TotalSubP2Label = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalSubP2Label, attNameExtension)); ind.TotalSubP2Total = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalSubP2Total, attNameExtension)); ind.TotalSubP2TotalPerUnit = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalSubP2TotalPerUnit, attNameExtension)); ind.TotalSubP2Price = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalSubP2Price, attNameExtension)); ind.TotalSubP2Unit = CalculatorHelpers.GetAttribute(calculator, string.Concat(cTotalSubP2Unit, attNameExtension)); ind.TotalSubP2Amount = CalculatorHelpers.GetAttributeDouble(calculator, string.Concat(cTotalSubP2Amount, attNameExtension)); }
public void SetOutputDiscountedProperties(CalculatorParameters calcParameters, XElement currentCalculationsElement, XElement currentElement) { //set the base output properties SetOutputProperties(calcParameters, currentCalculationsElement, currentElement); this.CompositionAmount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, COMPOSITION_AMOUNT); this.CompositionUnit = CalculatorHelpers.GetAttribute(currentCalculationsElement, COMPOSITION_UNIT); this.IncentiveAmount = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, Constants.INCENTIVE_AMOUNT); this.IncentiveRate = CalculatorHelpers.GetAttributeDouble(currentCalculationsElement, Constants.INCENTIVE_RATE); //set the calculator properties this.IsDiscounted = CalculatorHelpers.GetAttributeBool(currentCalculationsElement, BudgetInvestment.ISDISCOUNTED); this.EndOfPeriodDate = CalculatorHelpers.GetAttributeDate(currentCalculationsElement, OperationComponent.ENDOFPERIOD_DATE); }
public virtual void SetTotalMachinery2StockProperties(XElement calculator) { this.TotalAmount = CalculatorHelpers.GetAttributeDouble(calculator, TAmount); this.TotalWorkdayProbability = CalculatorHelpers.GetAttributeDouble(calculator, TWorkdayProbability); this.TotalLaborAvailable = CalculatorHelpers.GetAttributeDouble(calculator, TLaborAvailable); this.TotalTimelinessPenalty1 = CalculatorHelpers.GetAttributeDouble(calculator, TTimelinessPenalty1); this.TotalTimelinessPenaltyDaysFromStart1 = CalculatorHelpers.GetAttributeDouble(calculator, TTimelinessPenaltyDaysFromStart1); this.TotalTimelinessPenalty2 = CalculatorHelpers.GetAttributeDouble(calculator, TTimelinessPenalty2); this.TotalTimelinessPenaltyDaysFromStart2 = CalculatorHelpers.GetAttributeDouble(calculator, TTimelinessPenaltyDaysFromStart2); this.TotalWorkdaysLimit = CalculatorHelpers.GetAttributeDouble(calculator, TTotalWorkdaysLimit); this.TotalFieldCapacity = CalculatorHelpers.GetAttributeDouble(calculator, TFieldCapacity); this.TotalAreaCovered = CalculatorHelpers.GetAttributeDouble(calculator, TAreaCovered); this.TotalFieldDays = CalculatorHelpers.GetAttributeDouble(calculator, TFieldDays); this.TotalOutputPrice = CalculatorHelpers.GetAttributeDouble(calculator, TOutputPrice); this.TotalOutputYield = CalculatorHelpers.GetAttributeDouble(calculator, TOutputYield); this.TotalCompositionAmount = CalculatorHelpers.GetAttributeDouble(calculator, TCompositionAmount); this.TotalOutputTimes = CalculatorHelpers.GetAttributeDouble(calculator, TOutputTimes); this.TotalProbableFieldDays = CalculatorHelpers.GetAttributeDouble(calculator, TProbableFieldDays); this.TotalTimelinessPenaltyCost = CalculatorHelpers.GetAttributeDouble(calculator, TTimelinessPenaltyCost); this.TotalTimelinessPenaltyCostPerHour = CalculatorHelpers.GetAttributeDouble(calculator, TTimelinessPenaltyCostPerHour); this.TotalR = CalculatorHelpers.GetAttributeDouble(calculator, CostBenefitCalculator.TR); }
public virtual void SetTotalIrrPower1StockProperties(XElement calculator) { this.TotalEngineEfficiency = CalculatorHelpers.GetAttributeDouble(calculator, TEngineEfficiency); this.TotalFuelConsumptionPerHour = CalculatorHelpers.GetAttributeDouble(calculator, TFuelConsumptionPerHour); this.TotalWaterHP = CalculatorHelpers.GetAttributeDouble(calculator, TWaterHP); this.TotalBrakeHP = CalculatorHelpers.GetAttributeDouble(calculator, TBrakeHP); this.TotalFlowRate = CalculatorHelpers.GetAttributeDouble(calculator, TFlowRate); this.TotalStaticHead = CalculatorHelpers.GetAttributeDouble(calculator, TStaticHead); this.TotalPressureHead = CalculatorHelpers.GetAttributeDouble(calculator, TPressureHead); this.TotalFrictionHead = CalculatorHelpers.GetAttributeDouble(calculator, TFrictionHead); this.TotalOtherHead = CalculatorHelpers.GetAttributeDouble(calculator, TOtherHead); this.TotalPumpEfficiency = CalculatorHelpers.GetAttributeDouble(calculator, TPumpEfficiency); this.TotalGearDriveEfficiency = CalculatorHelpers.GetAttributeDouble(calculator, TGearDriveEfficiency); this.TotalExtraPower1 = CalculatorHelpers.GetAttributeDouble(calculator, TExtraPower1); this.TotalExtraPower2 = CalculatorHelpers.GetAttributeDouble(calculator, TExtraPower2); this.TotalEnergyExtraCostPerNetAcOrHa = CalculatorHelpers.GetAttributeDouble(calculator, TEnergyExtraCostPerNetAcOrHa); this.TotalEnergyExtraCost = CalculatorHelpers.GetAttributeDouble(calculator, TEnergyExtraCost); this.TotalPumpCapacity = CalculatorHelpers.GetAttributeDouble(calculator, TPumpCapacity); this.TotalEngineFlywheelPower = CalculatorHelpers.GetAttributeDouble(calculator, TEngineFlywheelPower); this.TotalFuelAmountRequired = CalculatorHelpers.GetAttributeDouble(calculator, TFuelAmountRequired); this.TotalPumpingPlantPerformance = CalculatorHelpers.GetAttributeDouble(calculator, TPumpingPlantPerformance); this.TotalSeasonWaterNeed = CalculatorHelpers.GetAttributeDouble(calculator, TSeasonWaterNeed); this.TotalSeasonWaterExtraCredit = CalculatorHelpers.GetAttributeDouble(calculator, TSeasonWaterExtraCredit); this.TotalSeasonWaterExtraDebit = CalculatorHelpers.GetAttributeDouble(calculator, TSeasonWaterExtraDebit); this.TotalWaterPrice = CalculatorHelpers.GetAttributeDouble(calculator, TWaterPrice); this.TotalDistributionUniformity = CalculatorHelpers.GetAttributeDouble(calculator, TDistributionUniformity); this.TotalSeasonWaterApplied = CalculatorHelpers.GetAttributeDouble(calculator, TSeasonWaterApplied); this.TotalWaterCost = CalculatorHelpers.GetAttributeDouble(calculator, TWaterCost); this.TotalPumpHoursPerUnitArea = CalculatorHelpers.GetAttributeDouble(calculator, TPumpHoursPerUnitArea); this.TotalIrrigationTimes = CalculatorHelpers.GetAttributeDouble(calculator, TIrrigationTimes); this.TotalIrrigationDurationPerSet = CalculatorHelpers.GetAttributeDouble(calculator, TIrrigationDurationPerSet); this.TotalIrrigationDurationLaborHoursPerSet = CalculatorHelpers.GetAttributeDouble(calculator, TIrrigationDurationLaborHoursPerSet); this.TotalIrrigationNetArea = CalculatorHelpers.GetAttributeDouble(calculator, TIrrigationNetArea); this.TotalEquipmentLaborAmount = CalculatorHelpers.GetAttributeDouble(calculator, TEquipmentLaborAmount); this.TotalEquipmentLaborCost = CalculatorHelpers.GetAttributeDouble(calculator, TEquipmentLaborCost); this.TotalRepairCostsPerNetAcOrHa = CalculatorHelpers.GetAttributeDouble(calculator, TRepairCostsPerNetAcOrHa); this.TotalRandMPercent = CalculatorHelpers.GetAttributeDouble(calculator, TRandMPercent); }