wntr.library.model_library#

class ModelLibrary[source]#

Bases: object

Model library class to manage water network models. :param directories: Directories containing INP files. :type directories: list of str

__init__(directories=None)[source]#
add_directory(directory)[source]#
get_filepath(name)[source]#

Get the file path of a model by its name. :param name: Name of the model. :type name: str

Returns:

File path of the model’s INP file.

Return type:

str

get_model(name)[source]#

Get a WaterNetworkModel by its name. :param name: Name of the model. :type name: str

Return type:

WaterNetworkModel

property directories#
property model_name_list#

Return a list of model names in the library. :rtype: list of str