public A01_Houses([NotNull] ServiceRepository services)
     : base("A01_Houses", Stage.ScenarioCreation, 100, services, false, new HouseCharts())
 {
     DevelopmentStatus.Add("Destroy houses");
     DevelopmentStatus.Add("Build new Houses");
     DevelopmentStatus.Add("add households to existing houses");
 }
Example #2
0
 public A02_Households([NotNull] ServiceRepository services)
     : base(nameof(A02_Households), Stage.ScenarioCreation, 101,
            services, false, new HouseholdCharts())
 {
     DevelopmentStatus.Add("add additional households to the existing houses");
     DevelopmentStatus.Add("Remove emigrating households");
 }
 public B_AddLastgangMessungen([NotNull] ServiceRepository services)
     : base(nameof(B_AddLastgangMessungen), Stage.ProfileGeneration, 200, services, false)
 {
     DevelopmentStatus.Add("//todo: adjust with new factors, for example more efficient business");
     DevelopmentStatus.Add("//todo: adjust with new factors");
     DevelopmentStatus.Add("//todo: deal properly with houses with multiple isns");
 }
 public G_DHWSystemChanger([NotNull] ServiceRepository services)
     : base(nameof(G_DHWSystemChanger), Stage.ScenarioCreation, 700, services,
            false)
 {
     DevelopmentStatus.Add("//todo: are other heating systems being replaced too?");
     DevelopmentStatus.Add("This is not implemented");
 }
Example #5
0
 public C_OccupantAllocator([NotNull] ServiceRepository services)
     : base(nameof(C_OccupantAllocator), Stage.ScenarioCreation, 300, services, false, new OccupantCharts())
 {
     DevelopmentStatus.Add("//todo: have people die");
     DevelopmentStatus.Add("//todo: Make Children");
     DevelopmentStatus.Add("//todo: Add Immigration");
 }
Example #6
0
 public A09_MatchOsmToSonnendach([NotNull] ServiceRepository services)
     : base(nameof(A09_MatchOsmToSonnendach), Stage.Houses, 9, services, false)
 {
     DevelopmentStatus.Add("Match closest house by distacne");
     DevelopmentStatus.Add("Match localnet entries directly");
     DevelopmentStatus.Add("Match localnet entries by distance");
 }
 public H2_PvSystemBuilder([NotNull] ServiceRepository services)
     : base(nameof(H2_PvSystemBuilder), Stage.ScenarioCreation,
            800, services, false, new PVInstalledCharts())
 {
     DevelopmentStatus.Add("//todo: do the power calculation better");
     DevelopmentStatus.Add("Visualisation: Potential vs currently installed power");
     DevelopmentStatus.Add("proper alignment and stuff");
 }
Example #8
0
 public Z_DetermineHousetype([NotNull] ServiceRepository services)
     : base(nameof(Z_DetermineHousetype), Stage.Houses, 2600, services, false)
 {
     DevelopmentStatus.Add("//todo: figure out the house type");
     DevelopmentStatus.Add("//efh / mfh / gewerbe / industrie /wwk sonstiges / garage /?");
     DevelopmentStatus.Add("//gwr + feuerungsstättendaten");
     DevelopmentStatus.Add("//todo: check if there are really this few business-only buildings");
 }
 public A03_Businesses([NotNull] ServiceRepository services)
     : base(nameof(A03_Businesses), Stage.ScenarioCreation, 103,
            services, false, new BusinessCharts())
 {
     DevelopmentStatus.Add("Add day/night check for ht/nt");
     DevelopmentStatus.Add("adjust profile to other day/night or make a flat profile if needed");
     DevelopmentStatus.Add("Export High voltage");
 }
 public L_Airconditioning([NotNull] ServiceRepository services) : base(nameof(L_Airconditioning),
                                                                       Stage.ScenarioCreation,
                                                                       1200,
                                                                       services,
                                                                       false)
 {
     DevelopmentStatus.Add("Not implemented");
 }
Example #11
0
 public H2_DistributePVSystems([NotNull] ServiceRepository services)
     : base(nameof(H2_DistributePVSystems), Stage.Houses, 910, services,
            false, new PVInstalledCharts())
 {
     DevelopmentStatus.Add("make chart comparing existing pv to potential pv");
     DevelopmentStatus.Add("//todo: chart for houses with households without PV");
     DevelopmentStatus.Add("//todo: chart for houses that have real pv and no sonnendach");
 }
