epyt_flow.data

epyt_flow.data.networks

Module provides functions for loading different water distribution networks.

epyt_flow.data.networks.create_empty_sensor_config(f_inp: str) SensorConfig[source]

Creates an empty sensor configuration for a given .inp file.

Parameters:

f_inp (str) – Path to the .inp file.

Returns:

Sensor configuration.

Return type:

SensorConfig

epyt_flow.data.networks.get_default_hydraulic_options(flow_units_id: int | None = None, pressure_units: int | None = None) dict[source]

Gets standard hydraulic default options.

Parameters:
  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

Returns:

Dictionary with default hydraulics options that can be passed to set_general_parameters().

Return type:

dict

epyt_flow.data.networks.load_anytown(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Anytown network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Anytown network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_balerma(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Balerma network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Balerma network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_bwsn1(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the BWSN-1 network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

BWSN-1 network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_bwsn2(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the BWSN-2 network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

BWSN-2 network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_ctown(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the C-Town network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

C-Town network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_dtown(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the D-Town network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

D-Town network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_hanoi(download_dir: str = '/tmp', include_default_sensor_placement: bool = False, verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Hanoi network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • include_default_sensor_placement (bool, optional) –

    If True, a default sensor placement will be included in the returned scenario configuration.

    The default is False

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Hanoi network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_inp(f_in: str, include_empty_sensor_config: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads an .inp file and wraps it into a scenario configuration.

Parameters:
  • f_in (str) – Path to the .inp file.

  • include_empty_sensor_config (bool, optional) –

    If True, an empty sensor configuration will be included in the returned scenario configuration.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Scenario configuration for the .inp file.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_kentucky(wdn_id: int = 1, download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the specified Kentucky network.

Parameters:
  • wdn_id (int, optional) –

    The ID (1-15) of the particular network.

    The default is wdn_id=1

  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Kentucky network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_ltown(download_dir: str = '/tmp', use_realistic_demands: bool = False, include_default_sensor_placement: bool = False, verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the L-TOWN_v2 network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • use_realistic_demands (bool, optional) –

    If True, realistic demands from the BattLeDIM challenge will be included, toy demands will be included otherwise.

    The default is False

  • include_default_sensor_placement (bool, optional) –

    If True, the L-TOWN default sensor placement will be included in the returned scenario configuration.

    The default is False

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

L-TOWN_v2 network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_ltown_a(download_dir: str = '/tmp', use_realistic_demands: bool = False, include_default_sensor_placement: bool = False, verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the L-TOWN-A network (area “A” of the L-TOWN network).

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • use_realistic_demands (bool, optional) –

    If True, realistic demands from the BattLeDIM challenge will be included, toy demands will be included otherwise.

    The default is False

  • include_default_sensor_placement (bool, optional) –

    If True, the L-TOWN default sensor placement will be included in the returned scenario configuration.

    The default is False

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

L-TOWN-A network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_micropolis(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the MICROPOLIS network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

MICROPOLIS network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_net1(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Net1 network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Net1 network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_net2(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Net2 network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Net2 network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_net3(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Net3 network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Net3 network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_net6(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Net6 network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Net6 network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_richmond(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Richmond network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Richmond network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig

epyt_flow.data.networks.load_rural(download_dir: str = '/tmp', verbose: bool = True, flow_units_id: int | None = None, pressure_units_id: int | None = None) ScenarioConfig[source]

Loads (and downloads if necessary) the Rural network.

Parameters:
  • download_dir (str, optional) –

    Path to the directory where the .inp file is stored.

    The default is the OS-specific temporary directory (e.g. “C:\temp”, “/tmp/”, etc.)

  • verbose (bool, optional) –

    If True, a progress bar is shown while downloading the file.

    The default is True.

  • flow_units_id (int, optional) –

    Specifies the flow units to be used in this scenario. If None, the units from the .inp file will be used.

    Must be one of the following EPANET toolkit constants:

    • EN_CFS = 0 (cubic foot/sec)

    • EN_GPM = 1 (gal/min)

    • EN_MGD = 2 (Million gal/day)

    • EN_IMGD = 3 (Imperial MGD)

    • EN_AFD = 4 (ac-foot/day)

    • EN_LPS = 5 (liter/sec)

    • EN_LPM = 6 (liter/min)

    • EN_MLD = 7 (Megaliter/day)

    • EN_CMH = 8 (cubic meter/hr)

    • EN_CMD = 9 (cubic meter/day)

    • EN_CMS = 10 (cubic meter/sec)

    The default is None.

  • pressure_units_id (int, optional) –

    Specifies the pressure units to be used in this scenarios. If None, the units from the .inp file will be used.

    Must be one of the following EPANET constants:

    • EN_PSI = 0 (Pounds per square inch)

    • EN_KPA = 1 (Kilopascals)

    • EN_METERS = 2 (Meters)

    • EN_BAR = 3 (Bar)

    • EN_FEET = 4 (Feet)

    The default is None.

Returns:

Rural network loaded into a scenario configuration that can be passed on to ScenarioSimulator.

Return type:

ScenarioConfig