internal Routing_Data(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                case "Elevation_Parameters":
                    Elevation_Parameters = new Elevation_Parameters(sub);
                    break;

                case "Discharge_Parameters":
                    Discharge_Parameters = new Discharge_Parameters(sub);
                    break;

                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            Location   = new Location(_pfsHandle.GetKeyword("Location", 1));
            Attributes = new Attributes(_pfsHandle.GetKeyword("Attributes", 1));
        }
Beispiel #2
0
    internal Branch(PFSSection Keyword)
    {
      _pfsHandle = Keyword;

      _definitions = _pfsHandle.GetKeyword("definitions",1);
      _connections = _pfsHandle.GetKeyword("connections",1);
      PFSKeyword _points = _pfsHandle.GetKeyword("points", 1);
      PointNumbers = new List<int>();

      for (int i =1;i<=_points.GetParametersNo();i++)
        PointNumbers.Add(_points.GetParameter(i).ToInt());

    }
Beispiel #3
0
        internal Branch(PFSSection Keyword)
        {
            _pfsHandle = Keyword;

            _definitions = _pfsHandle.GetKeyword("definitions", 1);
            _connections = _pfsHandle.GetKeyword("connections", 1);
            PFSKeyword _points = _pfsHandle.GetKeyword("points", 1);

            PointNumbers = new List <int>();

            for (int i = 1; i <= _points.GetParametersNo(); i++)
            {
                PointNumbers.Add(_points.GetParameter(i).ToInt());
            }
        }
Beispiel #4
0
        /// <summary>
        /// Example of how to read a PFS file
        /// </summary>
        /// <param name="filePath">File and path to the pfsExample.pfs file in the TestData folder</param>
        public static void OpenPFSFile(string filePath)
        {
            // Loading/Reading the file
            PFSFile pfsFile = new PFSFile(filePath, false);

            // Outmost section
            PFSSection target = pfsFile.GetTarget("Run11", 1);

            // Sub-sections
            PFSSection section1 = target.GetSection("Results", 1);
            PFSSection section2 = section1.GetSection("Result", 1);

            // Keywords and paramters
            string bridge = section2.GetKeyword("outid", 1).GetParameter(1).ToStringValue();

            // Get the second key3 keyword from the run11 target
            PFSKeyword kwKey3 = target.GetKeyword("key3", 2);
            // Get the CLOB parameter
            PFSClob clob = kwKey3.GetParameter(1).ToClob();

            // Extract values from the CLOB
            for (int i = 0; i < 5; i++)
            {
                double d = clob.GetDouble();
                Console.Out.WriteLine("clob data: {0}", d);
            }
        }
Beispiel #5
0
        internal MIKE_11_Network_editor(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                case "POINTS":
                    int np = sub.GetKeywordsNo("point");
                    Points = new SortedDictionary <int, Point>();
                    for (int j = 1; j <= np; j++)
                    {
                        Point p = new Point(sub.GetKeyword(j));
                        Points.Add(p.Number, p);
                    }
                    break;

                case "BRANCHES":
                    int nb = sub.GetSectionsNo("branch");
                    Branches = new List <Branch>();
                    for (int j = 1; j <= nb; j++)
                    {
                        Branches.Add(new Branch(sub.GetSection(j)));
                    }
                    break;

                case "COMPUTATIONAL_SETUP":
                    COMPUTATIONAL_SETUP = new COMPUTATIONAL_SETUP(sub);
                    break;

                case "MIKESHECOUPLING":
                    MikeSheCouplings = new List <MIKESHECOUPLING>();
                    for (int j = 1; j <= sub.GetKeywordsNo("MikeSheCoupling"); j++)
                    {
                        MIKESHECOUPLING p = new MIKESHECOUPLING(sub.GetKeyword(j));
                        MikeSheCouplings.Add(p);
                    }
                    break;

                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }
        }
Beispiel #6
0
        /// <summary>
        /// Deletes the Keyword "KeywordToDelete" from the ParentSection if it exists
        /// </summary>
        /// <param name="ParentSection"></param>
        /// <param name="SectionToDelete"></param>
        public static void SafeDeleteKeyword(PFSSection ParentSection, string KeywordToDelete)
        {
            PFSKeyword DeleteME = ParentSection.GetKeyword(KeywordToDelete, 1);

            if (DeleteME != null)
            {
                ParentSection.DeleteKeyword(DeleteME);
            }
        }