Example #12
0
 public B03_ComparisonProfilesToHouseData([NotNull] ServiceRepository services) : base(nameof(B03_ComparisonProfilesToHouseData),
                                                                                       Stage.ProfileAnalysis,
                                                                                       203,
                                                                                       services,
                                                                                       false)
 {
     DevelopmentStatus.Add("Change to use archive entries");
 }
 //var fuzzyCalculator = new HouseMemberFuzzyCalc();
 //turn potential households into real households, filter by yearly consumption, turn the rest into building Infrastructure
 public A11_BuildingInfrastructureMaker([NotNull] ServiceRepository services) : base(nameof(A11_BuildingInfrastructureMaker),
                                                                                     Stage.Houses,
                                                                                     11,
                                                                                     services,
                                                                                     false)
 {
     DevelopmentStatus.Add("Make yearly gas use entries properly");
     DevelopmentStatus.Add("Make yearly fernwärme entries properly");
 }
Example #14
0
 //turn potential households into real households, filter by yearly consumption, turn the rest into building Infrastructure
 public R_CheckBusinessAssignments([NotNull] ServiceRepository services) : base(nameof(R_CheckBusinessAssignments),
                                                                                Stage.Houses,
                                                                                1700,
                                                                                services,
                                                                                false)
 {
     DevelopmentStatus.Add("Make yearly gas use entries properly");
     DevelopmentStatus.Add("Make yearly fernwärme entries properly");
 }
 public H1_AssignPV_PotentialEntries([JetBrains.Annotations.NotNull] ServiceRepository services)
     : base(nameof(H1_AssignPV_PotentialEntries), Stage.Houses,
            900, services, false, new PVPotentialCharts())
 {
     DevelopmentStatus.Add("not implemented: make potential pv system entries");
     DevelopmentStatus.Add("not implemented: add non-assigned entries based on distance to the nearest house to catch the missing 25 gwh");
     DevelopmentStatus.Add("convert all entries to the same coordinate system");
     DevelopmentStatus.Add("compare sonnendach heizungsschätzung zu ebbe und realen gasdaten");
 }
Example #16
0
 public D_AddBusinessProfiles([NotNull] ServiceRepository services)
     : base(nameof(D_AddBusinessProfiles), Stage.ProfileGeneration, 400, services, false)
 {
     DevelopmentStatus.Add("Make visualisations of the sum profile of each household");
     DevelopmentStatus.Add("add the original isn of each business to the business entry");
     DevelopmentStatus.Add("use the correct business isn");
     DevelopmentStatus.Add("add the total energy checks back in");
     DevelopmentStatus.Add("connect the business to the correct hausanschluss");
 }
Example #17
0
 public A04_LocalnetProcessor([NotNull] ServiceRepository services) : base(nameof(A04_LocalnetProcessor), Stage.Houses, 4, services, false)
 {
     DevelopmentStatus.Add("//todo: implement monthly energy demand for PotentialBuildingInfrastructure");
     DevelopmentStatus.Add("//todo: implement localnet energy entries for PotentialBuildingInfrastructure");
     DevelopmentStatus.Add("//TODO: sankey mit strom für industrie, handel, haushalte");
     DevelopmentStatus.Add("//TODO: sankey mit gas für industrie, handel, haushalte");
     DevelopmentStatus.Add("//TODO: sankey mit wärme für industrie, handel, haushalte");
     DevelopmentStatus.Add("//todo: figure out sumemr base gas use and summer base electricity use");
 }
Example #18
0
 public L_AssignAirConditioning([NotNull] ServiceRepository services) : base(nameof(L_AssignAirConditioning),
                                                                             Stage.Houses,
                                                                             1200,
                                                                             services,
                                                                             false)
 {
     DevelopmentStatus.Add("factor floor area into air conditioning load //todo: factor in floor area");
     DevelopmentStatus.Add("Add //todo: put in industrial air conditionings");
 }
 public J1_AssignOutgoingCommuterData([JetBrains.Annotations.NotNull] ServiceRepository services) : base(nameof(J1_AssignOutgoingCommuterData),
                                                                                                         Stage.Houses,
                                                                                                         1000,
                                                                                                         services,
                                                                                                         false,
                                                                                                         new OutgoingCommuterCharts(services, Stage.Houses))
 {
     DevelopmentStatus.Add("//TODO: make sure to only assign commutingMethod Car to people with cars!!!)");
     DevelopmentStatus.Add("//https://www.bfs.admin.ch/bfs/de/home/statistiken/mobilitaet-verkehr/personenverkehr/pendlermobilitaet.html");
 }
