From 6b4db6638d35ef9e6998d4ac9e56f9c511a397ff Mon Sep 17 00:00:00 2001 From: Brian Cheung Date: Fri, 11 Aug 2023 12:16:59 -0400 Subject: [PATCH] Update apidocs --- apidoc/routines/io.rst | 4 +- docs/.buildinfo | 2 +- docs/_sources/routines/io.rst.txt | 4 +- docs/_static/basic.css | 18 ++++++ docs/_static/documentation_options.js | 2 +- docs/genindex.html | 22 ++++--- docs/index.html | 14 ++--- docs/logging/index.html | 17 +++--- docs/objects.inv | Bin 1043 -> 1066 bytes docs/py-modindex.html | 12 ++-- docs/routines/best_intermediates.html | 20 +++---- docs/routines/general.html | 12 ++-- docs/routines/index.html | 14 ++--- docs/routines/io.html | 80 +++++++++++++++++--------- docs/routines/matrices.html | 48 ++++++++-------- docs/routines/modelling.html | 16 +++--- docs/routines/plotting.html | 18 +++--- docs/search.html | 12 ++-- docs/searchindex.js | 2 +- 19 files changed, 185 insertions(+), 132 deletions(-) diff --git a/apidoc/routines/io.rst b/apidoc/routines/io.rst index f20ea8f..9e610a3 100644 --- a/apidoc/routines/io.rst +++ b/apidoc/routines/io.rst @@ -2,7 +2,7 @@ IO Utilities ============ -Routines for reading and writing demand modelling files, particularly matrices and TMG Toolbox network packages. +Routines for reading and writing demand modelling files, particularly matrices and TMGToolbox network packages. Matrices -------- @@ -38,5 +38,7 @@ Fortran format Network Packages (NWP) ---------------------- +For more information on the TMGToolbox Network Package format, please visit https://tmg.utoronto.ca/doc/1.6/tmgtoolbox/input_output/ExportNetworkPackage.html + .. automodule:: balsa.routines.io.nwp :members: diff --git a/docs/.buildinfo b/docs/.buildinfo index 29ea089..1ea85a3 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: e9c765a95887a75c9a2e673fd39b858c +config: 2d7548e41818fc7ff042dc792b902925 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_sources/routines/io.rst.txt b/docs/_sources/routines/io.rst.txt index f20ea8f..9e610a3 100644 --- a/docs/_sources/routines/io.rst.txt +++ b/docs/_sources/routines/io.rst.txt @@ -2,7 +2,7 @@ IO Utilities ============ -Routines for reading and writing demand modelling files, particularly matrices and TMG Toolbox network packages. +Routines for reading and writing demand modelling files, particularly matrices and TMGToolbox network packages. Matrices -------- @@ -38,5 +38,7 @@ Fortran format Network Packages (NWP) ---------------------- +For more information on the TMGToolbox Network Package format, please visit https://tmg.utoronto.ca/doc/1.6/tmgtoolbox/input_output/ExportNetworkPackage.html + .. automodule:: balsa.routines.io.nwp :members: diff --git a/docs/_static/basic.css b/docs/_static/basic.css index 6157296..b97662d 100644 --- a/docs/_static/basic.css +++ b/docs/_static/basic.css @@ -670,6 +670,16 @@ dd { margin-left: 30px; } +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; @@ -738,6 +748,14 @@ abbr, acronym { cursor: help; } +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + /* -- code displays --------------------------------------------------------- */ pre { diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 4ecdb06..b9b6d11 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '1.4.0', + VERSION: '1.4.2', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/genindex.html b/docs/genindex.html index 792498b..54709ff 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -7,7 +7,7 @@ - Index — wsp-balsa 1.4.0 documentation + Index — wsp-balsa 1.4.2 documentation @@ -27,15 +27,15 @@ - + - - - + + + @@ -558,10 +558,12 @@

O

P

@@ -586,10 +588,10 @@