Beispiel #7
0
    internal Model_C(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      LineHeader = new LineHeader(_pfsHandle.GetKeyword("LineHeader", 1));
      Line = new Line(_pfsHandle.GetKeyword("Line", 1));
    }
Beispiel #8
0
        internal Rows(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            rHeader = new rHeader(_pfsHandle.GetKeyword("rHeader", 1));
            r       = new r(_pfsHandle.GetKeyword("r", 1));
        }
Beispiel #9
0
        internal MOUSE_RDII(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            LineHeader = new LineHeader(_pfsHandle.GetKeyword("LineHeader", 1));
            Line       = new Line(_pfsHandle.GetKeyword("Line", 1));
        }
Beispiel #10
0
    internal Rows(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      rHeader = new rHeader(_pfsHandle.GetKeyword("rHeader", 1));
      r = new r(_pfsHandle.GetKeyword("r", 1));
    }
Beispiel #11
0
    internal branch(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      definitions = new definitions(_pfsHandle.GetKeyword("definitions", 1));
      connections = new connections(_pfsHandle.GetKeyword("connections", 1));
      points = new points1(_pfsHandle.GetKeyword("points", 1));
    }
Beispiel #12
0
        internal branch(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            definitions = new definitions(_pfsHandle.GetKeyword("definitions", 1));
            connections = new connections(_pfsHandle.GetKeyword("connections", 1));
            points      = new points1(_pfsHandle.GetKeyword("points", 1));
        }
    internal MOUSE_HD_parameters(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Model_type = new Model_type(_pfsHandle.GetKeyword("Model_type", 1));
      TRAP_Setup = new TRAP_Setup(_pfsHandle.GetKeyword("TRAP_Setup", 1));
      SaveStep_HrMiSec = new SaveStep_HrMiSec(_pfsHandle.GetKeyword("SaveStep_HrMiSec", 1));
      HD_summary = new HD_summary(_pfsHandle.GetKeyword("HD_summary", 1));
    }
Beispiel #14
0
        internal MOUSE_HD_parameters(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            Model_type       = new Model_type(_pfsHandle.GetKeyword("Model_type", 1));
            TRAP_Setup       = new TRAP_Setup(_pfsHandle.GetKeyword("TRAP_Setup", 1));
            SaveStep_HrMiSec = new SaveStep_HrMiSec(_pfsHandle.GetKeyword("SaveStep_HrMiSec", 1));
            HD_summary       = new HD_summary(_pfsHandle.GetKeyword("HD_summary", 1));
        }
    internal STRUCTURE_MODULE(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
        case "CROSSSECTIONS":
          CROSSSECTIONS = new CROSSSECTIONS(sub);
          break;
        case "WEIR":
          WEIR = new WEIR(sub);
          break;
        case "CULVERTS":
          CULVERTS = new WEIR(sub);
          break;
        case "PUMPS":
          PUMPS = new WEIR(sub);
          break;
        case "REGULATING_STR":
          REGULATING_STR = new WEIR(sub);
          break;
        case "CONTROL_STR":
          CONTROL_STR = new WEIR(sub);
          break;
        case "DAMBREAK_STR":
          DAMBREAK_STR = new WEIR(sub);
          break;
        case "BRIDGE":
          BRIDGE = new WEIR(sub);
          break;
        case "USER_DEFINED":
          USER_DEFINED = new WEIR(sub);
          break;
        case "TABULATED":
          TABULATED = new WEIR(sub);
          break;
        case "ENERGYBALANCE":
          ENERGYBALANCE = new WEIR(sub);
          break;
        case "MIKE12_HYDRAU":
          MIKE12_HYDRAU = new WEIR(sub);
          break;
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Structure_Version = new Structure_Version(_pfsHandle.GetKeyword("Structure_Version", 1));
    }
Beispiel #16
0
        internal Branch2(PFSSection Keyword)
        {
            _pfsHandle = Keyword;

            PFSSection _points = _pfsHandle.GetSection("points", 1);

            ComputationalPoints = new List <ComputationalPoint>();

            for (int i = 1; i <= _points.GetKeywordsNo(); i++)
            {
                ComputationalPoints.Add(new ComputationalPoint(_points.GetKeyword(i)));
            }
        }