Example #20
0
 public J_Commuters([NotNull] ServiceRepository services) : base(nameof(J_Commuters),
                                                                 Stage.ScenarioCreation,
                                                                 1000,
                                                                 services,
                                                                 false,
                                                                 new OutgoingCommuterCharts(services, Stage.ScenarioCreation))
 {
     DevelopmentStatus.Add("Not implemented");
     DevelopmentStatus.Add("//todo: properly assign new commuters to the new households");
     DevelopmentStatus.Add("//todo: properly assign new cdes to the new households");
 }
Example #21
0
        static void OnDownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            EventHandler <CheckForNewerReleaseCompletedEventArgs> onFinished = e.UserState as EventHandler <CheckForNewerReleaseCompletedEventArgs>;

            if (onFinished == null)
            {
                return;
            }

            Exception error     = null;
            bool      cancelled = e.Cancelled;
            Release   result    = null;

            if (!cancelled)
            {
                error = e.Error;

                if (error == null)
                {
                    string rss = e.Result;

                    XDocument document = XDocument.Parse(rss);

                    var releases = ParseReleases(document);

                    Version currentVersion = AssemblyInfo.Default.Version;

                    DevelopmentStatus desiredDevelopmentStatus = Properties.Settings.Default.DevelopmentStatus;

                    Release latestRelease = null;

                    foreach (var release in releases)
                    {
                        if (release.DevelopmentStatus >= desiredDevelopmentStatus)
                        {
                            if (latestRelease == null || release.Version > latestRelease.Version)
                            {
                                latestRelease = release;
                            }
                        }
                    }

                    if (latestRelease.Version > currentVersion)
                    {
                        result = latestRelease;
                    }
                }
            }

            CheckForNewerReleaseCompletedEventArgs args = new CheckForNewerReleaseCompletedEventArgs(error, cancelled, result);

            onFinished(null, args);
        }
Example #22
0
 public C01_CSVProfileVisualizer([NotNull] ServiceRepository services) : base(nameof(C01_CSVProfileVisualizer),
                                                                              Stage.ProfileAnalysis,
                                                                              300,
                                                                              services,
                                                                              false)
 {
     DevelopmentStatus.Add("Visualize profiles for every tk");
     DevelopmentStatus.Add("Compare energy use from profile with total from houses");
     DevelopmentStatus.Add("Make a pdf report of everything");
     DevelopmentStatus.Add("Make visualisations of the household profiles for each trafostation");
     DevelopmentStatus.Add("Add the checks for the total energy again");
 }
 public BusinessProfileProvider([NotNull] ServiceRepository services,
                                [NotNull] ScenarioSliceParameters slice,
                                [NotNull] SLPProvider slpProvider,
                                [NotNull] DBDto dbDto) : base(nameof(BusinessProfileProvider), services, slice)
 {
     _slpProvider = slpProvider;
     _dbDto       = dbDto;
     DevelopmentStatus.Add("Make visualisations of the sum profile of each household");
     DevelopmentStatus.Add("add the original isn of each business to the business entry");
     DevelopmentStatus.Add("use the correct business isn");
     DevelopmentStatus.Add("add the total energy checks back in");
     DevelopmentStatus.Add("connect the business to the correct hausanschluss");
     _repository = new BusinessProfileOverrideRepository(services.RunningConfig);
 }
 public Z1_ScenarioMapMaker([NotNull] ServiceRepository services)
     : base(nameof(Z1_ScenarioMapMaker), Stage.ScenarioVisualisation, 2600, services, false)
 {
     DevelopmentStatus.Add("//todo: figure out etagenheizungen und color differently");
     DevelopmentStatus.Add("//todo: figure out kochgas and color differently");
     DevelopmentStatus.Add("//todo: reimplement the heating map using heating entries instead");
     DevelopmentStatus.Add("//todo: reimplement the heating map using heating entries instead");
     DevelopmentStatus.Add("//Map for water heaters");
     DevelopmentStatus.Add("//map for heating systems");
     DevelopmentStatus.Add("//map for cars");
     DevelopmentStatus.Add("//map for electric cars");
     DevelopmentStatus.Add("// map for houeseholds");
     DevelopmentStatus.Add("//map for number of appartments");
 }
        public PVProfileProvider([NotNull] ServiceRepository services, [NotNull] ScenarioSliceParameters slice,
                                 [NotNull] DBDto dbDto) : base(nameof(PVProfileProvider), services, slice)
        {
            _dbDto = dbDto;
            DevelopmentStatus.Add("use the correct weather year profile for the generation");
            DevelopmentStatus.Add("instead of commenting out, check if all angles & right weather file based on key. If not right, clear table and regenerate");
            Directory.SetCurrentDirectory(Services.RunningConfig.Directories.SamDirectory);
            Info("SSC Version number = " + API.Version());
            Info("SSC bBuild Information = " + API.BuildInfo());
            var dbPV = Services.SqlConnectionPreparer.GetDatabaseConnection(Stage.ProfileGeneration, Slice, DatabaseCode.PvProfiles);

            _saveableEntries = SaveableEntry <Profile> .GetSaveableEntry(dbPV, SaveableEntryTableType.PVGeneration, MyLogger);

            _saveableEntries.MakeTableForListOfFieldsIfNotExists(true);
        }
