当前位置: 首页>>代码示例>>Python>>正文


Python inputfile.Section类代码示例

本文整理汇总了Python中core.inputfile.Section的典型用法代码示例。如果您正苦于以下问题:Python Section类的具体用法?Python Section怎么用?Python Section使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Section类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, new_text=None):
        if new_text:
            self.set_text(new_text)  # set_text will call __init__ without new_text to do the initialization below
        else:
            Section.__init__(self)

            self.node = ''
            """str: name of node where external inflow enters."""

            self.timeseries = ''
            """str: Name of the time series describing how flow or constituent loading to this node varies with time."""

            self.constituent = ''
            """str: Name of constituent (pollutant) or FLOW"""

            self.format = DirectInflowType.CONCENTRATION
            """DirectInflowType: Type of data contained in constituent_timeseries, concentration or mass flow rate"""

            self.conversion_factor = '1.0'
            """float: Numerical factor used to convert the units of pollutant mass flow rate in constituent_timeseries
            into project mass units per second as specified in [POLLUTANTS]"""

            self.scale_factor = '1.0'
            """float: Scaling factor that multiplies the recorded time series values."""

            self.baseline = '0.0'
            """float: Constant baseline added to the time series values."""

            self.baseline_pattern = ''
            """str: ID of Time Pattern whose factors adjust the baseline inflow on an hourly, daily, or monthly basis"""
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:30,代码来源:node.py

示例2: __init__

    def __init__(self, new_text=None):
        if new_text:  # if initialization text is provided, call set_text, which will call __init__ with no new_text
            self.set_text(new_text)
        else:
            Section.__init__(self)
            self.land_use_name = ""
            """land use name"""

            self.pollutant = ''
            """str: Pollutant name"""

            self.function = BuildupFunction.POW
            """BuildupFunction: Type of buildup function to use for the pollutant"""

            self.rate_constant = '0.0'
            """float: Time constant that governs the rate of pollutant buildup"""

            self.power_sat_constant = '0.0'
            """float: Exponent C3 used in the Power buildup formula, or the half-saturation constant C2 used in the
                Saturation buildup formula"""

            self.max_buildup = '0.0'
            """float: Maximum buildup that can occur"""

            self.scaling_factor = '1.0'
            """float: Multiplier used to adjust the buildup rates listed in the time series"""

            self.timeseries = ''
            """str: ID of Time Series that contains buildup rates"""

            self.normalizer = Normalizer.AREA
            """Variable to which buildup is normalized on a per unit basis"""
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:32,代码来源:quality.py

示例3: __init__

    def __init__(self):
        Section.__init__(self)
        self.comment = ";;Interfacing Files"

        self.use_rainfall = None
        """Name of rainfall data file to use"""

        self.save_rainfall = None
        """Name of rainfall data file to save"""

        self.use_runoff = None
        """Name of runoff data file to use"""

        self.save_runoff = None
        """Name of runoff data file to save"""

        self.use_hotstart = None
        """Name of hot start data file to use"""

        self.save_hotstart = None
        """Name of hot start data file to save"""

        self.use_rdii = None
        """Name of RDII data file to use"""

        self.save_rdii = None
        """Name of RDII data file to save"""

        self.use_inflows = None
        """Name of inflows data file to use"""

        self.save_outflows = None
        """Name of outflows data file to save"""
开发者ID:alvdena,项目名称:SWMM-EPANET_User_Interface,代码行数:33,代码来源:files.py

示例4: __init__

    def __init__(self):
        Section.__init__(self)

        self.comment = ";;Reporting Options"

        self.input = False
        """Whether report includes a summary of the input data"""

        self.continuity = True
        """Whether to report continuity checks"""

        self.flow_stats = True
        """Whether to report summary flow statistics"""

        self.controls = False
        """Whether to list all control actions taken during a simulation"""

        self.subcatchments = Report.EMPTY_LIST
        """List of subcatchments whose results are to be reported, or ALL or NONE"""

        self.nodes = Report.EMPTY_LIST
        """List of nodes whose results are to be reported, or ALL or NONE"""

        self.links = Report.EMPTY_LIST
        """List of links whose results are to be reported, or ALL or NONE"""
开发者ID:alvdena,项目名称:SWMM-EPANET_User_Interface,代码行数:25,代码来源:report.py

