private Prosumer MakeSlpProfile([NotNull] Household household, [NotNull] Hausanschluss ha) { var slpprofile = _slpProvider.Run("H0", household.EffectiveEnergyDemand); if (slpprofile == null) { throw new FlaException("No profile? Why?"); } var prosumer = new Prosumer(household.HouseGuid, household.Name, HouseComponentType.Household, household.SourceGuid, household.FinalIsn, household.HausAnschlussGuid, ha.ObjectID, GenerationOrLoad.Load, ha.Trafokreis, Name + " - SLP H0 Substitute Profile", "H0") { Profile = slpprofile }; return(prosumer); }
private Profile GetCorrectProfile(BusinessType beBusinessType, double targetEnergy, [NotNull] BusinessEntry be) { var overrideEntry = _repository.GetEntry(be.ComplexName, be.BusinessName, be.Standort); if (overrideEntry != null) { _usedProfileOverrides.Add(overrideEntry); if (overrideEntry.ProfileName.ToLower() == "flat") { return(Profile.MakeConstantProfile(targetEnergy, "Flat", Profile.ProfileResolution.QuarterHour)); } return(_slpProvider.Run(overrideEntry.ProfileName, targetEnergy)); } switch (beBusinessType) { case BusinessType.Büro: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Shop: return(_slpProvider.Run("G4", targetEnergy)); case BusinessType.Werkstatt: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Seniorenheim: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Restaurant: return(_slpProvider.Run("G2", targetEnergy)); case BusinessType.Bäckerei: return(_slpProvider.Run("G5", targetEnergy)); case BusinessType.Industrie: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Sonstiges: return(_slpProvider.Run("G0", targetEnergy)); case BusinessType.Praxis: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Kirche: return(_slpProvider.Run("G6", targetEnergy)); case BusinessType.Schule: return(_slpProvider.Run("G1", targetEnergy)); case BusinessType.Tankstelle: return(_slpProvider.Run("G4", targetEnergy)); case BusinessType.Wasserversorgung: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Brauerei: return(Profile.MakeConstantProfile(targetEnergy, "Flat", Profile.ProfileResolution.QuarterHour)); case BusinessType.Hotel: return(_slpProvider.Run("G0", targetEnergy)); case BusinessType.Museum: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Hallenbad: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Eissport: return(_slpProvider.Run("G3", targetEnergy)); case BusinessType.Mobilfunk: return(Profile.MakeConstantProfile(targetEnergy, "Flat", Profile.ProfileResolution.QuarterHour)); case BusinessType.Unknown: throw new ArgumentOutOfRangeException(nameof(beBusinessType), beBusinessType, null); default: throw new ArgumentOutOfRangeException(nameof(beBusinessType), beBusinessType, null); } }