Example #26
0
        static List <Release> ParseReleases(XDocument document)
        {
            List <Release> releases = new List <Release>();

            // regex to match a valid release version
            Regex regex = new Regex(@"\d+.\d+.\d+");

            foreach (var item in document.Element("rss").Element("channel").Descendants("item"))
            {
                string title = item.Element("title").Value;
                Match  match = regex.Match(title);
                if (!match.Success)
                {
                    continue;
                }

                DevelopmentStatus developmentStatus = XmlExplorer.DevelopmentStatus.Stable;

                string titleLower = title.ToLower();
                if (titleLower.Contains("alpha"))
                {
                    developmentStatus = XmlExplorer.DevelopmentStatus.Alpha;
                }
                else if (titleLower.Contains("beta"))
                {
                    developmentStatus = XmlExplorer.DevelopmentStatus.Beta;
                }

                Version version = new Version(match.Groups[0].Value);

                string link = item.Element("link").Value;

                Release release = new Release()
                {
                    DevelopmentStatus = developmentStatus,
                    Url     = link,
                    Version = version,
                };

                releases.Add(release);
            }

            return(releases);
        }
Example #27
0
        private DevelopmentInformationItem Parse(string aInformation)
        {
            string information = aInformation;

            information = information.Trim();
            if (information == "")
            {
                return(null);
            }
            int i = information.IndexOf('[');

            if (i == -1)
            {
                return(new DevelopmentInformationItem(information));
            }
            string status = information.Substring(0, i).Trim().ToLower();

            information = information.Remove(0, i);
            i           = information.IndexOf(']');
            if (i == -1)
            {
                throw new Exception(string.Format("Wrong parsing of development information item\n{0}", aInformation));
            }
            string title = information.Substring(0, i + 1).Trim();

            title       = title.Remove(0, 1);
            title       = title.Remove(title.Length - 1, 1);
            information = information.Remove(0, i + 1).Trim();
            DevelopmentStatus ds  = DevelopmentStatus.NormalTask;
            Array             arr = Enum.GetValues(typeof(DevelopmentStatus));

            for (int j = 0; j < arr.Length; j++)
            {
                if (arr.GetValue(j).ToString().ToLower() == status)
                {
                    ds = (DevelopmentStatus)arr.GetValue(j);
                }
            }
            return(new DevelopmentInformationItem(ds, title, information));
        }
 public PVPotentialCharts([NotNull] IServiceRepository services, Stage myStage) : base(nameof(PVPotentialCharts), services, myStage)
 {
     DevelopmentStatus.Add("Maps are messed up");
     DevelopmentStatus.Add("clean up the different charts and remove redundants");
 }
 public A08_MatchOsmToHouse([NotNull] ServiceRepository services)
     : base(nameof(A08_MatchOsmToHouse), Stage.Houses, 8, services, false)
 {
     DevelopmentStatus.Add("Do something about the big red buildings in the industry area");
 }
Example #30
0
 public UpdateLanesMessage(ItemViewModel item, DevelopmentStatus previousStatus)
 {
     Item           = item;
     PreviousStatus = previousStatus;
 }