示例5: __init__

    def __init__(self, new_text=None):
        if new_text:
            self.set_text(new_text)  # set_text will call __init__ without new_text to do the initialization below
        else:
            Section.__init__(self)

            self.link = ''
            """name of the conduit, orifice, or weir this is a cross-section of."""

            self.shape = CrossSectionShape.NotSet
            """cross-section shape"""

            self.geometry1 = ''
            """float as str: full height of the cross-section (ft or m)"""

            self.geometry2 = ''
            """float as str: auxiliary parameters (width, side slopes, etc.)"""

            self.geometry3 = ''
            """float as str: auxiliary parameters (width, side slopes, etc.)"""

            self.geometry4 = ''
            """float as str: auxiliary parameters (width, side slopes, etc.)"""

            self.barrels = ''
            """float: number of barrels (i.e., number of parallel pipes of equal size, slope, and
            roughness) associated with a conduit (default is 1)."""

            self.culvert_code = ''
            """code number for the conduits inlet geometry if it is a culvert subject to possible inlet flow control"""

            self.curve = ''
            """str: associated Shape Curve ID that defines how width varies with depth."""
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:33,代码来源:link.py

示例6: set_text

    def set_text(self, new_text):
        self.value = []
        item_lines = []
        found_non_comment = False
        for line in new_text.splitlines():
            if line.startswith(";;") or line.startswith('['):
                self.set_comment_check_section(line)
            elif line.startswith(';'):
                if found_non_comment:  # This comment must be the start of the next one, so build the previous one
                    try:
                        make_one = self.list_type()
                        make_one.set_text('\n'.join(item_lines))
                        self.value.append(make_one)
                        item_lines = []
                        found_non_comment = False
                    except Exception as e:
                        print("Could not create object from: " + line + '\n' + str(e) + '\n' + str(traceback.print_exc()))
                item_lines.append(line)
            elif not line.strip():  # add blank row as a comment item in self.value list
                comment = Section()
                comment.name = "Comment"
                comment.value = ''
                self.value.append(comment)
            else:
                item_lines.append(line)
                found_non_comment = True

        if found_non_comment:  # Found a final one that has not been built yet, build it now
            try:
                make_one = self.list_type()
                make_one.set_text('\n'.join(item_lines))
                self.value.append(make_one)
            except Exception as e:
                print("Could not create object from: " + line + '\n' + str(e) + '\n' + str(traceback.print_exc()))
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:34,代码来源:link.py

示例7: __init__

    def __init__(self):
        Section.__init__(self)

        self.duration = "0"			            # hours:minutes
        """duration of the simulation; the default of zero runs a single period snapshot analysis."""

        self.hydraulic_timestep = "1:00"	    # hours:minutes
        """determines how often a new hydraulic state of the network is computed"""

        self.quality_timestep = "0:05"		    # hours:minutes
        """time step used to track changes in water quality throughout the network"""

        self.rule_timestep = "0:05" 		    # hours:minutes
        """ime step used to check for changes in system status due to activation of rule-based controls"""

        self.pattern_timestep = "1:00" 		    # hours:minutes
        """interval between time periods in all time patterns"""

        self.pattern_start = "0:00"	            # hours:minutes
        """time offset at which all patterns will start"""

        self.report_timestep = "1:00"		    # hours:minutes
        """time interval between which output results are reported"""

        self.report_start = "0:00"	            # hours:minutes
        """length of time into the simulation at which output results begin to be reported"""

        self.start_clocktime = "12 am"		    # hours:minutes AM/PM
        """time of day (e.g., 3:00 PM) at which the simulation begins"""

        self.statistic = StatisticOptions.NONE  # NONE/AVERAGED/MINIMUM/MAXIMUM/RANGE
        """determines what kind of statistical post-processing to do on simulation results"""
开发者ID:alvdena,项目名称:SWMM-EPANET_User_Interface,代码行数:32,代码来源:times.py

示例8: __init__

    def __init__(self):
        Section.__init__(self)

        self.start_date = "1/1/2002"
        """Date when the simulation begins"""

        self.start_time = "0:00"
        """Time of day on the starting date when the simulation begins"""

        self.end_date = "1/1/2002"
        """Date when the simulation is to end"""

        self.end_time = "24:00"
        """Time of day on the ending date when the simulation will end"""

        self.report_start_date = "1/1/2002"
        """Date when reporting of results is to begin"""

        self.report_start_time = "0:00"
        """Time of day on the report starting date when reporting is to begin"""

        self.sweep_start = "1/1"
        """Day of the year (month/day) when street sweeping operations begin"""

        self.sweep_end = "12/31"
        """Day of the year (month/day) when street sweeping operations end"""

        self.dry_days = 0
        """Number of days with no rainfall prior to the start of the simulation"""
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:29,代码来源:dates.py

