business.gravity.views package

Submodules

business.gravity.views.definitions module

Collection of data structures used to report the hydraulic design and check calculations.

class business.gravity.views.definitions.ZoneDesignReport(design_is_successful: bool = None, optimized_solution: Set[business.commons.definitions.TraversalSolution] = None, errors: dict = None)

Bases: object

Record storing outcomes of the ‘hydraulic design’ in a pressure zone.

design_is_successful: bool = None
errors: dict = None
optimized_solution: Set[business.commons.definitions.TraversalSolution] = None

business.gravity.views.plots module

Provide matplotlib functionalities to plot the data.

Notes

This module is based on third-party <matplotlib> library.

class business.gravity.views.plots.PlotGravityMixin

Bases: business.commons.views.plots.PlotStreamMixin

Algorithms to plot all Trunks in a dendridic network.

business.gravity.views.reports module

Provide functionalities to report the data in textual form.

class business.gravity.views.reports.BaseGravityReportMixin

Bases: object

Methods used by BaseGravity to output the results from hydraulics equations.

class business.gravity.views.reports.GravityCheckReportMixin

Bases: business.gravity.views.reports.BaseGravityReportMixin

Method to output the results from ‘hydraulic check problem’.

property get_ux_context

Return the dictionary that Django uses to render a template.

class business.gravity.views.reports.GravityDesignReportMixin

Bases: business.gravity.views.reports.BaseGravityReportMixin

Method to output the results from ‘hydraulic check problem’.

property get_ux_context

Return the dictionary that Django uses to render a template.

Functionality: create a check problem, solve and return its report by returning its template context.

Notes

Performs three steps: * Clone this instance in a Check problem. * Solve the check problem in the clone. * Show the results from the check problem.