GraphicsOptions#

module wntr.network.options

class GraphicsOptions[source]#

Bases: _OptionsBase

Options related to graphics.

May be used to contain custom, user defined values. These options are taken from the EPANET “[BACKDROP]” section. Additionally, the “MAP” option (map_filename), which identifies a file containing node coordinates in the EPANET “[OPTIONS]” section, is also included here.

Parameters:
  • dimensions (4-tuple or list) – Dimensions for backdrop image in the order (LLx, LLy, URx, URy). By default, EPANET will make the image match the full extent of node coordinates (set to None).

  • units (str) – Units for backdrop image dimensions. Must be one of FEET, METERS, DEGREES or NONE, by default “NONE”.

  • offset (2-tuple or list) – Offset for the network in order (X, Y), by default None (no offset).

  • image_filename (string) – Filename where image is located, by default None.

  • map_filename (string) – Filename used to store node coordinates in (node, x, y) format. This option is from the EPANET “[OPTIONS]” section. See note below.

Note

Because the format of the MAP file is uncertain, file will need to be processed by the user to assign coordinates to nodes, if desired. Remember that node coordinates have impact only on graphics and do not impact simulation results. If the map_filename is not None, then no [COORDINATES] will be written out to INP files (to save space, since the simulator does not use that section). This can be overwritten in the write_inpfile commands.


__init__(dimensions=None, units=None, offset=None, image_filename=None, map_filename=None)[source]#
classmethod factory(val)#

Create an options object based on passing in an instance of the object, a dict, or a tuple