Esempio n. 1
0
 public Simulation(int tempYearAvg, int tempYearAmplitude, int tempDayAmplitude, int timeCurrentMM, int timeStepMM, GreenHouse gHouse)
 {
     this.tempYearAvg       = tempYearAvg;
     this.tempYearAmplitude = tempYearAmplitude;
     this.tempDayAmplitude  = tempDayAmplitude;
     this.timeCurrentMM     = Math.Max(0, timeCurrentMM);
     this.timeStepMM        = Math.Max(1, timeStepMM);
     this.gHouse            = gHouse;
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Dictionary <string, TypePlant> PlantsDictionary;
            Dictionary <string, PanelType> PanelsDictionary;
            List <GreenHouse> Greenhouses;

            PanelsDictionary = GetPanelDictionaryData(panelTypesPath);
            PlantsDictionary = GetPlantDictionaryData(plantDictionaryPath);
            Greenhouses      = LoadGreenHouse(greenHousesParamsPath);
            GreenHouse.LoadPlantsFromFile(plantDataPath);
        }
Esempio n. 3
0
        private static List <GreenHouse> LoadGreenHouse(string greenHousesParamsPath)
        {
            List <GreenHouse> Gh   = new List <GreenHouse>();
            string            data = File.ReadAllText(greenHousesParamsPath);

            string[] GHparams = data.Split('!');
            foreach (string GHparam in GHparams)
            {
                string[]   parts      = GHparam.Split(';');
                GreenHouse greenhouse = new GreenHouse(parts[0],
                                                       int.Parse(parts[1]), int.Parse(parts[2]), int.Parse(parts[3]));
                Gh.Add(greenhouse);
            }
            return(Gh);
        }
Esempio n. 4
0
 private static void CheckSensors(GreenHouse gH)
 {
     throw new NotImplementedException();
 }