Beispiel #17
0
    /// <summary>
    /// Returns a deep clone of the section. Does not clone any parents;
    /// </summary>
    /// <param name="SectionToClone"></param>
    /// <returns></returns>
    public static PFSSection DeepClone(PFSSection SectionToClone)
    {
      PFSSection ps = new PFSSection(SectionToClone.Name);

      int NumberOfKeywords = SectionToClone.GetKeywordsNo();
      for (int i = 1; i <= NumberOfKeywords; i++)
        ps.AddKeyword(PFSMapper.DeepClone(SectionToClone.GetKeyword(i)));

      int NumberOfSections = SectionToClone.GetSectionsNo();
      for (int i = 1; i <= NumberOfSections; i++)
        ps.AddSection(PFSMapper.DeepClone(SectionToClone.GetSection(i)));

      return ps;
    }
    internal Routing_Data(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
        case "Elevation_Parameters":
          Elevation_Parameters = new Elevation_Parameters(sub);
          break;
        case "Discharge_Parameters":
          Discharge_Parameters = new Discharge_Parameters(sub);
          break;
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Location = new Location(_pfsHandle.GetKeyword("Location", 1));
      Attributes = new Attributes(_pfsHandle.GetKeyword("Attributes", 1));
    }
Beispiel #19
0
        private bool TryToGetKeyword(PFSSection pfsSection, out PFSKeyword pfsKeyword, string Keyword, string Path)
        {
            try
            {
                pfsKeyword = pfsSection.GetKeyword(Keyword);
            }
            catch (Exception ex)
            {
                ErrorMessage = string.Format(CSSPDHIRes.Keyword_DoesNotExistForSectionPath_Error_, Keyword, Path, ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : ""));
                OnCSSPDHIChanged(new CSSPDHIEventArgs(new CSSPDHIMessage("Error", -1, false, ErrorMessage)));
                pfsKeyword = null;
                return(false);
            }

            return(true);
        }
    internal EVALUATION_MATRIX(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      AND_LINE = new AND_LINE(_pfsHandle.GetKeyword("AND_LINE", 1));
    }
Beispiel #21
0
    internal Links(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Event_definition = new Event_definition(_pfsHandle.GetKeyword("Event_definition", 1));
    }
    internal Discharge_Parameters(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Muskingum = new Muskingum(_pfsHandle.GetKeyword("Muskingum", 1));
    }
Beispiel #23
0
        internal MIKEZero_Shape_Polygon_Object(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            Text_Color = new Text_Color(_pfsHandle.GetKeyword("Text_Color", 1));
        }
        internal Discharge_Parameters(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            Muskingum = new Muskingum(_pfsHandle.GetKeyword("Muskingum", 1));
        }
    internal SRC_SELECTION_CRITERION(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      SRC_FLOW = new SRC_FLOW(_pfsHandle.GetKeyword("SRC_FLOW", 1));
    }
Beispiel #26
0
        internal Links(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            Event_definition = new Event_definition(_pfsHandle.GetKeyword("Event_definition", 1));
        }
    internal MIKEZero_Shape_Polygon_Object(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Text_Color = new Text_Color(_pfsHandle.GetKeyword("Text_Color", 1));
    }
Beispiel #28
0
        internal MOUSE_RUNOFF_parameters(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            Model_type = new Model_type(_pfsHandle.GetKeyword("Model_type", 1));
        }
Beispiel #29
0
        internal EVALUATION_MATRIX(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            AND_LINE = new AND_LINE(_pfsHandle.GetKeyword("AND_LINE", 1));
        }
        internal SRC_SELECTION_CRITERION(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            SRC_FLOW = new SRC_FLOW(_pfsHandle.GetKeyword("SRC_FLOW", 1));
        }
    internal MOUSE_RUNOFF_parameters(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Model_type = new Model_type(_pfsHandle.GetKeyword("Model_type", 1));
    }
