MsxFile#

module wntr.epanet.msx.io

class MsxFile[source]#

Bases: object

An EPANET-MSX input file reader.

Class Methods

read

Read an EPANET-MSX input file (.msx) and load data into a MsxModel.

write

Write an MSX input file.


__init__()[source]#
classmethod read(msx_filename, rxn_model=None)[source]#

Read an EPANET-MSX input file (.msx) and load data into a MsxModel. Only MSX 2.0 files are recognized.

Parameters:
  • msx_file (str) – Filename of the .msx file to read in

  • rxn_model (MsxModel, optional) – Multi-species water quality model to put data into, by default None (new model)

Returns:

Multi-species water quality model with the new species, reactions and other options added

Return type:

MsxModel

classmethod write(filename, msx)[source]#

Write an MSX input file.

Parameters:
  • filename (str) – Filename to write

  • rxn (MsxModel) – Multi-species water quality model