mooflow.classes.Pywr_model

class mooflow.classes.Pywr_model(omo_setup, timeseries=False)
__init__(omo_setup, timeseries=False)

Class to manage the water allocation with the Pywr package

Parameters
omo_setupmooflow.classes.Omo_setup

the configured setup

timeseriesBool

if False, make a simple balance model (one timestep) if True, take the number of timesteps from the omo_setup

Methods

__init__(omo_setup[, timeseries])

Class to manage the water allocation with the Pywr package

get_active_nodes()

return the active nodes

get_json()

return the dict of the pywr model

get_pywrfile()

return the file name of the JSON model file

nwt_well_shortages(setup_mf, reg_well)

read the shortages for each well from the list file for the NWT model for each time step for pywr active nodes.

prepare_pywr_model(setup_mf, reg_wells, …)

Return a dictionary which summarizes for the active nodes.

pywt_extr_nwt(setup_mf, reg_well, reg_wellgroup)

For active nodes: this function first accumulates the total needed extractions and then accumulates the total shortages in extractions which is read from the list file from the NWT model.

read_results([func, return_dict])

Read the results from a pywr model run.

run_pywr([use_TablesRecorder])

Start the water allocation optimization pywr.

set_pywrfile(file_name[, datafile])

Set the JSON model file for Pywr

update_nodes_in_model([factor])

Configure the INFLOW nodes with the deliverable amount of water, e.g.

write_nodefile(setup_mf[, delimiter, …])

Write the CSV data file with all the well data for pywr.

Attributes

active_nodes

limit_zero

results

usePywr