示例9: __init__

    def __init__(self):
        Section.__init__(self)

        self.id = "Unnamed"
        """Link Identifier/Name"""

        self.inlet_node = ''
        """Node on the inlet end of the Link"""

        self.outlet_node = ''
        """Node on the outlet end of the Link"""

        self.description = ''
        """Optional description of the Link"""

        self.tag = ''
        """Optional label used to categorize or classify the Link"""

        self.vertices = []  # list of Vertex
        """Coordinates of interior vertex points """

        self.report_flag = ''
        """Flag indicating whether an output report is desired for this link"""

        # TODO: sync this with STATUS section:
        self.initial_status = ''
        """initial status of a pipe, pump, or valve; can be a speed setting for a pump"""
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:27,代码来源:link.py

示例10: __init__

    def __init__(self, new_text=None):
        if new_text:
            self.set_text(new_text)  # set_text will call __init__ without new_text to do the initialization below
        else:
            Section.__init__(self)
            self.subcatchment = ''
            """Subcatchment name"""

            self.aquifer = ''
            """Aquifer that supplies groundwater. None = no groundwater flow."""

            self.receiving_node = ''
            """Node that receives groundwater from the aquifer."""

            self.surface_elevation = ''
            """Elevation of ground surface for the subcatchment
                that lies above the aquifer (feet or meters)."""

            self.groundwater_flow_coefficient = ''
            """Value of A1 in the groundwater flow formula."""

            self.groundwater_flow_exponent = ''
            """Value of B1 in the groundwater flow formula."""

            self.surface_water_flow_coefficient = ''
            """Value of A2 in the groundwater flow formula."""

            self.surface_water_flow_exponent = ''
            """Value of B2 in the groundwater flow formula."""

            self.surface_gw_interaction_coefficient = ''
            """Value of A3 in the groundwater flow formula."""

            self.fixed_surface_water_depth = ''
            """Fixed depth of surface water at the receiving node (feet or meters)
                (set to zero if surface water depth will vary
                 as computed by flow routing).
                This value is used to compute HSW."""

            self.threshold_groundwater_elevation = ''
            """Groundwater elevation that must be reached before any flow occurs
                (feet or meters).
                Leave blank to use the receiving node's invert elevation."""

            self.bottom_elevation = ''
            """override bottom elevation aquifer parameter"""

            self.water_table_elevation = ''
            """override initial water table elevation aquifer parameter"""

            self.unsaturated_zone_moisture = ''
            """override initial upper moisture content aquifer parameter"""

            self.custom_lateral_flow_equation = ''
            """expression for lateral groundwater flow (to a node of the conveyance network)"""

            self.custom_deep_flow_equation = ''
            """expression for vertical loss to deep groundwater"""
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:58,代码来源:subcatchment.py

示例11: __init__

    def __init__(self, new_text=None):
        if new_text:
            self.set_text(new_text)  # set_text will call __init__ without new_text to do the initialization below
        else:
            Section.__init__(self)

            self.name = ''
            """User-assigned name."""

            self.porosity = ''
            """Volume of voids / total soil volume (volumetric fraction)."""

            self.wilting_point = ''
            """Soil moisture content at which plants cannot survive
                (volumetric fraction). """

            self.field_capacity = ''
            """Soil moisture content after all free water has drained off
                (volumetric fraction)."""

            self.conductivity = ''
            """Soil's saturated hydraulic conductivity (in/hr or mm/hr)."""

            self.conductivity_slope = ''
            """Average slope of log(conductivity) versus soil moisture deficit
                (porosity minus moisture content) curve (unitless)."""

            self.tension_slope = ''
            """Average slope of soil tension versus soil moisture content curve
                (inches or mm)."""

            self.upper_evaporation_fraction = ''
            """Fraction of total evaporation available for evapotranspiration
                in the upper unsaturated zone."""

            self.lower_evaporation_depth = ''
            """Maximum depth into the lower saturated zone over which
                evapotranspiration can occur (ft or m)."""

            self.lower_groundwater_loss_rate = ''
            """Rate of percolation from saturated zone to deep groundwater (in/hr or mm/hr)."""

            self.bottom_elevation = ''
            """Elevation of the bottom of the aquifer (ft or m)."""

            self.water_table_elevation = ''
            """Elevation of the water table in the aquifer
                at the start of the simulation (ft or m)."""

            self.unsaturated_zone_moisture = ''
            """Moisture content of the unsaturated upper zone of the aquifer
                at the start of the simulation (volumetric fraction)
                (cannot exceed soil porosity)."""

            self.upper_evaporation_pattern = ''
            """ID of monthly pattern of adjustments to upper evaporation fraction (optional)"""