R

  • read_nwp_node_attributes() (in module balsa.routines.io.nwp)
  • - - +
    • read_nwp_traffic_results_at_countpost() (in module balsa.routines.io.nwp)
    • read_nwp_transit_line_attributes() (in module balsa.routines.io.nwp) @@ -601,6 +603,8 @@

      R

    • read_nwp_transit_segment_results() (in module balsa.routines.io.nwp)
    • read_nwp_transit_station_results() (in module balsa.routines.io.nwp) +
    • +
    • read_nwp_transit_vehicles() (in module balsa.routines.io.nwp)
    • read_omx() (in module balsa.routines.io.omx)
    • @@ -701,7 +705,7 @@

      T

      diff --git a/docs/index.html b/docs/index.html index 238b55d..f846ab6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - wsp-balsa: Common modelling tools — wsp-balsa 1.4.0 documentation + wsp-balsa: Common modelling tools — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -332,7 +332,7 @@

      wsp-balsa: Common modelling toolsIO Utilities
    • Modelling Utilities
        @@ -455,7 +455,7 @@

        wsp-balsa: Common modelling tools

        - Created using Sphinx 7.0.1. + Created using Sphinx 7.1.2.

        diff --git a/docs/logging/index.html b/docs/logging/index.html index 567ed60..35b7389 100644 --- a/docs/logging/index.html +++ b/docs/logging/index.html @@ -10,7 +10,7 @@ - Logging — wsp-balsa 1.4.0 documentation + Logging — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -343,9 +343,8 @@

        Logging
        -class balsa.logging.LogFormats(value)#
        -

        An enumeration.

        -
        +class balsa.logging.LogFormats(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)# +
        @@ -502,7 +501,7 @@

        Logging

        - Created using Sphinx 7.0.1. + Created using Sphinx 7.1.2.

        diff --git a/docs/objects.inv b/docs/objects.inv index 6962298040e69454c8fce7cd1b31fbd76f336d54..ca766f67f1afb480f531168b6dc0272dff109656 100644 GIT binary patch delta 959 zcmV;w13>(f2&xE>K>;$6LOg%Xj@vj4fbV$<0o`ldPLFe4U>5~C*g@Mp3yMT5LiFQG zawplRU)r*rc;eWJ?Vgf|)1Ix6NQdvog)3b4+)IdIwX6&P~0*=`}8vP;3 zwttZAW_M|qeRc9L=M9UYLU7GOAWuVtYtt7eK%>0`zr;54P&gm!6+nO7J28h5%3a|d zr{MiMAOj&V3Cmzn6^{cXL~1Gs)m?1!((oUfq9ouZJDssX&zg8&$5ZlJa3#z!Oic;-F89QKg|GrvZMJU^&di zDVK3)3>pmvAH@@K?*RA#o&&|A>eca>4NSpk1=pho2LJxFl@b6kp8 z<^=|GnGXnCXf%>q9;ikUmciN1WL0y4tp$d}00oOw7g>eD0yb8q zr^)qJ;TO7N=&*(O=KNs=92{AU)yhL$frbG*Py~9lE8{B5wb(1IOT>ep=Za%_3Z;&} zfr#!>?n)aAw@QCdt4bBHx-Am-=q^?i? z1$)Ky+#PeNyv{6gXq_B#bE|Ykz#=`*zV4Fvtvf<1omxky$E5TitDbzk{py3qh(d++ zp*ah6KJmj!tkSMTODn`b5zQ>e%N~6azXAGrMQF(nP~CraODmd}kY(IZXqE1dcxzj{ z21XKt`R5`J6(#7;na`l}?4M)8o$m z0xzrEA>FxSHGa#tK6?zR9dG)!@qe)UiP4v)z)Tj3NzcsvKwMewy^3o{}kh(KI h1nT8Dd2LnCm;lW4eLp+WSTgyZ;w4LOg##kJ~B`fbaPgNPX9&-FMt;rB;=?>gv7rj0hgHD8RUY zyGeh2$H8{ujbkUadrAT`AHy(AX4nc7#Kxdf+9_5X9xZ020rr8_WAC-gV83~Z*1St| z>wnmKwLRC{d`0yMy%jN32x&wJ?4gfvsrrN&7}8hZ=jd)c6zJn|2M~W>Fq^^%<+kuB zIe5Pe$U+E0!8};h#r*&Uk=qKwP3zmdbTVpmw=%TTk$c2AMVUT%M4oE{_o#a;qjnHB zTL_VB7r|S|w1^No(b>qozm&TYs{`cAAx$}l6QgS*jFXp(W zCQz~$8LxkE4>Ag;W?I!{hM%SIGl5n1JMH*>j&>er_^MLh6aaraZnJ#41<5a9_j3{R ztRQF3vw;AUEpV^JjDsNUO;rt0EkJv)z`-f*FpA0u$~Z%5b=0opTl&JcA^>*~U(xRt zz`#uEY%guo?ar?H+2>nQ}UXaLP$H=g;R52MW7To zP5)Sf$ZHjNGds4AR!%78K~)v+aB6DX|XR{+}&xiOzhIX_EUNz2b z9((*?-@Psn&Du`@O7*TMR%zxA!v z{?YcScJdf|N_n6U(uPDYrE{~{Q!Cs - Python Module Index — wsp-balsa 1.4.0 documentation + Python Module Index — wsp-balsa 1.4.2 documentation @@ -27,15 +27,15 @@ - + - - - + + + @@ -432,7 +432,7 @@

        Python Module Index

        diff --git a/docs/routines/best_intermediates.html b/docs/routines/best_intermediates.html index 935bec0..de2d031 100644 --- a/docs/routines/best_intermediates.html +++ b/docs/routines/best_intermediates.html @@ -10,7 +10,7 @@ - Triple-Index Utilities — wsp-balsa 1.4.0 documentation + Triple-Index Utilities — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -362,7 +362,7 @@

        Triple-Index Utilities#

        -balsa.routines.best_intermediates.best_intermediate_subset_zones(pk_subset_cost: Series, pk_table: DataFrame, kq_table: DataFrame, cost_col: str, *, n_subset: int = 1, n_final: int = 1, add_pkq_cost: ndarray | None = None, flag_array: ndarray | None = None, maximize_subset: bool = True, maximize_final: bool = True, null_index: int = 0, other_columns: bool = True, intermediate_name: str = 'intermediate_zone', availability_column: str = 'available', n_threads: int = 1, squeeze: bool = True) DataFrame | Dict[int, DataFrame]#
        +balsa.routines.best_intermediates.best_intermediate_subset_zones(pk_subset_cost: Series, pk_table: DataFrame, kq_table: DataFrame, cost_col: str, *, n_subset: int = 1, n_final: int = 1, add_pkq_cost: ndarray[Any, dtype[ScalarType]] = None, flag_array: ndarray[Any, dtype[ScalarType]] = None, maximize_subset: bool = True, maximize_final: bool = True, null_index: int = 0, other_columns: bool = True, intermediate_name: str = 'intermediate_zone', availability_name: str = 'available', n_threads: int = 1, squeeze: bool = True) DataFrame | Dict[int, DataFrame]#

        Numba-accelerated.

        Triple-index operation for two matrices, finding the most- or least-cost intermediate zones from a subset. Takes a first leg matrix (“pk”) and a second leg matrix (“kq”) to produce a combined “pq” matrix with the best @@ -406,7 +406,7 @@ in the “pk” and “kq” tables. The result table will be of the shape ((p, q), A | E + 3)

      • intermediate_name (str, optional) – Defaults to 'intermediate_zone'. Name of the column in the result table containing the selected intermediate zone.

      • -
      • availability_column (str, optional) – Defaults to 'available'. Name of the column in the result table +

      • availability_name (str, optional) – Defaults to 'available'. Name of the column in the result table containing a flag whether ANY intermediate zone was found to be available.

      • n_threads (int, optional) – Defaults to 1. Number of threads to use.

      • squeeze (bool, optional) – Defaults to True. If n_final == 1 and squeeze=True, a single DataFrame @@ -433,7 +433,7 @@

        -balsa.routines.best_intermediates.best_intermediate_zones(pk_table: DataFrame, kq_table: DataFrame, cost_col: str, *, n: int = 1, add_pkq_cost: ndarray | None = None, flag_array: ndarray | None = None, maximize: bool = True, null_index: int = 0, other_columns: bool = True, intermediate_name: str = 'intermediate_zone', availability_column: str = 'available', n_threads: int = 1, squeeze: bool = True) DataFrame | Dict[int, DataFrame]#
        +balsa.routines.best_intermediates.best_intermediate_zones(pk_table: DataFrame, kq_table: DataFrame, cost_col: str, *, n: int = 1, add_pkq_cost: ndarray[Any, dtype[ScalarType]] = None, flag_array: ndarray[Any, dtype[ScalarType]] = None, maximize: bool = True, null_index: int = 0, other_columns: bool = True, intermediate_name: str = 'intermediate_zone', availability_name: str = 'available', n_threads: int = 1, squeeze: bool = True) DataFrame | Dict[int, DataFrame]#

        Numba-accelerated.

        Triple-index operation for two matrices, finding the most- or least-cost intermediate zones. Takes a first leg matrix (“pk”) and a second leg matrix (“kq”) to produce a combined “pq” matrix with the best intermediate “k”. @@ -471,7 +471,7 @@ in the “pk” and “kq” tables. The result table will be of the shape ((p, q), A | E + 3)

      • intermediate_name (str, optional) – Defaults to 'intermediate_zone'. Name of the column in the result table containing the selected intermediate zone.

      • -
      • availability_column (str, optional) – Defaults to 'available'. Name of the column in the result table +

      • availability_name (str, optional) – Defaults to 'available'. Name of the column in the result table containing a flag whether ANY intermediate zone was found to be available.

      • n_threads (int, optional) – Defaults to 1. Number of threads to use.

      • squeeze (bool, optional) – Defaults to True. If n == 1 and squeeze=True, a single DataFrame is @@ -590,7 +590,7 @@

        diff --git a/docs/routines/general.html b/docs/routines/general.html index 8b8e20b..e21354c 100644 --- a/docs/routines/general.html +++ b/docs/routines/general.html @@ -10,7 +10,7 @@ - General Utilities — wsp-balsa 1.4.0 documentation + General Utilities — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -531,7 +531,7 @@ diff --git a/docs/routines/index.html b/docs/routines/index.html index fa8fb83..8900b2a 100644 --- a/docs/routines/index.html +++ b/docs/routines/index.html @@ -10,7 +10,7 @@ - Routines — wsp-balsa 1.4.0 documentation + Routines — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -369,7 +369,7 @@

        RoutinesIO Utilities

      • Modelling Utilities
          @@ -485,7 +485,7 @@

          Routines

          - Created using Sphinx 7.0.1. + Created using Sphinx 7.1.2.

          diff --git a/docs/routines/io.html b/docs/routines/io.html index b78e71d..55b0c3e 100644 --- a/docs/routines/io.html +++ b/docs/routines/io.html @@ -10,7 +10,7 @@ - IO Utilities — wsp-balsa 1.4.0 documentation + IO Utilities — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -360,7 +360,7 @@

          IO Utilities#

          -

          Routines for reading and writing demand modelling files, particularly matrices and TMG Toolbox network packages.

          +

          Routines for reading and writing demand modelling files, particularly matrices and TMGToolbox network packages.

          Matrices#

          @@ -388,7 +388,7 @@

          Matrices
          -balsa.routines.io.common.expand_array(a: ndarray, n: ndarray, *, axis: int | None = None) ndarray#
          +balsa.routines.io.common.expand_array(a: ndarray, n: ndarray, *, axis: int = None) ndarray#

          Expands an array across all dimensions by a set amount

          Parameters:
          @@ -451,7 +451,7 @@

          Matrices
          -balsa.routines.io.inro.read_emx(file: str | FileIO | Path, *, zones: int | Iterable[int] | Index | None = None, tall: bool = False) ndarray | DataFrame | Series#
          +balsa.routines.io.inro.read_emx(file: str | FileIO | Path, *, zones: int | Iterable[int] | Index = None, tall: bool = False) ndarray | DataFrame | Series#

          Reads an “internal” Emme matrix (found in <Emme Project>/Database/emmemat); with an ‘.emx’ extension. This data format does not contain information about zones. Its size is determined by the dimensions of the Emmebank (Emmebank.dimensions['centroids']), regardless of the number of zones actually used in all scenarios.

          @@ -559,7 +559,7 @@

          OMX format
          -balsa.routines.io.omx.read_omx(src_fp: str | PathLike, *, tables: Iterable[str] | None = None, mapping: str | None = None, tall: bool = False, raw: bool = False, squeeze: bool = True) DataFrame | Series | ndarray | Dict[str, DataFrame | Series | ndarray]#
          +balsa.routines.io.omx.read_omx(src_fp: str | PathLike, *, tables: Iterable[str] = None, mapping: str = None, tall: bool = False, raw: bool = False, squeeze: bool = True) DataFrame | Series | ndarray | Dict[str, DataFrame | Series | ndarray]#

          Reads Open Matrix (OMX) files. An OMX file can contain multiple matrices, so this function typically returns a Dict.

          @@ -584,7 +584,7 @@

          OMX format
          -balsa.routines.io.omx.to_omx(dst_fp: str | PathLike, tables: Dict[str, DataFrame | Series | ndarray], *, zone_index: Index | None = None, title: str = '', descriptions: Dict[str, str] | None = None, attrs: Dict[str, Dict] | None = None, mapping_name: str = 'zone_numbers')#
          +balsa.routines.io.omx.to_omx(dst_fp: str | PathLike, tables: Dict[str, DataFrame | Series | ndarray], *, zone_index: Index = None, title: str = '', descriptions: Dict[str, str] = None, attrs: Dict[str, Dict] = None, mapping_name: str = 'zone_numbers')#

          Creates a new (or overwrites an old) OMX file with a collection of matrices.

          Parameters:
          @@ -612,7 +612,7 @@

          OMX format

          Fortran format#

          -balsa.routines.io.fortran.read_fortran_rectangle(file: str | FileIO | Path, n_columns: int, *, zones: int | Iterable[int] | Index | None = None, tall: bool = False, reindex_rows: bool = False, fill_value: int | float | None = None) ndarray | DataFrame | Series#
          +balsa.routines.io.fortran.read_fortran_rectangle(file: str | FileIO | Path, n_columns: int, *, zones: int | Iterable[int] | Index = None, tall: bool = False, reindex_rows: bool = False, fill_value: int | float = None) ndarray | DataFrame | Series#

          Reads a FORTRAN-friendly .bin file (a.k.a. ‘simple binary format’) which is known to NOT be square. Also works with square matrices.

          This file format is an array of 4-bytes, where each row is prefaced by an integer referring to the 1-based @@ -643,7 +643,7 @@

          OMX format
          -balsa.routines.io.fortran.read_fortran_square(file: str | FileIO | Path, *, zones: int | Iterable[int] | Index | None = None, tall: bool = False) ndarray | DataFrame | Series#
          +balsa.routines.io.fortran.read_fortran_square(file: str | FileIO | Path, *, zones: int | Iterable[int] | Index = None, tall: bool = False) ndarray | DataFrame | Series#

          Reads a FORTRAN-friendly .bin file (a.k.a. ‘simple binary format’) which is known to be square.

          This file format is an array of 4-bytes, where each row is prefaced by an integer referring to the 1-based positional index that FORTRAN uses. The rest of the data are in 4-byte floats. To read this, the number of columns @@ -668,7 +668,7 @@

          OMX format
          -balsa.routines.io.fortran.to_fortran(matrix: ndarray | DataFrame | Series, file: str | FileIO | Path, *, n_columns: int | None = None, min_index: int = 1, force_square: bool = True)#
          +balsa.routines.io.fortran.to_fortran(matrix: ndarray | DataFrame | Series, file: str | FileIO | Path, *, n_columns: int = None, min_index: int = 1, force_square: bool = True)#

          Writes a FORTRAN-friendly .bin file (a.k.a. ‘simple binary format’), in a square format.

          Parameters:
          @@ -688,8 +688,16 @@

          OMX format -

          Network Packages (NWP)#

          +
          +

          Network Packages (NWP)#

          +

          For more information on the TMGToolbox Network Package format, please visit https://tmg.utoronto.ca/doc/1.6/tmgtoolbox/input_output/ExportNetworkPackage.html

          +
          +
          +balsa.routines.io.nwp.parse_tmg_ncs_line_id(s: Series) Tuple[Series, Series]#
          +

          A function to parse line IDs based on TMG Network Coding Standard conventions. Returns pandas Series objects +corresponding to the parsed operator and route IDs

          +
          +
          balsa.routines.io.nwp.process_emme_eng_notation_series(s: ~pandas.core.series.Series, *, to_dtype=<class 'float'>) Series#
          @@ -734,7 +742,7 @@

          OMX format +balsa.routines.io.nwp.read_nwp_link_attributes(nwp_fp: str | PathLike, *, attributes: str | List[str] = None, **kwargs) DataFrame#

          A function to read link attributes from a Network Package file (exported from Emme using the TMG Toolbox).

          Parameters:
          @@ -753,7 +761,7 @@

          OMX format
          -balsa.routines.io.nwp.read_nwp_node_attributes(nwp_fp: str | PathLike, *, attributes: str | List[str] | None = None, **kwargs) DataFrame#
          +balsa.routines.io.nwp.read_nwp_node_attributes(nwp_fp: str | PathLike, *, attributes: str | List[str] = None, **kwargs) DataFrame#

          A function to read node attributes from a Network Package file (exported from Emme using the TMG Toolbox).

          Parameters:
          @@ -806,7 +814,7 @@

          OMX format
          -balsa.routines.io.nwp.read_nwp_transit_line_attributes(nwp_fp: str | PathLike, *, attributes: str | List[str] | None = None, **kwargs) DataFrame#
          +balsa.routines.io.nwp.read_nwp_transit_line_attributes(nwp_fp: str | PathLike, *, attributes: str | List[str] = None, **kwargs) DataFrame#

          A function to read transit line attributes from a Network Package file (exported from Emme using the TMG Toolbox).

          @@ -844,16 +852,16 @@

          OMX format
          -balsa.routines.io.nwp.read_nwp_transit_result_summary(nwp_fp: str | PathLike) DataFrame#
          +balsa.routines.io.nwp.read_nwp_transit_result_summary(nwp_fp: str | PathLike, *, parse_line_id: bool = True) DataFrame#

          A function to read and summarize the transit assignment boardings and max volumes from a Network Package file (exported from Emme using the TMG Toolbox) by operator and route.

          -
          -

          Note

          -

          Transit line names in Emme must adhere to the TMG NCS16 for this function to work properly.

          -
          Parameters:
          -

          nwp_fp (str | PathLike) – File path to the network package.

          +
            +
          • nwp_fp (str | PathLike) – File path to the network package.

          • +
          • parse_line_id (bool, optional) – Defaults to True. Option to parse operator and route IDs from line IDs. +Please note that transit line IDs must adhere to the TMG NCS16 for this option to work properly.

          • +
          Returns:

          pd.DataFrame

          @@ -898,6 +906,24 @@

          OMX format +
          +balsa.routines.io.nwp.read_nwp_transit_vehicles(nwp_fp: str | PathLike) DataFrame#
          +

          A function to read the transit vehicles from a Network Package file (exported from Emme using the TMG Toolbox) +into DataFrames.

          +
          +
          Parameters:
          +

          nwp_fp (str | PathLike) – File path to the network package.

          +
          +
          Returns:
          +

          DataFrame containing the transit vehicles.

          +
          +
          Return type:
          +

          pd.DataFrame

          +
          +
          +

          +

          @@ -976,7 +1002,8 @@

          OMX formatNetwork Packages (NWP) @@ -1034,7 +1062,7 @@

          OMX format

          - Created using Sphinx 7.0.1. + Created using Sphinx 7.1.2.

          diff --git a/docs/routines/matrices.html b/docs/routines/matrices.html index f90a264..3c5cb7d 100644 --- a/docs/routines/matrices.html +++ b/docs/routines/matrices.html @@ -10,7 +10,7 @@ - Matrix Utilities — wsp-balsa 1.4.0 documentation + Matrix Utilities — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -362,21 +362,21 @@

          Matrix Utilities#

          -balsa.routines.matrices.aggregate_matrix(matrix: ~pandas.core.frame.DataFrame | ~pandas.core.series.Series, *, groups: ~pandas.core.series.Series | ~numpy.ndarray | None = None, row_groups: ~pandas.core.series.Series | ~numpy.ndarray | None = None, col_groups: ~pandas.core.series.Series | ~numpy.ndarray | None = None, aggfunc: ~typing.Callable[[~typing.Iterable[int | float]], int | float] = <function sum>) DataFrame | Series#
          +balsa.routines.matrices.aggregate_matrix(matrix: ~pandas.core.frame.DataFrame | ~pandas.core.series.Series, *, groups: ~pandas.core.series.Series | ~numpy.ndarray[~typing.Any, ~numpy.dtype[~numpy._typing._generic_alias.ScalarType]] = None, row_groups: ~pandas.core.series.Series | ~numpy.ndarray[~typing.Any, ~numpy.dtype[~numpy._typing._generic_alias.ScalarType]] = None, col_groups: ~pandas.core.series.Series | ~numpy.ndarray[~typing.Any, ~numpy.dtype[~numpy._typing._generic_alias.ScalarType]] = None, aggfunc: ~typing.Callable[[~typing.Iterable[int | float]], int | float] = <function sum>) DataFrame | Series#

          Aggregates a matrix based on mappings provided for each axis, using a specified aggregation function.

          Parameters:
          • matrix (pandas.DataFrame | pandas.Series) – Matrix data to aggregate. DataFrames and Series with 2-level indices are supported

          • -
          • groups (pandas.Series | numpy.ndarray, optional) – Syntactic sugar to specify both row_groups and +

          • groups (pandas.Series | NDArray, optional) – Syntactic sugar to specify both row_groups and col_groups to use the same grouping series.

          • -
          • row_groups (pandas.Series | numpy.ndarray, optional) – Groups for the rows. If aggregating a DataFrame, +

          • row_groups (pandas.Series | NDArray, optional) – Groups for the rows. If aggregating a DataFrame, this must match the index of the matrix. For a “tall” matrix, this series can match either the “full” index of the series, or it can match the first level of the matrix (it would be the same as if aggregating a DataFrame). Alternatively, an array can be provided, but it must be the same length as the DataFrame’s index, or the full length of the Series.

          • -
          • col_groups (pandas.Series | numpy.ndarray, optional) – Groups for the columns. If aggregating a DataFrame, +

          • col_groups (pandas.Series | NDArray, optional) – Groups for the columns. If aggregating a DataFrame, this must match the columns of the matrix. For a “tall” matrix, this series can match either the “full” index of the series, or it can match the second level of the matrix (it would be the same as if aggregating a DataFrame). Alternatively, an array can be provided, but it must be the same length as the DataFrame’s @@ -529,7 +529,7 @@

            -balsa.routines.matrices.disaggregate_matrix(matrix: DataFrame, *, mapping: Series | None = None, proportions: Series | None = None, row_mapping: Series | None = None, row_proportions: Series | None = None, col_mapping: Series | None = None, col_proportions: Series | None = None) DataFrame#
            +balsa.routines.matrices.disaggregate_matrix(matrix: DataFrame, *, mapping: Series = None, proportions: Series = None, row_mapping: Series = None, row_proportions: Series = None, col_mapping: Series = None, col_proportions: Series = None) DataFrame#

            Split multiple rows and columns in a matrix all at once. The cells in the matrix MUST be numeric, but the row and column labels do not.

            @@ -746,13 +746,13 @@
            -balsa.routines.matrices.matrix_balancing_1d(m: ndarray, a: ndarray, axis: int) ndarray#
            +balsa.routines.matrices.matrix_balancing_1d(m: ndarray[Any, dtype[ScalarType]], a: ndarray[Any, dtype[ScalarType]], axis: int) ndarray[Any, dtype[ScalarType]]#

            Balances a matrix using a single constraint.

            Parameters:
              -
            • m (numpy.ndarray) – The matrix (a 2-dimensional ndarray) to be balanced

            • -
            • a (numpy.ndarray) – The totals vector (a 1-dimensional ndarray) constraint

            • +
            • m (NDArray) – The matrix (a 2-dimensional ndarray) to be balanced

            • +
            • a (NDArray) – The totals vector (a 1-dimensional ndarray) constraint

            • axis (int) – Direction to constrain (0 = along columns, 1 = along rows)

            @@ -760,22 +760,22 @@

            A balanced matrix

            Return type:
            -

            numpy.ndarray

            +

            NDArray

            -balsa.routines.matrices.matrix_balancing_2d(m: ndarray | DataFrame, a: ndarray, b: ndarray, *, totals_to_use: str = 'raise', max_iterations: int = 1000, rel_error: float = 0.0001, n_procs: int = 1) Tuple[ndarray | DataFrame, float, int]#
            +balsa.routines.matrices.matrix_balancing_2d(m: ndarray[Any, dtype[ScalarType]] | DataFrame, a: ndarray[Any, dtype[ScalarType]], b: ndarray[Any, dtype[ScalarType]], *, totals_to_use: str = 'raise', max_iterations: int = 1000, rel_error: float = 0.0001, n_threads: int = 1) Tuple[ndarray[Any, dtype[ScalarType]] | DataFrame, float, int]#

            Balances a two-dimensional matrix using iterative proportional fitting.

            Parameters:
              -
            • m (numpy.ndarray | pandas.DataFrame) – The matrix (a 2-dimensional ndarray) to be balanced. If a DataFrame +

            • m (NDArray | pandas.DataFrame) – The matrix (a 2-dimensional ndarray) to be balanced. If a DataFrame is supplied, the output will be returned as a DataFrame.

            • -
            • a (numpy.ndarray) – The row totals (a 1-dimensional ndarray) to use for balancing

            • -
            • b (numpy.ndarray) – The column totals (a 1-dimensional ndarray) to use for balancing

            • +
            • a (NDArray) – The row totals (a 1-dimensional ndarray) to use for balancing

            • +
            • b (NDArray) – The column totals (a 1-dimensional ndarray) to use for balancing

            • totals_to_use (str, optional) – Defaults to 'raise'. Describes how to scale the row and column totals if their sums do not match. Must be one of [‘rows’, ‘columns’, ‘average’, ‘raise’]. - rows: scales the columns totals so that their sums matches the row totals @@ -784,26 +784,26 @@ - raise: raises an Exception if the sums of the row and column totals do not match

            • max_iterations (int, optional) – Defaults to 1000. Maximum number of iterations

            • rel_error (float, optional) – Defaults to 1.0E-4. Relative error stopping criteria

            • -
            • n_procs (int, optional) – Defaults to 1. Number of processors for parallel computation. (Not used)

            • +
            • n_threads (int, optional) – Defaults to 1. Number of processors for parallel computation. (Not used)

            Returns:

            The balanced matrix, residual, and n_iterations

            Return type:
            -

            Tuple[numpy.ndarray | pandas.DataFrame, float, int]

            +

            Tuple[NDArray | pandas.DataFrame, float, int]

            -balsa.routines.matrices.matrix_bucket_rounding(m: ndarray | DataFrame, *, decimals: int = 0) ndarray | DataFrame#
            +balsa.routines.matrices.matrix_bucket_rounding(m: ndarray[Any, dtype[ScalarType]] | DataFrame, *, decimals: int = 0) ndarray[Any, dtype[ScalarType]] | DataFrame#

            Bucket rounds to the given number of decimals.

            Parameters:
              -
            • m (numpy.ndarray | pandas.DataFrame) – The matrix to be rounded

            • +
            • m (NDArray | pandas.DataFrame) – The matrix to be rounded

            • decimals (int, optional) – Defaults to 0. Number of decimal places to round to. If decimals is negative, it specifies the number of positions to the left of the decimal point.

            @@ -812,7 +812,7 @@

            The rounded matrix

            Return type:
            -

            numpy.ndarray | pandas.DataFrame

            +

            NDArray | pandas.DataFrame

            @@ -941,7 +941,7 @@ diff --git a/docs/routines/modelling.html b/docs/routines/modelling.html index d7b15e5..a8d0519 100644 --- a/docs/routines/modelling.html +++ b/docs/routines/modelling.html @@ -10,7 +10,7 @@ - Modelling Utilities — wsp-balsa 1.4.0 documentation + Modelling Utilities — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -405,7 +405,7 @@
            -balsa.routines.modelling.distance_matrix(x0: ndarray | Series, y0: ndarray | Series, *, labels0: Iterable | Index | None = None, tall: bool = False, x1: Series | ndarray | None = None, y1: Series | ndarray | None = None, labels1: Series | ndarray | None = None, method: str = 'EUCLIDEAN', **kwargs) Series | DataFrame | ndarray#
            +balsa.routines.modelling.distance_matrix(x0: ndarray | Series, y0: ndarray | Series, *, labels0: Iterable | Index = None, tall: bool = False, x1: ndarray | Series = None, y1: ndarray | Series = None, labels1: ndarray | Series = None, method: str = 'EUCLIDEAN', **kwargs) Series | DataFrame | ndarray#

            Fastest method of computing a distance matrix from vectors of coordinates, using the NumExpr package. Supports several equations for computing distances.

            Accepts two or four vectors of x-y coordinates. If only two vectors are provided (x0, y0), the result will be the @@ -470,7 +470,7 @@

            -balsa.routines.modelling.tlfd(values: ndarray | Series, *, bin_start: int = 0, bin_end: int = 200, bin_step: int = 2, weights: Series | ndarray | None = None, intrazonal: Series | ndarray | None = None, label_type: str = 'MULTI', include_top: bool = False) Series#
            +balsa.routines.modelling.tlfd(values: ndarray | Series, *, bin_start: int = 0, bin_end: int = 200, bin_step: int = 2, weights: ndarray | Series = None, intrazonal: ndarray | Series = None, label_type: str = 'MULTI', include_top: bool = False) Series#

            Generates a Trip Length Frequency Distribution (i.e. a histogram) from given data. Produces a “pretty” Pandas object suitable for charting.

            @@ -601,7 +601,7 @@ diff --git a/docs/routines/plotting.html b/docs/routines/plotting.html index f2a177b..5f0da0d 100644 --- a/docs/routines/plotting.html +++ b/docs/routines/plotting.html @@ -10,7 +10,7 @@ - Plotting Utilities — wsp-balsa 1.4.0 documentation + Plotting Utilities — wsp-balsa 1.4.2 documentation @@ -30,15 +30,15 @@ - + - - - + + + @@ -362,7 +362,7 @@

            Plotting Utilities#

            -balsa.routines.plotting.convergence_boxplot(targets: DataFrame, results: DataFrame, filter_func: Callable[[Series], Series], *, adjust_target: bool = True, percentage: bool = True, band: Tuple[float, float] | None = None, simple_labels: bool = True, ax: Axes | None = None, fp: str | PathLike | None = None, title: str | None = None) Axes#
            +balsa.routines.plotting.convergence_boxplot(targets: DataFrame, results: DataFrame, filter_func: Callable[[Series], Series], *, adjust_target: bool = True, percentage: bool = True, band: Tuple[float, float] = None, simple_labels: bool = True, ax: Axes = None, fp: str | PathLike = None, title: str = None) Axes#

            Measures convergence of constrained location-choice models (such as work-location choice). Can be used to produce multiple box plots for different sub-sets of zones, usually based on size.

            @@ -388,7 +388,7 @@
            -balsa.routines.plotting.location_summary(model: DataFrame, target: DataFrame, ensemble_names: Series, *, title: str = '', fp: str | PathLike | None = None, dpi: int = 150, district_name: str = 'Ensemble') Axes#
            +balsa.routines.plotting.location_summary(model: DataFrame, target: DataFrame, ensemble_names: Series, *, title: str = '', fp: str | PathLike = None, dpi: int = 150, district_name: str = 'Ensemble') Axes#

            Creates a compound plot showing total attractions to specified locations

            Parameters:
            @@ -410,7 +410,7 @@
            -balsa.routines.plotting.trumpet_diagram(counts: Series, model_volume: Series, *, categories: Series | List[Series] | None = None, category_colours: Dict[str | tuple, str] | None = None, category_markers: Dict[str | tuple, str] | None = None, label_format: str | None = None, title: str = '', y_bounds: Tuple[float, float] = (-2, 2), ax: Axes | None = None, x_label: str = 'Count volume', legend: bool = True, **kwargs) Axes#
            +balsa.routines.plotting.trumpet_diagram(counts: Series, model_volume: Series, *, categories: Series | List[Series] = None, category_colours: Dict[str | tuple, str] = None, category_markers: Dict[str | tuple, str] = None, label_format: str = None, title: str = '', y_bounds: Tuple[float, float] = (-2, 2), ax: Axes = None, x_label: str = 'Count volume', legend: bool = True, **kwargs) Axes#

            Plots an auto volumes “trumpet” diagram of relative error vs. target count, and will draw min/max error curves based on FHWA guidelines. Can be used to plot different categories of count locations.

            @@ -545,7 +545,7 @@ diff --git a/docs/search.html b/docs/search.html index b25d2c6..5198b89 100644 --- a/docs/search.html +++ b/docs/search.html @@ -6,7 +6,7 @@ - Search - wsp-balsa 1.4.0 documentation + Search - wsp-balsa 1.4.2 documentation @@ -26,15 +26,15 @@ - + - - - + + + @@ -386,7 +386,7 @@

            Search

            diff --git a/docs/searchindex.js b/docs/searchindex.js index edc31ab..691c7b4 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["index", "logging/index", "routines/best_intermediates", "routines/general", "routines/index", "routines/io", "routines/matrices", "routines/modelling", "routines/plotting"], "filenames": ["index.rst", "logging\\index.rst", "routines\\best_intermediates.rst", "routines\\general.rst", "routines\\index.rst", "routines\\io.rst", "routines\\matrices.rst", "routines\\modelling.rst", "routines\\plotting.rst"], "titles": ["wsp-balsa: Common modelling tools", "Logging", "Triple-Index Utilities", "General Utilities", "Routines", "IO Utilities", "Matrix Utilities", "Modelling Utilities", "Plotting Utilities"], "terms": {"i": [0, 1, 2, 3, 5, 6, 7, 8], "collect": [0, 1, 4, 5], "function": [0, 1, 2, 4, 5, 6, 7], "python": [0, 1, 3, 5], "facilit": 0, "travel": 0, "demand": [0, 5], "forecast": 0, "applic": 0, "analys": 0, "It": [0, 3, 6], "design": 0, "work": [0, 2, 5, 8], "scientif": 0, "stack": [0, 6], "name": [0, 1, 2, 3, 5], "numpi": [0, 2, 5, 6, 7], "panda": [0, 2, 3, 5, 6, 7, 8], "matplotlib": [0, 8], "which": [0, 1, 3, 5, 7, 8], "ar": [0, 1, 2, 3, 5, 6, 7, 8], "optim": 0, "speed": 0, "usabl": 0, "The": [0, 1, 2, 3, 5, 6, 7, 8], "packag": [0, 4, 7], "mostli": 0, "consist": 0, "standalon": [0, 4], "input": [0, 2, 5, 6], "output": [0, 2, 6], "analysi": 0, "etc": [0, 2], "well": 0, "few": [0, 3], "lightweight": 0, "class": [0, 1, 5], "base": [0, 1, 3, 5, 6, 7, 8], "data": [0, 2, 5, 6, 7], "structur": [0, 5], "specif": 0, "import": [0, 1], "statement": [0, 1], "follow": 0, "routin": [0, 2, 3, 5, 6, 7, 8], "gener": [0, 1, 4, 5, 7, 8], "util": [0, 4], "align_categori": [0, 3, 4], "is_identifi": [0, 3, 4], "sort_nic": [0, 3, 4], "sum_df_sequ": [0, 3, 4], "io": [0, 4], "matric": [0, 2, 4, 6], "network": [0, 4], "nwp": [0, 4], "distance_arrai": [0, 4, 7], "distance_matrix": [0, 4, 7], "tlfd": [0, 4, 7], "matrix": [0, 2, 4, 5, 7], "aggregate_matrix": [0, 4, 6], "disaggregate_matrix": [0, 4, 6], "fast_stack": [0, 4, 6], "fast_unstack": [0, 4, 6], "matrix_balancing_1d": [0, 4, 6], "matrix_balancing_2d": [0, 4, 6], "matrix_bucket_round": [0, 4, 6], "split_zone_in_matrix": [0, 4, 6], "plot": [0, 4], "convergence_boxplot": [0, 4, 8], "location_summari": [0, 4, 8], "trumpet_diagram": [0, 4, 8], "log": 0, "logformat": [0, 1], "modellogg": [0, 1], "report": [0, 1], "subproc_err": [0, 1], "subproc_messag": [0, 1], "tip": [0, 1], "get_model_logg": [0, 1], "init_root": [0, 1], "log_to_fil": [0, 1], "configur": [1, 7], "logger": 1, "object": [1, 3, 5, 7, 8], "re": [1, 6], "purpos": 1, "provid": [1, 2, 5, 6, 7, 8], "detail": 1, "statu": 1, "messag": 1, "dure": 1, "model": [1, 4, 5, 8], "program": 1, "execut": 1, "balsa": [1, 2, 3, 5, 6, 7, 8], "valu": [1, 2, 3, 5, 6, 7, 8], "an": [1, 2, 5, 6, 7, 8], "enumer": 1, "str": [1, 2, 3, 5, 6, 7, 8], "level": [1, 2, 5, 6, 7], "int": [1, 2, 3, 5, 6, 7, 8], "0": [1, 2, 3, 5, 6, 7], "msg": 1, "arg": [1, 5], "kwarg": [1, 5, 7, 8], "us": [1, 2, 3, 5, 6, 7, 8], "statist": 1, "result": [1, 2, 3, 5, 6, 7, 8], "user": 1, "distinct": 1, "from": [1, 2, 5, 6, 7, 8], "info": 1, "inform": [1, 5], "print": [1, 5], "green": 1, "when": [1, 2, 3, 5, 6, 7, 8], "colour": [1, 8], "avail": [1, 2], "subprocess": 1, "error": [1, 6, 8], "more": [1, 6, 7], "signific": 1, "e": [1, 2, 6, 7], "g": [1, 2, 6, 7], "new": [1, 5, 6], "section": 1, "similar": 1, "emphas": 1, "blue": 1, "retriev": 1, "root_nam": 1, "stream_format": 1, "fanci": 1, "log_debug": 1, "bool": [1, 2, 3, 5, 6, 7, 8], "true": [1, 2, 5, 6, 7, 8], "initi": 1, "file_nam": 1, "pathlik": [1, 5, 8], "append": 1, "fals": [1, 2, 5, 6, 7], "raw_ascii": 1, "context": [1, 5, 7], "manag": [1, 5], "open": [1, 5], "close": [1, 5, 8], "logfil": 1, "clean": 1, "up": [1, 6], "its": [1, 2, 5], "file": [1, 5], "handler": [1, 5], "exit": 1, "thi": [1, 2, 3, 5, 6, 7, 8], "especi": [1, 8], "batch": 1, "run": 1, "becaus": [1, 8], "modul": 1, "global": 1, "without": 1, "cleanup": 1, "old": [1, 5, 6], "would": [1, 6], "stick": 1, "around": 1, "get": [1, 5], "written": [1, 5], "paramet": [1, 2, 3, 5, 6, 7, 8], "union": [1, 2, 8], "filepath": 1, "write": [1, 5], "record": 1, "option": [1, 2, 3, 5, 6, 7, 8], "default": [1, 2, 3, 5, 6, 7, 8], "exist": [1, 5], "ensur": [1, 5], "onli": [1, 2, 5, 6, 7, 8], "contain": [1, 2, 5], "valid": [1, 3, 5, 7], "ascii": 1, "charact": 1, "iter": [3, 5, 6, 7], "seri": [2, 3, 5, 6, 7, 8], "datafram": [2, 3, 5, 6, 7, 8], "pre": 3, "process": 3, "step": 3, "pd": [2, 3, 5], "concat": 3, "attempt": 3, "align": 3, "ani": [2, 3, 5], "categor": [3, 8], "sequenc": 3, "same": [2, 3, 5, 6, 7], "set": [3, 5, 6, 7, 8], "categori": [3, 7, 8], "pass": [3, 5, 7, 8], "through": 3, "twice": 3, "onc": [3, 5, 6], "accumul": 3, "complet": 3, "all": [2, 3, 5, 6, 7, 8], "second": [2, 3, 6, 7], "time": [3, 6], "modifi": 3, "": [2, 3, 5, 6], "content": 3, "full": [3, 6], "place": [3, 6], "lex": 3, "sort": 3, "builtin": 3, "anyth": 3, "accept": [3, 7], "test": 3, "variabl": [3, 6], "doe": [3, 5, 6, 8], "collid": 3, "reserv": 3, "keyword": [3, 5], "return": [2, 3, 5, 6, 7, 8], "If": [2, 3, 5, 6, 7], "type": [2, 3, 5, 6, 7, 8], "l": 3, "list": [3, 5, 6, 8], "given": [3, 5, 6, 7], "string": [3, 8], "wai": 3, "human": 3, "expect": 3, "seq": 3, "fill_valu": [3, 5], "float": [3, 5, 6, 7, 8], "sum": [3, 6], "over": [3, 7], "even": 3, "thei": [3, 5], "have": [3, 5, 7], "differ": [2, 3, 5, 7, 8], "index": [0, 3, 4, 5, 6, 7, 8], "column": [2, 3, 5, 6], "fill": [2, 3, 5], "your": 3, "choic": [2, 3, 8], "miss": [3, 5, 8], "row": [3, 5, 6], "you": 3, "suppos": 3, "might": 3, "order": [3, 5], "unord": 3, "cell": [3, 6], "item": [3, 5, 8], "A": [2, 4, 5, 6, 7], "perform": [4, 5, 6], "variou": 4, "task": 4, "read": 5, "particularli": 5, "tmg": 5, "toolbox": 5, "coerce_matrix": 5, "ndarrai": [2, 5, 6, 7], "allow_raw": 5, "force_squar": 5, "infer": [5, 7], "arrai": [2, 5, 6, 7], "2d": [5, 7], "float32": 5, "expand_arrai": 5, "n": [2, 5, 7], "axi": [5, 6, 8], "none": [2, 5, 6, 7, 8], "expand": [5, 6], "across": 5, "dimens": 5, "amount": 5, "non": 5, "neg": [5, 6], "number": [2, 5, 6], "along": [5, 6], "ax": [5, 8], "open_fil": 5, "file_handl": 5, "path": [2, 5, 8], "fileio": 5, "sever": [5, 6, 7], "support": [5, 6, 7], "unicod": 5, "pathlib": 5, "alreadi": 5, "usual": [5, 8], "mode": 5, "w": 5, "yield": 5, "automat": 5, "out": 5, "peek_mdf": 5, "as_index": 5, "partial": 5, "mdf": 5, "zone": [2, 5, 6, 8], "system": 5, "rather": 5, "than": 5, "One": 5, "each": [5, 6, 7, 8], "otherwis": [2, 5, 7], "read_emx": 5, "tall": [2, 5, 6, 7], "intern": 5, "found": [2, 5], "project": 5, "databas": 5, "emmemat": 5, "emx": 5, "extens": 5, "about": 5, "Its": [5, 6], "size": [5, 7, 8], "determin": [2, 5], "emmebank": 5, "centroid": 5, "regardless": 5, "actual": 5, "scenario": 5, "interpret": 5, "label": [2, 5, 6, 7, 8], "depend": [5, 7], "integ": 5, "truncat": 5, "maximum": [5, 6, 7], "1d": 5, "zone_index": 5, "exampl": [5, 6], "For": [5, 6, 8], "20": [5, 6], "mf1": 5, "shape": [2, 5, 6, 7], "10": [5, 6], "rang": 5, "core": [5, 6], "frame": [5, 6], "100": [5, 6], "read_mdf": 5, "raw": [5, 7], "offici": 5, "binari": 5, "serial": 5, "creat": [5, 8], "matrixdata": 5, "save": 5, "There": [2, 5], "recommend": [5, 6], "emxd": 5, "also": [2, 5], "sometim": 5, "encount": 5, "unlabel": 5, "store": 5, "to_emx": 5, "emmebank_zon": 5, "must": [2, 5, 6, 8], "known": [5, 6], "correctli": 5, "disk": 5, "multiindex": [2, 5, 6, 7], "exactli": 5, "2": [2, 5, 6, 7, 8], "unstack": [5, 6], "target": [5, 6, 8], "to_mdf": 5, "can": [5, 6, 7, 8], "load": 5, "librari": 5, "openmatrix": 5, "doesn": 5, "t": 5, "lot": [5, 6], "interoper": 5, "wrapper": 5, "produc": [2, 5, 7, 8], "directli": [5, 7], "read_omx": 5, "src_fp": 5, "tabl": [2, 5, 7], "map": [5, 6, 8], "squeez": [2, 5], "dict": [2, 5, 6, 8], "multipl": [2, 5, 6, 8], "so": [2, 5, 6], "typic": 5, "cannot": 5, "advanc": 5, "one": [2, 5, 6, 7], "instead": 5, "to_omx": 5, "dst_fp": 5, "titl": [5, 8], "descript": 5, "attr": 5, "mapping_nam": 5, "zone_numb": 5, "overwrit": 5, "permit": 5, "encod": 5, "metadata": 5, "check": [5, 6], "done": 5, "np": [5, 6], "overrid": [5, 7], "read_fortran_rectangl": 5, "n_column": 5, "reindex_row": 5, "friendli": 5, "bin": [5, 7], "k": [2, 5], "simpl": 5, "NOT": 5, "squar": [5, 6], "4": [5, 6, 7], "byte": 5, "where": 5, "prefac": 5, "refer": 5, "1": [2, 5, 6, 7], "posit": [5, 6], "rest": 5, "To": 5, "present": 5, "sinc": 5, "self": 5, "specifi": [2, 5, 6, 7, 8], "version": 5, "reindex": 5, "rais": [5, 6], "assertionerror": 5, "read_fortran_squar": 5, "method": [5, 7], "to_fortran": 5, "min_index": 5, "desir": [5, 7], "width": 5, "4000": 5, "3500x3500": 5, "pad": 5, "500": 5, "extra": 5, "lowest": 5, "slice": 5, "process_emme_eng_notation_seri": 5, "to_dtyp": 5, "convert": [5, 6, 7, 8], "engin": 5, "notat": 5, "read_nwp_base_network": 5, "nwp_fp": 5, "tupl": [5, 6, 8], "export": 5, "node": 5, "link": 5, "read_nwp_exatts_list": 5, "attribut": 5, "argument": [5, 6, 7], "read_csv": 5, "read_nwp_link_attribut": 5, "extract": 5, "note": [5, 6], "inod": 5, "jnode": 5, "includ": [2, 5], "read_nwp_node_attribut": 5, "read_nwp_traffic_result": 5, "traffic": 5, "assign": [5, 6], "read_nwp_traffic_results_at_countpost": 5, "countpost_att": 5, "countpost": 5, "identifi": 5, "filter": 5, "read_nwp_transit_line_attribut": 5, "transit": 5, "line": [5, 7, 8], "read_nwp_transit_network": 5, "transt": 5, "segment": 5, "read_nwp_transit_result_summari": 5, "summar": 5, "board": 5, "max": [2, 5, 8], "volum": [5, 8], "oper": [2, 5], "rout": 5, "adher": 5, "ncs16": 5, "properli": 5, "read_nwp_transit_segment_result": 5, "alight": 5, "read_nwp_transit_station_result": 5, "station_line_nod": 5, "off": 5, "station": 5, "being": 5, "itself": [5, 7], "repres": [2, 5, 7, 8], "stop": [5, 6], "group": 6, "row_group": 6, "col_group": 6, "aggfunc": 6, "callabl": [6, 8], "aggreg": 6, "indic": [2, 6, 7], "syntact": 6, "sugar": 6, "both": [2, 6, 7], "match": [6, 8], "either": [6, 7], "first": [2, 6, 7], "altern": 6, "length": [6, 7], "wa": [2, 6], "3": [2, 6], "5": 6, "6": 6, "7": 6, "9": 6, "8": 6, "b": 6, "c": 6, "new_matrix": 6, "42": 6, "28": 6, "26": 6, "14": 6, "23": 6, "36": 6, "17": 6, "25": 6, "proport": 6, "row_map": 6, "row_proport": 6, "col_map": 6, "col_proport": 6, "split": 6, "numer": [2, 6], "do": 6, "disaggreg": 6, "like": [6, 7], "except": 6, "appli": [6, 7], "total": [6, 8], "origin": 6, "df": 6, "30": 6, "correspond": 6, "prop": 6, "a1": 6, "a2": 6, "75": 6, "b1": 6, "55": 6, "b2": 6, "45": 6, "c1": 6, "62": 6, "c2": 6, "38": 6, "625": 6, "875": 6, "125": 6, "375": 6, "900": 6, "12": 6, "300": 6, "700": 6, "750": 6, "250": 6, "025": 6, "475": 6, "410": 6, "090": 6, "790": 6, "710": 6, "650": 6, "13": 6, "95": 6, "820": 6, "580": 6, "688": 6, "712": 6, "850": 6, "180": 6, "420": 6, "888": 6, "multi_index": 6, "deep_copi": 6, "action": 6, "better": 6, "beforehand": 6, "wide": 6, "format": [2, 6, 7], "invers": 6, "entri": 6, "compat": 6, "sourc": 6, "therefor": 6, "whole": 6, "ahead": 6, "flag": [2, 6, 8], "should": 6, "view": 6, "underli": 6, "copi": 6, "deep": 6, "take": [2, 6], "littl": 6, "longer": 6, "memori": 6, "preserv": 6, "most": [2, 6, 8], "dat": 6, "m": [6, 7], "balanc": 6, "singl": [2, 6], "constraint": 6, "dimension": [2, 6, 7], "vector": [6, 7], "direct": 6, "constrain": [6, 8], "totals_to_us": 6, "max_iter": 6, "1000": 6, "rel_error": 6, "0001": 6, "n_proc": 6, "two": [2, 6, 7], "fit": 6, "suppli": 6, "describ": [6, 7], "how": 6, "scale": 6, "averag": 6, "0e": 6, "rel": [6, 8], "criteria": 6, "processor": 6, "parallel": 6, "comput": [6, 7], "Not": 6, "residu": 6, "n_iter": 6, "decim": 6, "bucket": 6, "round": 6, "left": 6, "point": [6, 7], "base_matrix": 6, "old_zon": 6, "new_zon": 6, "prorat": 6, "affect": 6, "remov": 6, "add": [6, 7, 8], "x0": 7, "y0": 7, "x1": 7, "y1": 7, "euclidean": 7, "fast": 7, "distanc": 7, "between": 7, "x": [7, 8], "y": [7, 8], "separ": 7, "numexpr": 7, "equat": 7, "lon": 7, "coordin": 7, "lat": 7, "straight": 7, "crow": 7, "fli": 7, "manhattan": 7, "haversin": 7, "addit": [2, 7, 8], "scalar": 7, "evalu": [2, 7], "coord_unit": 7, "factor": 7, "convers": 7, "unit": 7, "km": 7, "earth_radius_factor": 7, "other": 7, "labels0": 7, "labels1": 7, "fastest": 7, "four": 7, "product": 7, "vector0": 7, "vector1": 7, "n0": 7, "n1": 7, "whose": 7, "alwai": [7, 8], "could": 7, "whether": [2, 7], "cross": 7, "try": 7, "them": 7, "bin_start": 7, "bin_end": 7, "200": [7, 8], "bin_step": 7, "weight": 7, "intrazon": 7, "label_typ": 7, "multi": 7, "include_top": 7, "trip": 7, "frequenc": 7, "distribut": 7, "histogram": 7, "pretti": 7, "suitabl": 7, "chart": 7, "minimum": 7, "limit": [7, 8], "ignor": 7, "count": [7, 8], "under": 7, "see": [7, 8], "boolean": [2, 7], "consid": [2, 7], "prepend": 7, "front": 7, "text": 7, "bottom": 7, "top": [2, 7], "abov": 7, "bin_top": 7, "go": 7, "inf": [2, 7], "unweight": 7, "filter_func": 8, "adjust_target": 8, "percentag": 8, "band": 8, "simple_label": 8, "fp": 8, "measur": 8, "converg": 8, "locat": 8, "box": 8, "sub": 8, "ensemble_nam": 8, "dpi": 8, "150": 8, "district_nam": 8, "ensembl": 8, "compound": 8, "show": 8, "attract": 8, "model_volum": 8, "category_colour": 8, "category_mark": 8, "label_format": 8, "y_bound": 8, "x_label": 8, "legend": 8, "auto": 8, "trumpet": 8, "diagram": 8, "v": 8, "draw": 8, "min": [2, 8], "curv": 8, "fhwa": 8, "guidelin": 8, "need": 8, "uniqu": 8, "classif": 8, "enabl": 8, "hex": 8, "revert": 8, "style": 8, "marker": 8, "http": 8, "org": 8, "api": 8, "markers_api": 8, "html": 8, "readabl": 8, "relev": 8, "code": 8, "current_label": 8, "category_kei": 8, "veri": 8, "high": 8, "intercept": 8, "subplot": 8, "scatter": 8, "case": 8, "realli": 8, "tripl": [0, 4], "best_intermediate_subset_zon": [0, 2, 4], "best_intermediate_zon": [0, 2, 4], "best_intermedi": 2, "pk_subset_cost": 2, "pk_tabl": 2, "kq_tabl": 2, "cost_col": 2, "n_subset": 2, "n_final": 2, "add_pkq_cost": 2, "flag_arrai": 2, "maximize_subset": 2, "maximize_fin": 2, "null_index": 2, "other_column": 2, "intermediate_nam": 2, "intermediate_zon": 2, "availability_column": 2, "n_thread": 2, "numba": 2, "acceler": 2, "find": 2, "least": 2, "cost": 2, "intermedi": 2, "subset": 2, "leg": 2, "pk": 2, "kq": 2, "combin": 2, "pq": 2, "best": 2, "construct": 2, "_n_final_": 2, "restrict": 2, "dtype": 2, "long": 2, "share": 2, "essenti": 2, "defin": 2, "within": 2, "carri": 2, "forward": 2, "unmodifi": 2, "retain": 2, "ad": 2, "togeth": 2, "thu": 2, "In": 2, "minim": 2, "respect": 2, "sentinel": 2, "unavail": 2, "interchang": 2, "p": 2, "q": 2, "access": 2, "egress": 2, "maxim": 2, "rank": 2, "_n_subset_": 2, "select": 2, "correct": 2, "part": 2, "pkq": 2, "pair": 2, "NO": 2, "thread": 2, "dictionari": 2, "associ": 2, "appropri": 2, "chosen": 2, "kei": 2, "just": 2, "_n_": 2}, "objects": {"balsa": [[1, 0, 0, "-", "logging"]], "balsa.logging": [[1, 1, 1, "", "LogFormats"], [1, 1, 1, "", "ModelLogger"], [1, 3, 1, "", "get_model_logger"], [1, 3, 1, "", "init_root"], [1, 3, 1, "", "log_to_file"]], "balsa.logging.ModelLogger": [[1, 2, 1, "", "report"], [1, 2, 1, "", "subproc_err"], [1, 2, 1, "", "subproc_message"], [1, 2, 1, "", "tip"]], "balsa.routines": [[2, 0, 0, "-", "best_intermediates"], [3, 0, 0, "-", "general"], [6, 0, 0, "-", "matrices"], [7, 0, 0, "-", "modelling"], [8, 0, 0, "-", "plotting"]], "balsa.routines.best_intermediates": [[2, 3, 1, "", "best_intermediate_subset_zones"], [2, 3, 1, "", "best_intermediate_zones"]], "balsa.routines.general": [[3, 3, 1, "", "align_categories"], [3, 3, 1, "", "is_identifier"], [3, 3, 1, "", "sort_nicely"], [3, 3, 1, "", "sum_df_sequence"]], "balsa.routines.io": [[5, 0, 0, "-", "common"], [5, 0, 0, "-", "fortran"], [5, 0, 0, "-", "inro"], [5, 0, 0, "-", "nwp"], [5, 0, 0, "-", "omx"]], "balsa.routines.io.common": [[5, 3, 1, "", "coerce_matrix"], [5, 3, 1, "", "expand_array"], [5, 3, 1, "", "open_file"]], "balsa.routines.io.fortran": [[5, 3, 1, "", "read_fortran_rectangle"], [5, 3, 1, "", "read_fortran_square"], [5, 3, 1, "", "to_fortran"]], "balsa.routines.io.inro": [[5, 3, 1, "", "peek_mdf"], [5, 3, 1, "", "read_emx"], [5, 3, 1, "", "read_mdf"], [5, 3, 1, "", "to_emx"], [5, 3, 1, "", "to_mdf"]], "balsa.routines.io.nwp": [[5, 3, 1, "", "process_emme_eng_notation_series"], [5, 3, 1, "", "read_nwp_base_network"], [5, 3, 1, "", "read_nwp_exatts_list"], [5, 3, 1, "", "read_nwp_link_attributes"], [5, 3, 1, "", "read_nwp_node_attributes"], [5, 3, 1, "", "read_nwp_traffic_results"], [5, 3, 1, "", "read_nwp_traffic_results_at_countpost"], [5, 3, 1, "", "read_nwp_transit_line_attributes"], [5, 3, 1, "", "read_nwp_transit_network"], [5, 3, 1, "", "read_nwp_transit_result_summary"], [5, 3, 1, "", "read_nwp_transit_segment_results"], [5, 3, 1, "", "read_nwp_transit_station_results"]], "balsa.routines.io.omx": [[5, 3, 1, "", "read_omx"], [5, 3, 1, "", "to_omx"]], "balsa.routines.matrices": [[6, 3, 1, "", "aggregate_matrix"], [6, 3, 1, "", "disaggregate_matrix"], [6, 3, 1, "", "fast_stack"], [6, 3, 1, "", "fast_unstack"], [6, 3, 1, "", "matrix_balancing_1d"], [6, 3, 1, "", "matrix_balancing_2d"], [6, 3, 1, "", "matrix_bucket_rounding"], [6, 3, 1, "", "split_zone_in_matrix"]], "balsa.routines.modelling": [[7, 3, 1, "", "distance_array"], [7, 3, 1, "", "distance_matrix"], [7, 3, 1, "", "tlfd"]], "balsa.routines.plotting": [[8, 3, 1, "", "convergence_boxplot"], [8, 3, 1, "", "location_summary"], [8, 3, 1, "", "trumpet_diagram"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "titleterms": {"wsp": 0, "balsa": 0, "common": [0, 5], "model": [0, 7], "tool": 0, "content": 0, "log": 1, "gener": 3, "util": [2, 3, 5, 6, 7, 8], "routin": 4, "io": 5, "matric": 5, "inro": 5, "emm": 5, "format": 5, "omx": 5, "fortran": 5, "network": 5, "packag": 5, "nwp": 5, "matrix": 6, "plot": 8, "tripl": 2, "index": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"wsp-balsa: Common modelling tools": [[0, "wsp-balsa-common-modelling-tools"]], "Contents": [[0, null]], "Logging": [[1, "logging"]], "Triple-Index Utilities": [[2, "module-balsa.routines.best_intermediates"]], "General Utilities": [[3, "module-balsa.routines.general"]], "Routines": [[4, "routines"]], "IO Utilities": [[5, "io-utilities"]], "Matrices": [[5, "matrices"]], "Common": [[5, "module-balsa.routines.io.common"]], "Inro (Emme) format": [[5, "module-balsa.routines.io.inro"]], "OMX format": [[5, "omx-format"]], "Fortran format": [[5, "module-balsa.routines.io.fortran"]], "Network Packages (NWP)": [[5, "module-balsa.routines.io.nwp"]], "Matrix Utilities": [[6, "module-balsa.routines.matrices"]], "Modelling Utilities": [[7, "module-balsa.routines.modelling"]], "Plotting Utilities": [[8, "module-balsa.routines.plotting"]]}, "indexentries": {"logformats (class in balsa.logging)": [[1, "balsa.logging.LogFormats"]], "modellogger (class in balsa.logging)": [[1, "balsa.logging.ModelLogger"]], "balsa.logging": [[1, "module-balsa.logging"]], "get_model_logger() (in module balsa.logging)": [[1, "balsa.logging.get_model_logger"]], "init_root() (in module balsa.logging)": [[1, "balsa.logging.init_root"]], "log_to_file() (in module balsa.logging)": [[1, "balsa.logging.log_to_file"]], "module": [[1, "module-balsa.logging"], [2, "module-balsa.routines.best_intermediates"], [3, "module-balsa.routines.general"], [5, "module-balsa.routines.io.common"], [5, "module-balsa.routines.io.fortran"], [5, "module-balsa.routines.io.inro"], [5, "module-balsa.routines.io.nwp"], [5, "module-balsa.routines.io.omx"], [6, "module-balsa.routines.matrices"], [7, "module-balsa.routines.modelling"], [8, "module-balsa.routines.plotting"]], "report() (balsa.logging.modellogger method)": [[1, "balsa.logging.ModelLogger.report"]], "subproc_err() (balsa.logging.modellogger method)": [[1, "balsa.logging.ModelLogger.subproc_err"]], "subproc_message() (balsa.logging.modellogger method)": [[1, "balsa.logging.ModelLogger.subproc_message"]], "tip() (balsa.logging.modellogger method)": [[1, "balsa.logging.ModelLogger.tip"]], "balsa.routines.best_intermediates": [[2, "module-balsa.routines.best_intermediates"]], "best_intermediate_subset_zones() (in module balsa.routines.best_intermediates)": [[2, "balsa.routines.best_intermediates.best_intermediate_subset_zones"]], "best_intermediate_zones() (in module balsa.routines.best_intermediates)": [[2, "balsa.routines.best_intermediates.best_intermediate_zones"]], "align_categories() (in module balsa.routines.general)": [[3, "balsa.routines.general.align_categories"]], "balsa.routines.general": [[3, "module-balsa.routines.general"]], "is_identifier() (in module balsa.routines.general)": [[3, "balsa.routines.general.is_identifier"]], "sort_nicely() (in module balsa.routines.general)": [[3, "balsa.routines.general.sort_nicely"]], "sum_df_sequence() (in module balsa.routines.general)": [[3, "balsa.routines.general.sum_df_sequence"]], "balsa.routines.io.common": [[5, "module-balsa.routines.io.common"]], "balsa.routines.io.fortran": [[5, "module-balsa.routines.io.fortran"]], "balsa.routines.io.inro": [[5, "module-balsa.routines.io.inro"]], "balsa.routines.io.nwp": [[5, "module-balsa.routines.io.nwp"]], "balsa.routines.io.omx": [[5, "module-balsa.routines.io.omx"]], "coerce_matrix() (in module balsa.routines.io.common)": [[5, "balsa.routines.io.common.coerce_matrix"]], "expand_array() (in module balsa.routines.io.common)": [[5, "balsa.routines.io.common.expand_array"]], "open_file() (in module balsa.routines.io.common)": [[5, "balsa.routines.io.common.open_file"]], "peek_mdf() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.peek_mdf"]], "process_emme_eng_notation_series() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.process_emme_eng_notation_series"]], "read_emx() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.read_emx"]], "read_fortran_rectangle() (in module balsa.routines.io.fortran)": [[5, "balsa.routines.io.fortran.read_fortran_rectangle"]], "read_fortran_square() (in module balsa.routines.io.fortran)": [[5, "balsa.routines.io.fortran.read_fortran_square"]], "read_mdf() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.read_mdf"]], "read_nwp_base_network() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_base_network"]], "read_nwp_exatts_list() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_exatts_list"]], "read_nwp_link_attributes() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_link_attributes"]], "read_nwp_node_attributes() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_node_attributes"]], "read_nwp_traffic_results() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_traffic_results"]], "read_nwp_traffic_results_at_countpost() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_traffic_results_at_countpost"]], "read_nwp_transit_line_attributes() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_line_attributes"]], "read_nwp_transit_network() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_network"]], "read_nwp_transit_result_summary() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_result_summary"]], "read_nwp_transit_segment_results() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_segment_results"]], "read_nwp_transit_station_results() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_station_results"]], "read_omx() (in module balsa.routines.io.omx)": [[5, "balsa.routines.io.omx.read_omx"]], "to_emx() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.to_emx"]], "to_fortran() (in module balsa.routines.io.fortran)": [[5, "balsa.routines.io.fortran.to_fortran"]], "to_mdf() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.to_mdf"]], "to_omx() (in module balsa.routines.io.omx)": [[5, "balsa.routines.io.omx.to_omx"]], "aggregate_matrix() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.aggregate_matrix"]], "balsa.routines.matrices": [[6, "module-balsa.routines.matrices"]], "disaggregate_matrix() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.disaggregate_matrix"]], "fast_stack() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.fast_stack"]], "fast_unstack() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.fast_unstack"]], "matrix_balancing_1d() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.matrix_balancing_1d"]], "matrix_balancing_2d() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.matrix_balancing_2d"]], "matrix_bucket_rounding() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.matrix_bucket_rounding"]], "split_zone_in_matrix() (in module balsa.routines.matrices)": [[6, "balsa.routines.matrices.split_zone_in_matrix"]], "balsa.routines.modelling": [[7, "module-balsa.routines.modelling"]], "distance_array() (in module balsa.routines.modelling)": [[7, "balsa.routines.modelling.distance_array"]], "distance_matrix() (in module balsa.routines.modelling)": [[7, "balsa.routines.modelling.distance_matrix"]], "tlfd() (in module balsa.routines.modelling)": [[7, "balsa.routines.modelling.tlfd"]], "balsa.routines.plotting": [[8, "module-balsa.routines.plotting"]], "convergence_boxplot() (in module balsa.routines.plotting)": [[8, "balsa.routines.plotting.convergence_boxplot"]], "location_summary() (in module balsa.routines.plotting)": [[8, "balsa.routines.plotting.location_summary"]], "trumpet_diagram() (in module balsa.routines.plotting)": [[8, "balsa.routines.plotting.trumpet_diagram"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["index", "logging/index", "routines/best_intermediates", "routines/general", "routines/index", "routines/io", "routines/matrices", "routines/modelling", "routines/plotting"], "filenames": ["index.rst", "logging\\index.rst", "routines\\best_intermediates.rst", "routines\\general.rst", "routines\\index.rst", "routines\\io.rst", "routines\\matrices.rst", "routines\\modelling.rst", "routines\\plotting.rst"], "titles": ["wsp-balsa: Common modelling tools", "Logging", "Triple-Index Utilities", "General Utilities", "Routines", "IO Utilities", "Matrix Utilities", "Modelling Utilities", "Plotting Utilities"], "terms": {"i": [0, 1, 2, 3, 5, 6, 7, 8], "collect": [0, 1, 4, 5], "function": [0, 1, 2, 4, 5, 6, 7], "python": [0, 1, 3, 5], "facilit": 0, "travel": 0, "demand": [0, 5], "forecast": 0, "applic": 0, "analys": 0, "It": [0, 3, 6], "design": 0, "work": [0, 2, 5, 8], "scientif": 0, "stack": [0, 6], "name": [0, 1, 2, 3, 5], "numpi": [0, 2, 5, 6, 7], "panda": [0, 2, 3, 5, 6, 7, 8], "matplotlib": [0, 8], "which": [0, 1, 3, 5, 7, 8], "ar": [0, 1, 2, 3, 5, 6, 7, 8], "optim": 0, "speed": 0, "usabl": 0, "The": [0, 1, 2, 3, 5, 6, 7, 8], "packag": [0, 4, 7], "mostli": 0, "consist": 0, "standalon": [0, 4], "input": [0, 2, 5, 6], "output": [0, 2, 6], "analysi": 0, "etc": [0, 2], "well": 0, "few": [0, 3], "lightweight": 0, "class": [0, 1, 5], "base": [0, 1, 3, 5, 6, 7, 8], "data": [0, 2, 5, 6, 7], "structur": [0, 5], "specif": 0, "import": [0, 1], "statement": [0, 1], "follow": 0, "routin": [0, 2, 3, 5, 6, 7, 8], "gener": [0, 1, 4, 5, 7, 8], "util": [0, 4], "align_categori": [0, 3, 4], "is_identifi": [0, 3, 4], "sort_nic": [0, 3, 4], "sum_df_sequ": [0, 3, 4], "io": [0, 4], "matric": [0, 2, 4, 6], "network": [0, 4], "nwp": [0, 4], "distance_arrai": [0, 4, 7], "distance_matrix": [0, 4, 7], "tlfd": [0, 4, 7], "matrix": [0, 2, 4, 5, 7], "aggregate_matrix": [0, 4, 6], "disaggregate_matrix": [0, 4, 6], "fast_stack": [0, 4, 6], "fast_unstack": [0, 4, 6], "matrix_balancing_1d": [0, 4, 6], "matrix_balancing_2d": [0, 4, 6], "matrix_bucket_round": [0, 4, 6], "split_zone_in_matrix": [0, 4, 6], "tripl": [0, 4], "index": [0, 3, 4, 5, 6, 7, 8], "best_intermediate_subset_zon": [0, 2, 4], "best_intermediate_zon": [0, 2, 4], "plot": [0, 4], "convergence_boxplot": [0, 4, 8], "location_summari": [0, 4, 8], "trumpet_diagram": [0, 4, 8], "log": 0, "logformat": [0, 1], "modellogg": [0, 1], "report": [0, 1], "subproc_err": [0, 1], "subproc_messag": [0, 1], "tip": [0, 1], "get_model_logg": [0, 1], "init_root": [0, 1], "log_to_fil": [0, 1], "configur": [1, 7], "logger": 1, "object": [1, 3, 5, 7, 8], "re": [1, 6], "purpos": 1, "provid": [1, 2, 5, 6, 7, 8], "detail": 1, "statu": 1, "messag": 1, "dure": 1, "model": [1, 4, 5, 8], "program": 1, "execut": 1, "balsa": [1, 2, 3, 5, 6, 7, 8], "valu": [1, 2, 3, 5, 6, 7, 8], "none": [1, 2, 5, 6, 7, 8], "modul": 1, "qualnam": 1, "type": [1, 2, 3, 5, 6, 7, 8], "start": 1, "1": [1, 2, 5, 6, 7], "boundari": 1, "str": [1, 2, 3, 5, 6, 7, 8], "level": [1, 2, 5, 6, 7], "int": [1, 2, 3, 5, 6, 7, 8], "0": [1, 2, 3, 5, 6, 7], "msg": 1, "arg": [1, 5], "kwarg": [1, 5, 7, 8], "us": [1, 2, 3, 5, 6, 7, 8], "statist": 1, "result": [1, 2, 3, 5, 6, 7, 8], "user": 1, "distinct": 1, "from": [1, 2, 5, 6, 7, 8], "info": 1, "inform": [1, 5], "print": [1, 5], "green": 1, "when": [1, 2, 3, 5, 6, 7, 8], "colour": [1, 8], "avail": [1, 2], "subprocess": 1, "error": [1, 6, 8], "more": [1, 5, 6, 7], "signific": 1, "e": [1, 2, 6, 7], "g": [1, 2, 6, 7], "new": [1, 5, 6], "section": 1, "similar": 1, "emphas": 1, "blue": 1, "retriev": 1, "root_nam": 1, "stream_format": 1, "fanci": 1, "log_debug": 1, "bool": [1, 2, 3, 5, 6, 7, 8], "true": [1, 2, 5, 6, 7, 8], "initi": 1, "file_nam": 1, "pathlik": [1, 5, 8], "append": 1, "fals": [1, 2, 5, 6, 7], "raw_ascii": 1, "context": [1, 5, 7], "manag": [1, 5], "open": [1, 5], "close": [1, 5, 8], "logfil": 1, "clean": 1, "up": [1, 6], "its": [1, 2, 5], "file": [1, 5], "handler": [1, 5], "exit": 1, "thi": [1, 2, 3, 5, 6, 7, 8], "especi": [1, 8], "batch": 1, "run": 1, "becaus": [1, 8], "global": 1, "without": 1, "cleanup": 1, "old": [1, 5, 6], "would": [1, 6], "stick": 1, "around": 1, "get": [1, 5], "written": [1, 5], "paramet": [1, 2, 3, 5, 6, 7, 8], "union": [1, 2, 8], "filepath": 1, "write": [1, 5], "record": 1, "option": [1, 2, 3, 5, 6, 7, 8], "default": [1, 2, 3, 5, 6, 7, 8], "an": [1, 2, 5, 6, 7, 8], "exist": [1, 5], "ensur": [1, 5], "onli": [1, 2, 5, 6, 7, 8], "contain": [1, 2, 5], "valid": [1, 3, 5, 7], "ascii": 1, "charact": 1, "best_intermedi": 2, "pk_subset_cost": 2, "seri": [2, 3, 5, 6, 7, 8], "pk_tabl": 2, "datafram": [2, 3, 5, 6, 7, 8], "kq_tabl": 2, "cost_col": 2, "n_subset": 2, "n_final": 2, "add_pkq_cost": 2, "ndarrai": [2, 5, 6, 7], "ani": [2, 3, 5, 6], "dtype": [2, 6], "scalartyp": [2, 6], "flag_arrai": 2, "maximize_subset": 2, "maximize_fin": 2, "null_index": 2, "other_column": 2, "intermediate_nam": 2, "intermediate_zon": 2, "availability_nam": 2, "n_thread": [2, 6], "squeez": [2, 5], "dict": [2, 5, 6, 8], "numba": 2, "acceler": 2, "oper": [2, 5], "two": [2, 6, 7], "find": 2, "most": [2, 6, 8], "least": 2, "cost": 2, "intermedi": 2, "zone": [2, 5, 6, 8], "subset": 2, "take": [2, 6], "first": [2, 6, 7], "leg": 2, "pk": 2, "second": [2, 3, 6, 7], "kq": 2, "produc": [2, 5, 7, 8], "combin": 2, "pq": 2, "best": 2, "k": [2, 5], "also": [2, 5], "construct": 2, "multipl": [2, 5, 6, 8], "top": [2, 7], "_n_final_": 2, "There": [2, 5], "restrict": 2, "label": [2, 5, 6, 7, 8], "long": 2, "2": [2, 5, 6, 7, 8], "tabl": [2, 5, 7], "share": 2, "same": [2, 3, 5, 6, 7], "both": [2, 6, 7], "must": [2, 5, 6, 8], "tall": [2, 5, 6, 7], "format": [2, 6, 7], "multiindex": [2, 5, 6, 7], "essenti": 2, "defin": 2, "within": 2, "": [2, 3, 5, 6], "return": [2, 3, 5, 6, 7, 8], "column": [2, 3, 5, 6], "carri": 2, "forward": 2, "one": [2, 5, 6, 7], "unmodifi": 2, "retain": 2, "ad": 2, "togeth": 2, "thu": 2, "numer": [2, 6], "In": 2, "specifi": [2, 5, 6, 7, 8], "inf": [2, 7], "minim": 2, "respect": 2, "sentinel": 2, "unavail": 2, "interchang": 2, "consid": [2, 7], "pd": [2, 3, 5], "A": [2, 4, 5, 6, 7], "shape": [2, 5, 6, 7], "p": 2, "includ": [2, 5], "q": 2, "access": 2, "egress": 2, "maxim": 2, "indic": [2, 6, 7], "choic": [2, 3, 8], "number": [2, 5, 6], "rank": 2, "_n_subset_": 2, "select": 2, "If": [2, 3, 5, 6, 7], "correct": 2, "3": [2, 6], "dimension": [2, 6, 7], "arrai": [2, 5, 6, 7], "addit": [2, 7, 8], "part": 2, "path": [2, 5, 8], "pkq": 2, "boolean": [2, 7], "flag": [2, 6, 8], "pair": 2, "evalu": [2, 7], "determin": [2, 5], "fill": [2, 3, 5], "NO": 2, "all": [2, 3, 5, 6, 7, 8], "whether": [2, 7], "wa": [2, 6], "found": [2, 5], "thread": 2, "singl": [2, 6], "otherwis": [2, 5, 7], "dictionari": 2, "associ": 2, "max": [2, 5, 8], "min": [2, 8], "appropri": 2, "chosen": 2, "kei": 2, "repres": [2, 5, 7, 8], "so": [2, 5, 6], "just": 2, "differ": [2, 3, 5, 7, 8], "n": [2, 5, 7], "_n_": 2, "iter": [3, 5, 6, 7], "pre": 3, "process": 3, "step": 3, "concat": 3, "attempt": 3, "align": 3, "categor": [3, 8], "sequenc": 3, "set": [3, 5, 6, 7, 8], "categori": [3, 7, 8], "pass": [3, 5, 7, 8], "through": 3, "twice": 3, "onc": [3, 5, 6], "accumul": 3, "complet": 3, "time": [3, 6], "modifi": 3, "content": 3, "full": [3, 6], "place": [3, 6], "lex": 3, "sort": 3, "builtin": 3, "anyth": 3, "accept": [3, 7], "test": 3, "variabl": [3, 6], "doe": [3, 5, 6, 8], "collid": 3, "reserv": 3, "keyword": [3, 5], "l": 3, "list": [3, 5, 6, 8], "given": [3, 5, 6, 7], "string": [3, 8], "wai": 3, "human": 3, "expect": 3, "seq": 3, "fill_valu": [3, 5], "float": [3, 5, 6, 7, 8], "sum": [3, 6], "over": [3, 7], "even": 3, "thei": [3, 5], "have": [3, 5, 7], "your": 3, "miss": [3, 5, 8], "row": [3, 5, 6], "you": 3, "suppos": 3, "might": 3, "order": [3, 5], "unord": 3, "cell": [3, 6], "item": [3, 5, 8], "perform": [4, 5, 6], "variou": 4, "task": 4, "read": 5, "particularli": 5, "tmg": 5, "toolbox": 5, "coerce_matrix": 5, "allow_raw": 5, "force_squar": 5, "infer": [5, 7], "2d": [5, 7], "float32": 5, "expand_arrai": 5, "axi": [5, 6, 8], "expand": [5, 6], "across": 5, "dimens": 5, "amount": 5, "non": 5, "neg": [5, 6], "along": [5, 6], "ax": [5, 8], "open_fil": 5, "file_handl": 5, "fileio": 5, "sever": [5, 6, 7], "support": [5, 6, 7], "unicod": 5, "pathlib": 5, "alreadi": 5, "usual": [5, 8], "mode": 5, "w": 5, "yield": 5, "automat": 5, "out": 5, "peek_mdf": 5, "as_index": 5, "partial": 5, "mdf": 5, "system": 5, "rather": 5, "than": 5, "One": 5, "each": [5, 6, 7, 8], "read_emx": 5, "intern": 5, "project": 5, "databas": 5, "emmemat": 5, "emx": 5, "extens": 5, "about": 5, "Its": [5, 6], "size": [5, 7, 8], "emmebank": 5, "centroid": 5, "regardless": 5, "actual": 5, "scenario": 5, "interpret": 5, "depend": [5, 7], "integ": 5, "truncat": 5, "maximum": [5, 6, 7], "1d": 5, "zone_index": 5, "exampl": [5, 6], "For": [5, 6, 8], "20": [5, 6], "mf1": 5, "10": [5, 6], "rang": 5, "core": [5, 6], "frame": [5, 6], "100": [5, 6], "read_mdf": 5, "raw": [5, 7], "offici": 5, "binari": 5, "serial": 5, "creat": [5, 8], "matrixdata": 5, "save": 5, "recommend": [5, 6], "emxd": 5, "sometim": 5, "encount": 5, "unlabel": 5, "store": 5, "to_emx": 5, "emmebank_zon": 5, "known": [5, 6], "correctli": 5, "disk": 5, "exactli": 5, "unstack": [5, 6], "target": [5, 6, 8], "to_mdf": 5, "can": [5, 6, 7, 8], "load": 5, "librari": 5, "openmatrix": 5, "doesn": 5, "t": 5, "lot": [5, 6], "interoper": 5, "wrapper": 5, "directli": [5, 7], "read_omx": 5, "src_fp": 5, "map": [5, 6, 8], "typic": 5, "cannot": 5, "advanc": 5, "instead": 5, "to_omx": 5, "dst_fp": 5, "titl": [5, 8], "descript": 5, "attr": 5, "mapping_nam": 5, "zone_numb": 5, "overwrit": 5, "permit": 5, "encod": 5, "metadata": 5, "check": [5, 6], "done": 5, "np": [5, 6], "overrid": [5, 7], "read_fortran_rectangl": 5, "n_column": 5, "reindex_row": 5, "friendli": 5, "bin": [5, 7], "simpl": 5, "NOT": 5, "squar": [5, 6], "4": [5, 6, 7], "byte": 5, "where": 5, "prefac": 5, "refer": 5, "posit": [5, 6], "rest": 5, "To": 5, "present": 5, "sinc": 5, "self": 5, "version": 5, "reindex": 5, "rais": [5, 6], "assertionerror": 5, "read_fortran_squar": 5, "method": [5, 7], "to_fortran": 5, "min_index": 5, "desir": [5, 7], "width": 5, "4000": 5, "3500x3500": 5, "pad": 5, "500": 5, "extra": 5, "lowest": 5, "slice": 5, "parse_tmg_ncs_line_id": 5, "tupl": [5, 6, 8], "pars": 5, "line": [5, 7, 8], "id": 5, "code": [5, 8], "standard": 5, "convent": 5, "correspond": [5, 6], "rout": 5, "process_emme_eng_notation_seri": 5, "to_dtyp": 5, "convert": [5, 6, 7, 8], "engin": 5, "notat": 5, "read_nwp_base_network": 5, "nwp_fp": 5, "export": 5, "node": 5, "link": 5, "read_nwp_exatts_list": 5, "attribut": 5, "argument": [5, 6, 7], "read_csv": 5, "read_nwp_link_attribut": 5, "extract": 5, "note": [5, 6], "inod": 5, "jnode": 5, "read_nwp_node_attribut": 5, "read_nwp_traffic_result": 5, "traffic": 5, "assign": [5, 6], "read_nwp_traffic_results_at_countpost": 5, "countpost_att": 5, "countpost": 5, "identifi": 5, "filter": 5, "read_nwp_transit_line_attribut": 5, "transit": 5, "read_nwp_transit_network": 5, "transt": 5, "segment": 5, "read_nwp_transit_result_summari": 5, "parse_line_id": 5, "summar": 5, "board": 5, "volum": [5, 8], "pleas": 5, "adher": 5, "ncs16": 5, "properli": 5, "read_nwp_transit_segment_result": 5, "alight": 5, "read_nwp_transit_station_result": 5, "station_line_nod": 5, "off": 5, "station": 5, "being": 5, "itself": [5, 7], "stop": [5, 6], "read_nwp_transit_vehicl": 5, "vehicl": 5, "group": 6, "_type": 6, "_generic_alia": 6, "row_group": 6, "col_group": 6, "aggfunc": 6, "callabl": [6, 8], "aggreg": 6, "syntact": 6, "sugar": 6, "match": [6, 8], "either": [6, 7], "altern": 6, "length": [6, 7], "5": 6, "6": [5, 6], "7": 6, "9": 6, "8": 6, "b": 6, "c": 6, "new_matrix": 6, "42": 6, "28": 6, "26": 6, "14": 6, "23": 6, "36": 6, "17": 6, "25": 6, "proport": 6, "row_map": 6, "row_proport": 6, "col_map": 6, "col_proport": 6, "split": 6, "do": 6, "disaggreg": 6, "like": [6, 7], "except": 6, "appli": [6, 7], "total": [6, 8], "origin": 6, "df": 6, "30": 6, "prop": 6, "a1": 6, "a2": 6, "75": 6, "b1": 6, "55": 6, "b2": 6, "45": 6, "c1": 6, "62": 6, "c2": 6, "38": 6, "625": 6, "875": 6, "125": 6, "375": 6, "900": 6, "12": 6, "300": 6, "700": 6, "750": 6, "250": 6, "025": 6, "475": 6, "410": 6, "090": 6, "790": 6, "710": 6, "650": 6, "13": 6, "95": 6, "820": 6, "580": 6, "688": 6, "712": 6, "850": 6, "180": 6, "420": 6, "888": 6, "multi_index": 6, "deep_copi": 6, "action": 6, "better": 6, "beforehand": 6, "wide": 6, "invers": 6, "entri": 6, "compat": 6, "sourc": 6, "therefor": 6, "whole": 6, "ahead": 6, "should": 6, "view": 6, "underli": 6, "copi": 6, "deep": 6, "littl": 6, "longer": 6, "memori": 6, "preserv": 6, "dat": 6, "m": [6, 7], "balanc": 6, "constraint": 6, "vector": [6, 7], "direct": 6, "constrain": [6, 8], "totals_to_us": 6, "max_iter": 6, "1000": 6, "rel_error": 6, "0001": 6, "fit": 6, "suppli": 6, "describ": [6, 7], "how": 6, "scale": 6, "averag": 6, "0e": 6, "rel": [6, 8], "criteria": 6, "processor": 6, "parallel": 6, "comput": [6, 7], "Not": 6, "residu": 6, "n_iter": 6, "decim": 6, "bucket": 6, "round": 6, "left": 6, "point": [6, 7], "base_matrix": 6, "old_zon": 6, "new_zon": 6, "prorat": 6, "affect": 6, "remov": 6, "add": [6, 7, 8], "x0": 7, "y0": 7, "x1": 7, "y1": 7, "euclidean": 7, "fast": 7, "distanc": 7, "between": 7, "x": [7, 8], "y": [7, 8], "separ": 7, "numexpr": 7, "equat": 7, "lon": 7, "coordin": 7, "lat": 7, "straight": 7, "crow": 7, "fli": 7, "manhattan": 7, "haversin": 7, "scalar": 7, "coord_unit": 7, "factor": 7, "convers": 7, "unit": 7, "km": 7, "earth_radius_factor": 7, "other": 7, "labels0": 7, "labels1": 7, "fastest": 7, "four": 7, "product": 7, "vector0": 7, "vector1": 7, "n0": 7, "n1": 7, "whose": 7, "alwai": [7, 8], "could": 7, "cross": 7, "try": 7, "them": 7, "bin_start": 7, "bin_end": 7, "200": [7, 8], "bin_step": 7, "weight": 7, "intrazon": 7, "label_typ": 7, "multi": 7, "include_top": 7, "trip": 7, "frequenc": 7, "distribut": 7, "histogram": 7, "pretti": 7, "suitabl": 7, "chart": 7, "minimum": 7, "limit": [7, 8], "ignor": 7, "count": [7, 8], "under": 7, "see": [7, 8], "prepend": 7, "front": 7, "text": 7, "bottom": 7, "abov": 7, "bin_top": 7, "go": 7, "unweight": 7, "filter_func": 8, "adjust_target": 8, "percentag": 8, "band": 8, "simple_label": 8, "fp": 8, "measur": 8, "converg": 8, "locat": 8, "box": 8, "sub": 8, "ensemble_nam": 8, "dpi": 8, "150": 8, "district_nam": 8, "ensembl": 8, "compound": 8, "show": 8, "attract": 8, "model_volum": 8, "category_colour": 8, "category_mark": 8, "label_format": 8, "y_bound": 8, "x_label": 8, "legend": 8, "auto": 8, "trumpet": 8, "diagram": 8, "v": 8, "draw": 8, "curv": 8, "fhwa": 8, "guidelin": 8, "need": 8, "uniqu": 8, "classif": 8, "enabl": 8, "hex": 8, "revert": 8, "style": 8, "marker": 8, "http": [5, 8], "org": 8, "api": 8, "markers_api": 8, "html": [5, 8], "readabl": 8, "relev": 8, "current_label": 8, "category_kei": 8, "veri": 8, "high": 8, "intercept": 8, "subplot": 8, "scatter": 8, "case": 8, "realli": 8, "tmgtoolbox": 5, "visit": 5, "utoronto": 5, "ca": 5, "doc": 5, "input_output": 5, "exportnetworkpackag": 5}, "objects": {"balsa": [[1, 0, 0, "-", "logging"]], "balsa.logging": [[1, 1, 1, "", "LogFormats"], [1, 1, 1, "", "ModelLogger"], [1, 3, 1, "", "get_model_logger"], [1, 3, 1, "", "init_root"], [1, 3, 1, "", "log_to_file"]], "balsa.logging.ModelLogger": [[1, 2, 1, "", "report"], [1, 2, 1, "", "subproc_err"], [1, 2, 1, "", "subproc_message"], [1, 2, 1, "", "tip"]], "balsa.routines": [[2, 0, 0, "-", "best_intermediates"], [3, 0, 0, "-", "general"], [6, 0, 0, "-", "matrices"], [7, 0, 0, "-", "modelling"], [8, 0, 0, "-", "plotting"]], "balsa.routines.best_intermediates": [[2, 3, 1, "", "best_intermediate_subset_zones"], [2, 3, 1, "", "best_intermediate_zones"]], "balsa.routines.general": [[3, 3, 1, "", "align_categories"], [3, 3, 1, "", "is_identifier"], [3, 3, 1, "", "sort_nicely"], [3, 3, 1, "", "sum_df_sequence"]], "balsa.routines.io": [[5, 0, 0, "-", "common"], [5, 0, 0, "-", "fortran"], [5, 0, 0, "-", "inro"], [5, 0, 0, "-", "nwp"], [5, 0, 0, "-", "omx"]], "balsa.routines.io.common": [[5, 3, 1, "", "coerce_matrix"], [5, 3, 1, "", "expand_array"], [5, 3, 1, "", "open_file"]], "balsa.routines.io.fortran": [[5, 3, 1, "", "read_fortran_rectangle"], [5, 3, 1, "", "read_fortran_square"], [5, 3, 1, "", "to_fortran"]], "balsa.routines.io.inro": [[5, 3, 1, "", "peek_mdf"], [5, 3, 1, "", "read_emx"], [5, 3, 1, "", "read_mdf"], [5, 3, 1, "", "to_emx"], [5, 3, 1, "", "to_mdf"]], "balsa.routines.io.nwp": [[5, 3, 1, "", "parse_tmg_ncs_line_id"], [5, 3, 1, "", "process_emme_eng_notation_series"], [5, 3, 1, "", "read_nwp_base_network"], [5, 3, 1, "", "read_nwp_exatts_list"], [5, 3, 1, "", "read_nwp_link_attributes"], [5, 3, 1, "", "read_nwp_node_attributes"], [5, 3, 1, "", "read_nwp_traffic_results"], [5, 3, 1, "", "read_nwp_traffic_results_at_countpost"], [5, 3, 1, "", "read_nwp_transit_line_attributes"], [5, 3, 1, "", "read_nwp_transit_network"], [5, 3, 1, "", "read_nwp_transit_result_summary"], [5, 3, 1, "", "read_nwp_transit_segment_results"], [5, 3, 1, "", "read_nwp_transit_station_results"], [5, 3, 1, "", "read_nwp_transit_vehicles"]], "balsa.routines.io.omx": [[5, 3, 1, "", "read_omx"], [5, 3, 1, "", "to_omx"]], "balsa.routines.matrices": [[6, 3, 1, "", "aggregate_matrix"], [6, 3, 1, "", "disaggregate_matrix"], [6, 3, 1, "", "fast_stack"], [6, 3, 1, "", "fast_unstack"], [6, 3, 1, "", "matrix_balancing_1d"], [6, 3, 1, "", "matrix_balancing_2d"], [6, 3, 1, "", "matrix_bucket_rounding"], [6, 3, 1, "", "split_zone_in_matrix"]], "balsa.routines.modelling": [[7, 3, 1, "", "distance_array"], [7, 3, 1, "", "distance_matrix"], [7, 3, 1, "", "tlfd"]], "balsa.routines.plotting": [[8, 3, 1, "", "convergence_boxplot"], [8, 3, 1, "", "location_summary"], [8, 3, 1, "", "trumpet_diagram"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "titleterms": {"wsp": 0, "balsa": 0, "common": [0, 5], "model": [0, 7], "tool": 0, "content": 0, "log": 1, "tripl": 2, "index": 2, "util": [2, 3, 5, 6, 7, 8], "gener": 3, "routin": 4, "io": 5, "matric": 5, "inro": 5, "emm": 5, "format": 5, "omx": 5, "fortran": 5, "network": 5, "packag": 5, "nwp": 5, "matrix": 6, "plot": 8}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 58}, "alltitles": {"wsp-balsa: Common modelling tools": [[0, "wsp-balsa-common-modelling-tools"]], "Contents": [[0, null]], "Logging": [[1, "logging"]], "Triple-Index Utilities": [[2, "module-balsa.routines.best_intermediates"]], "General Utilities": [[3, "module-balsa.routines.general"]], "Routines": [[4, "routines"]], "Matrix Utilities": [[6, "module-balsa.routines.matrices"]], "Modelling Utilities": [[7, "module-balsa.routines.modelling"]], "Plotting Utilities": [[8, "module-balsa.routines.plotting"]], "IO Utilities": [[5, "io-utilities"]], "Matrices": [[5, "matrices"]], "Common": [[5, "module-balsa.routines.io.common"]], "Inro (Emme) format": [[5, "module-balsa.routines.io.inro"]], "OMX format": [[5, "omx-format"]], "Fortran format": [[5, "module-balsa.routines.io.fortran"]], "Network Packages (NWP)": [[5, "network-packages-nwp"]]}, "indexentries": {"balsa.routines.io.common": [[5, "module-balsa.routines.io.common"]], "balsa.routines.io.fortran": [[5, "module-balsa.routines.io.fortran"]], "balsa.routines.io.inro": [[5, "module-balsa.routines.io.inro"]], "balsa.routines.io.nwp": [[5, "module-balsa.routines.io.nwp"]], "balsa.routines.io.omx": [[5, "module-balsa.routines.io.omx"]], "coerce_matrix() (in module balsa.routines.io.common)": [[5, "balsa.routines.io.common.coerce_matrix"]], "expand_array() (in module balsa.routines.io.common)": [[5, "balsa.routines.io.common.expand_array"]], "module": [[5, "module-balsa.routines.io.common"], [5, "module-balsa.routines.io.fortran"], [5, "module-balsa.routines.io.inro"], [5, "module-balsa.routines.io.nwp"], [5, "module-balsa.routines.io.omx"]], "open_file() (in module balsa.routines.io.common)": [[5, "balsa.routines.io.common.open_file"]], "parse_tmg_ncs_line_id() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.parse_tmg_ncs_line_id"]], "peek_mdf() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.peek_mdf"]], "process_emme_eng_notation_series() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.process_emme_eng_notation_series"]], "read_emx() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.read_emx"]], "read_fortran_rectangle() (in module balsa.routines.io.fortran)": [[5, "balsa.routines.io.fortran.read_fortran_rectangle"]], "read_fortran_square() (in module balsa.routines.io.fortran)": [[5, "balsa.routines.io.fortran.read_fortran_square"]], "read_mdf() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.read_mdf"]], "read_nwp_base_network() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_base_network"]], "read_nwp_exatts_list() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_exatts_list"]], "read_nwp_link_attributes() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_link_attributes"]], "read_nwp_node_attributes() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_node_attributes"]], "read_nwp_traffic_results() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_traffic_results"]], "read_nwp_traffic_results_at_countpost() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_traffic_results_at_countpost"]], "read_nwp_transit_line_attributes() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_line_attributes"]], "read_nwp_transit_network() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_network"]], "read_nwp_transit_result_summary() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_result_summary"]], "read_nwp_transit_segment_results() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_segment_results"]], "read_nwp_transit_station_results() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_station_results"]], "read_nwp_transit_vehicles() (in module balsa.routines.io.nwp)": [[5, "balsa.routines.io.nwp.read_nwp_transit_vehicles"]], "read_omx() (in module balsa.routines.io.omx)": [[5, "balsa.routines.io.omx.read_omx"]], "to_emx() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.to_emx"]], "to_fortran() (in module balsa.routines.io.fortran)": [[5, "balsa.routines.io.fortran.to_fortran"]], "to_mdf() (in module balsa.routines.io.inro)": [[5, "balsa.routines.io.inro.to_mdf"]], "to_omx() (in module balsa.routines.io.omx)": [[5, "balsa.routines.io.omx.to_omx"]]}}) \ No newline at end of file