business.gravity.solvers package¶
Submodules¶
business.gravity.solvers.check module¶
Solve the ‘hydraulic check problem’ in a ‘gravity’ water supply.
-
class
business.gravity.solvers.check.
DendridicCheckMixin
¶ Bases:
object
Methods used by GravityCheck to solve a system on algebraic equations.
-
property
solve_hydraulic_check_problem
¶ Attempt solving a system of algebraic equations.
Functionality: solves the equations of the ‘hydraulic check problem’. The preconditions ensure that the equations are meaningful. The postcondition produces a report of the calculations.
-
property
business.gravity.solvers.design module¶
Provide methods used to solve the gravity ‘hydraulic design problem’.
Notes
The decision variables are the pipes The obejctive function is to minimize the cost of the pipes
-
class
business.gravity.solvers.design.
GravityDesignMixin
¶ Bases:
object
Algorithms to solve the ‘hydraulic design problem’.
-
solve_hydraulic_design_problem
(strategy: str = 'fixed_flows') → None¶ Solve the ‘hydarulic design problem’, if init data were provided correctly.
Acts as a ‘layer’ between the algorithm and the client code. The layer ensures separation of concerns: * the algorithm attempts to find a solution * this method either reports the algorithm outcome or raises and logs exceptions
- Parameters
strategy (str) – the name of the design algorithm to be invoked (default is TODO)
- Raises
ImproperlyConfiguredTrunk – if the initkwargs were mistaken
-