开发者ID:crpAnderson,项目名称:SWMM-EPANET_User_Interface,代码行数:56,代码来源:aquifer.py

示例12: __init__

    def __init__(self):
        Section.__init__(self)

        self.hydraulics = HydraulicsOptions()
        """HydraulicsOptions: Hydraulics options"""

        self.quality = QualityOptions()
        """QualityOptions: Water quality options"""

        self.map = ""
        """str: Name of a file containing coordinates of the network's nodes, not written if not set"""
开发者ID:alvdena,项目名称:SWMM-EPANET_User_Interface,代码行数:11,代码来源:options.py

示例13: __init__

    def __init__(self):
        Section.__init__(self)

        self.dimensions = (0.0, 0.0, 0.0, 0.0)  # real
        """provides the X and Y coordinates of the lower-left and upper-right corners of the maps bounding rectangle"""

        self.file = "" 		                    # string
        """name of the file that contains the backdrop image"""

        self.units = ""      # "None"  # string
        self.offset = None   # (0.0, 0.0)  # real
        self.scaling = None  # (0.0, 0.0)  # real
开发者ID:alvdena,项目名称:SWMM-EPANET_User_Interface,代码行数:12,代码来源:backdrop.py

示例14: __init__

    def __init__(self):
        Section.__init__(self)

        self.flow_units = FlowUnits.GPM
        """FlowUnits: units in use for flow values"""

        self.head_loss = HeadLoss.H_W
        """HeadLoss: formula to use for computing head loss"""

        self.specific_gravity = 1.0
        """Ratio of the density of the fluid being modeled to that of water at 4 deg. C"""

        self.viscosity = 1.0
        """Kinematic viscosity of the fluid being modeled relative to that of water at 20 deg. C"""

        self.maximum_trials = 40
        """Maximum number of trials used to solve network hydraulics at each hydraulic time step of a simulation"""

        self.accuracy = 0.001
        """Prescribes the convergence criterion that determines when a hydraulic solution has been reached"""

        self.unbalanced = Unbalanced.STOP
        """Determines what happens if a hydraulic solution cannot be reached within the prescribed number of TRIALS"""

        self.unbalanced_continue = 10
        """If continuing after n trials, continue this many more trials with links held fixed"""

        self.default_pattern = "1"
        """Default demand pattern to be applied to all junctions where no demand pattern was specified"""

        self.demand_multiplier = 1.0
        """Used to adjust the values of baseline demands for all junctions and all demand categories"""

        self.emitter_exponent = 0.5
        """Specifies the power to which the pressure is raised when computing the flow issuing from an emitter"""

        self.check_frequency = 2
        """Undocumented"""

        self.max_check = 10
        """Undocumented"""

        self.damp_limit = 0.0
        """Undocumented"""

        self.hydraulics = Hydraulics.SAVE
        """Either SAVE the current hydraulics solution to a file or USE a previously saved hydraulics solution"""
        """By default do not write this line"""

        self.hydraulics_file = ""
        """Hydraulics file to either use or save"""
        """By default do not write this line"""
开发者ID:alvdena,项目名称:SWMM-EPANET_User_Interface,代码行数:52,代码来源:hydraulics.py

示例15: __init__

    def __init__(self):
        Section.__init__(self)
        self.dimensions = (0.0, 0.0, 10000.0, 10000.0)  # real
        """X and Y coordinates of the lower-left and upper-right corners of the map's bounding rectangle"""

        self.units = BackdropUnits.NONE			# FEET/METERS/DEGREES/NONE
        """specifies the units that the map's dimensions are given in"""

        self.file = "" 		                    # string
        """Name of the file that contains the backdrop image"""

        self.offset = (0.0, 0.0)                # (real, real)
        """Distance the upper-left corner of the backdrop image is offset from the map's bounding rectangle (X, Y)"""
开发者ID:alvdena,项目名称:SWMM-EPANET_User_Interface,代码行数:13,代码来源:backdrop.py


注:本文中的core.inputfile.Section类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。