Beispiel #32
0
    internal Metadata(PFSSection Section)
    {
      _pfsHandle = Section;

      Fields = new List<Field>();
      for (int i = 1; i <= Section.GetKeywordsNo("Field"); i++)
        Fields.Add(new Field(Section.GetKeyword("Field",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
Beispiel #33
0
    internal Nodes(PFSSection Section)
    {
      _pfsHandle = Section;

      Event_definitions = new List<Event_definition>();
      for (int i = 1; i <= Section.GetKeywordsNo("Event_definition"); i++)
        Event_definitions.Add(new Event_definition(Section.GetKeyword("Event_definition",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
    internal Cross_Section(PFSSection Section)
    {
      _pfsHandle = Section;

      Datas = new List<Data>();
      for (int i = 1; i <= Section.GetKeywordsNo("Data"); i++)
        Datas.Add(new Data(Section.GetKeyword("Data",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
Beispiel #35
0
        //private string GetFileNameText(PFSFile pfsFile, string Path, string Keyword)
        //{
        //    string FileName = "";

        //    PFSSection pfsSectionFileName = pfsFile.GetSectionFromHandle(Path);

        //    if (pfsSectionFileName != null)
        //    {
        //        PFSKeyword keyword = null;
        //        try
        //        {
        //            keyword = pfsSectionFileName.GetKeyword(Keyword);
        //        }
        //        catch (Exception ex)
        //        {
        //            UpdateTaskError(AppTaskID, "PFS GetKeyword. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]");
        //            richTextBoxStatus.AppendText("PFS GetKeyword. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]\r\n");
        //            return FileName;
        //        }

        //        if (keyword != null)
        //        {
        //            try
        //            {
        //                FileName = keyword.GetParameter(1).ToFileName();
        //            }
        //            catch (Exception ex)
        //            {
        //                UpdateTaskError(AppTaskID, "PFS GetParameter. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]");
        //                richTextBoxStatus.AppendText("PFS GetParameter. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]\r\n");
        //                return FileName;
        //            }
        //        }
        //    }

        //    return FileName;
        //}
        private string GetParameterResultFileName(PFSFile pfsFile, string Path, string Keyword)
        {
            //string NotUsed = "";
            string FileName = "";

            PFSSection pfsSection = pfsFile.GetSectionFromHandle(Path);

            if (pfsSection == null)
            {
                UpdateTaskError(AppTaskID, $"pfsSection not found for path {Path}");
                richTextBoxStatus.AppendText($"pfsSection not found for path {Path}\r\n");
                return(FileName);
            }

            PFSKeyword keyword = null;

            try
            {
                keyword = pfsSection.GetKeyword(Keyword);
            }
            catch (Exception ex)
            {
                UpdateTaskError(AppTaskID, "PFS GetKeyword. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]");
                richTextBoxStatus.AppendText("PFS GetKeyword. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]\r\n");
                return(FileName);
            }

            if (keyword != null)
            {
                try
                {
                    FileName = keyword.GetParameter(1).ToResultFileName();
                }
                catch (Exception ex)
                {
                    UpdateTaskError(AppTaskID, "PFS GetParameter. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]");
                    richTextBoxStatus.AppendText("PFS GetParameter. Error [" + ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : "") + "]\r\n");
                    return(FileName);
                }
            }

            return(FileName);
        }
    internal MOUSE_PASSIVE_CONTROL(PFSSection Section)
    {
      _pfsHandle = Section;

      Passive_Controls = new List<Passive_Control>();
      for (int i = 1; i <= Section.GetKeywordsNo("Passive_Control"); i++)
        Passive_Controls.Add(new Passive_Control(Section.GetKeyword("Passive_Control",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
    internal MIKESHECOUPLING1(PFSSection Section)
    {
      _pfsHandle = Section;

      MikeSheCouplings = new List<MikeSheCoupling>();
      for (int i = 1; i <= Section.GetKeywordsNo("MikeSheCoupling"); i++)
        MikeSheCouplings.Add(new MikeSheCoupling(Section.GetKeyword("MikeSheCoupling",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
    internal MOUSE_RTC_SENSORS(PFSSection Section)
    {
      _pfsHandle = Section;

      Sensors = new List<Sensor>();
      for (int i = 1; i <= Section.GetKeywordsNo("Sensor"); i++)
        Sensors.Add(new Sensor(Section.GetKeyword("Sensor",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      SensorHeader = new SensorHeader(_pfsHandle.GetKeyword("SensorHeader", 1));
    }
        internal MIKESHECOUPLING1(PFSSection Section)
        {
            _pfsHandle = Section;

            MikeSheCouplings = new List <MikeSheCoupling>();
            for (int i = 1; i <= Section.GetKeywordsNo("MikeSheCoupling"); i++)
            {
                MikeSheCouplings.Add(new MikeSheCoupling(Section.GetKeyword("MikeSheCoupling", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }
        }
Beispiel #40
0
        internal Metadata(PFSSection Section)
        {
            _pfsHandle = Section;

            Fields = new List <Field>();
            for (int i = 1; i <= Section.GetKeywordsNo("Field"); i++)
            {
                Fields.Add(new Field(Section.GetKeyword("Field", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }
        }
    internal MOUSE_HEADLOSS_PARAMETERS(PFSSection Section)
    {
      _pfsHandle = Section;

      HEADLOSSs = new List<HEADLOSS>();
      for (int i = 1; i <= Section.GetKeywordsNo("HEADLOSS"); i++)
        HEADLOSSs.Add(new HEADLOSS(Section.GetKeyword("HEADLOSS",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      HEADLOSSHeader = new HEADLOSSHeader(_pfsHandle.GetKeyword("HEADLOSSHeader", 1));
    }
    internal MSM_BBOUNDARY(PFSSection Section)
    {
      _pfsHandle = Section;

      BBOUNDARYs = new List<BBOUNDARY>();
      for (int i = 1; i <= Section.GetKeywordsNo("BBOUNDARY"); i++)
        BBOUNDARYs.Add(new BBOUNDARY(Section.GetKeyword("BBOUNDARY",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      BBOUNDARYHeader = new BBOUNDARYHeader(_pfsHandle.GetKeyword("BBOUNDARYHeader", 1));
    }
Beispiel #43
0
    internal MOUSE_WEIRS(PFSSection Section)
    {
      _pfsHandle = Section;

      Weirs = new List<Weir>();
      for (int i = 1; i <= Section.GetKeywordsNo("Weir"); i++)
        Weirs.Add(new Weir(Section.GetKeyword("Weir",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      WeirHeader = new WeirHeader(_pfsHandle.GetKeyword("WeirHeader", 1));
    }
Beispiel #44
0
    internal MSM_BITEM(PFSSection Section)
    {
      _pfsHandle = Section;

      BITEMs = new List<BITEM>();
      for (int i = 1; i <= Section.GetKeywordsNo("BITEM"); i++)
        BITEMs.Add(new BITEM(Section.GetKeyword("BITEM",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      BITEMHeader = new BITEMHeader(_pfsHandle.GetKeyword("BITEMHeader", 1));
    }
Beispiel #45
0
    internal LAYER_FILES(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
        case "PROPERTIES":
          PROPERTIES = new PROPERTIES(sub);
          break;
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      DataFileName = new DataFileName(_pfsHandle.GetKeyword("DataFileName", 1));
    }
    internal MOUSE_Catchments(PFSSection Section)
    {
      _pfsHandle = Section;

      Lines = new List<Line>();
      for (int i = 1; i <= Section.GetKeywordsNo("Line"); i++)
        Lines.Add(new Line(Section.GetKeyword("Line",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      LineHeader = new LineHeader(_pfsHandle.GetKeyword("LineHeader", 1));
    }
    internal MOUSE_MATERIAL_PARAMETERS(PFSSection Section)
    {
      _pfsHandle = Section;

      MATERIALs = new List<MATERIAL>();
      for (int i = 1; i <= Section.GetKeywordsNo("MATERIAL"); i++)
        MATERIALs.Add(new MATERIAL(Section.GetKeyword("MATERIAL",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      MATERIALHeader = new MATERIALHeader(_pfsHandle.GetKeyword("MATERIALHeader", 1));
    }
Beispiel #48
0
        internal QH_Relations(PFSSection Section)
        {
            _pfsHandle = Section;

            Datas = new List <Data>();
            for (int i = 1; i <= Section.GetKeywordsNo("Data"); i++)
            {
                Datas.Add(new Data(Section.GetKeyword("Data", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }
        }
Beispiel #49
0
        internal Nodes(PFSSection Section)
        {
            _pfsHandle = Section;

            Event_definitions = new List <Event_definition>();
            for (int i = 1; i <= Section.GetKeywordsNo("Event_definition"); i++)
            {
                Event_definitions.Add(new Event_definition(Section.GetKeyword("Event_definition", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }
        }
Beispiel #50
0
        internal Cross_Section1(PFSSection Section)
        {
            _pfsHandle = Section;

            ProcessDatas = new List <ProcessData>();
            for (int i = 1; i <= Section.GetKeywordsNo("ProcessData"); i++)
            {
                ProcessDatas.Add(new ProcessData(Section.GetKeyword("ProcessData", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }
        }
Beispiel #51
0
        internal MOUSE_PASSIVE_CONTROL(PFSSection Section)
        {
            _pfsHandle = Section;

            Passive_Controls = new List <Passive_Control>();
            for (int i = 1; i <= Section.GetKeywordsNo("Passive_Control"); i++)
            {
                Passive_Controls.Add(new Passive_Control(Section.GetKeyword("Passive_Control", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }
        }
Beispiel #52
0
    internal FRC_INFLOW1(PFSSection Section)
    {
      _pfsHandle = Section;

      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
        case "OPERATOR":
          OPERATOR = new OPERATOR(sub);
          break;
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      Q_LIMIT = new Q_LIMIT(_pfsHandle.GetKeyword("Q_LIMIT", 1));
    }
Beispiel #53
0
    internal MOUSE_NODES(PFSSection Section)
    {
      _pfsHandle = Section;

      Nodes = new List<Node>();
      for (int i = 1; i <= Section.GetKeywordsNo("Node"); i++)
        Nodes.Add(new Node(Section.GetKeyword("Node",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      NodeHeader = new NodeHeader(_pfsHandle.GetKeyword("NodeHeader", 1));
    }
Beispiel #54
0
    internal MOUSE_PUMPS(PFSSection Section)
    {
      _pfsHandle = Section;

      Pumps = new List<Pump>();
      for (int i = 1; i <= Section.GetKeywordsNo("Pump"); i++)
        Pumps.Add(new Pump(Section.GetKeyword("Pump",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      PumpHeader = new PumpHeader(_pfsHandle.GetKeyword("PumpHeader", 1));
    }
Beispiel #55
0
        /// <summary>
        /// Returns a deep clone of the section. Does not clone any parents;
        /// </summary>
        /// <param name="SectionToClone"></param>
        /// <returns></returns>
        public static PFSSection DeepClone(PFSSection SectionToClone)
        {
            PFSSection ps = new PFSSection(SectionToClone.Name);

            int NumberOfKeywords = SectionToClone.GetKeywordsNo();

            for (int i = 1; i <= NumberOfKeywords; i++)
            {
                ps.AddKeyword(PFSMapper.DeepClone(SectionToClone.GetKeyword(i)));
            }

            int NumberOfSections = SectionToClone.GetSectionsNo();

            for (int i = 1; i <= NumberOfSections; i++)
            {
                ps.AddSection(PFSMapper.DeepClone(SectionToClone.GetSection(i)));
            }

            return(ps);
        }
Beispiel #56
0
        internal TOTAL_VOLUME(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                case "OPERATOR":
                    OPERATOR = new OPERATOR(sub);
                    break;

                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            VOL_LIMIT = new VOL_LIMIT(_pfsHandle.GetKeyword("VOL_LIMIT", 1));
        }
Beispiel #57
0
        internal LAYER_FILES(PFSSection Section)
        {
            _pfsHandle = Section;

            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                case "PROPERTIES":
                    PROPERTIES = new PROPERTIES(sub);
                    break;

                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            DataFileName = new DataFileName(_pfsHandle.GetKeyword("DataFileName", 1));
        }
Beispiel #58
0
        internal Model_A(PFSSection Section)
        {
            _pfsHandle = Section;

            Lines = new List <Line>();
            for (int i = 1; i <= Section.GetKeywordsNo("Line"); i++)
            {
                Lines.Add(new Line(Section.GetKeyword("Line", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            LineHeader = new LineHeader(_pfsHandle.GetKeyword("LineHeader", 1));
        }
        internal MOUSE_MATERIAL_PARAMETERS(PFSSection Section)
        {
            _pfsHandle = Section;

            MATERIALs = new List <MATERIAL>();
            for (int i = 1; i <= Section.GetKeywordsNo("MATERIAL"); i++)
            {
                MATERIALs.Add(new MATERIAL(Section.GetKeyword("MATERIAL", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            MATERIALHeader = new MATERIALHeader(_pfsHandle.GetKeyword("MATERIALHeader", 1));
        }
Beispiel #60
0
        internal MOUSE_NODES(PFSSection Section)
        {
            _pfsHandle = Section;

            Nodes = new List <Node>();
            for (int i = 1; i <= Section.GetKeywordsNo("Node"); i++)
            {
                Nodes.Add(new Node(Section.GetKeyword("Node", i)));
            }
            for (int i = 1; i <= Section.GetSectionsNo(); i++)
            {
                PFSSection sub = Section.GetSection(i);
                switch (sub.Name)
                {
                default:
                    _unMappedSections.Add(sub.Name);
                    break;
                }
            }

            NodeHeader = new NodeHeader(_pfsHandle.GetKeyword("NodeHeader", 1));
        }