Model#

module wntr.sim.aml.aml

class Model[source]#

Bases: object

A class for creating algebraic models.


__init__()[source]#
cons()[source]#
evaluate_jacobian(x=None)[source]#
evaluate_residuals(x=None)[source]#
get_x()[source]#
load_var_values_from_x(x)[source]#
set_structure()[source]#

This method essentially just orders all of the variables and constraints so that the constraint residuals and the jacobian can be evaluated efficiently. This method must be called before get_x, load_var_values_from_x, evaluate_residuals, or evaluate_jacobian can be called. If any changes are made to the model (e.g., variables/constraints are added/removed), then this method needs called again. Avoid calling this method too often if you are concerned about efficiency.

vars()[source]#