Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
r-akemii committed Sep 9, 2024
1 parent 5f64a87 commit 2271aba
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ _templates
docs/source/sg_execution_times.rst
docs/source/_auto_examples
docs/source/api/generated
docs/source/modeling_with_aequilibrae/1-aequilibrae_project/project_database/data_model
docs/source/modeling_with_aequilibrae/1-aequilibrae_project/transit_database/data_model
docs/source/modeling_with_aequilibrae/aequilibrae_project/project_database/data_model
docs/source/modeling_with_aequilibrae/aequilibrae_project/transit_database/data_model

# User-specific stuff:
.idea/**/workspace.xml
Expand Down
27 changes: 20 additions & 7 deletions docs/source/modeling_with_aequilibrae/accessing_project_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ Each item in the 'links' table is a ``Link`` object.
# And refresh the links in memory for usage
project_links.refresh()
.. seealso::

* :func:`aequilibrae.project.network.Links`
Class documentation
.. admonition:: References

* :ref:`modifications_on_links_layer`

* :ref:`project_from_link_layer` | :ref:`editing_network_splitting_link`
Usage examples

.. seealso::

* :func:`aequilibrae.project.network.Links`
Class documentation

``project.network.nodes``
-------------------------

Expand Down Expand Up @@ -114,6 +118,13 @@ Each item in the 'nodes' table is a ``Node`` object.
# a Pandas DataFrame
project_nodes.lonlat
.. admonition:: References

* :ref:`modifications_on_nodes_layer`

* :ref:`editing_network_nodes`
Usage example

.. seealso::

* :func:`aequilibrae.project.network.Nodes`
Expand Down Expand Up @@ -187,10 +198,12 @@ Each item in the 'zones' table is a ``Zone`` object.
# And to get the nearest zone to giver geometry
project_zones.get_closest_zone(Point(-71.3336, -29.9490))
.. admonition:: References

* :ref:`create_zones`
Usage example

.. seealso::

* :func:`aequilibrae.project.Zoning`
Class documentation

* :ref:`create_zones`
Usage example
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ to a route system as of yet.

The following sections presents the structure and contents for all databases in the project.

.. toctree::
:maxdepth: 1
:caption: Get to know the project components

../project_components
../accessing_project_data
../aequilibrae_matrix

.. toctree::
:maxdepth: 1
:caption: Or dive deep into project structure!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _tables_period:

Periods table
=============

Expand Down
75 changes: 59 additions & 16 deletions docs/source/modeling_with_aequilibrae/project_components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Project Components
==================

In the :ref:`aeq_project_structure` section, we presented the main file components and folders that
In the :ref:`aeq_project_structure` section, we present the main file components and folders that
consists an AequilibraE project. We also present in :ref:`aeq_project_database_tables` all tables
that are part of the project database, how do they look like, and what fields do they have.

Expand Down Expand Up @@ -62,11 +62,16 @@ this information, otherwise it will be lost.
# it is possible to create one too.
project.about.create()
.. seealso::
.. admonition:: References

* :ref:`tables_about`
Table documentation

.. seealso::

* :func:`aequilibrae.procedure.About`
Class documentation

``project.FieldEditor``
-----------------------

Expand Down Expand Up @@ -99,11 +104,16 @@ This class is directly accessed from within the corresponding module one wants t
All field descriptions are kept in the table 'attributes_documentation'.

.. seealso::
.. admonition:: References

* :ref:`parameters_metadata`
Table documentation

.. seealso::

* :func:`aequilibrae.project.FieldEditor`
Class documentation

``project.log``
---------------

Expand All @@ -120,13 +130,15 @@ It is possible to access the log file contents, as presented in the next code bl
# This option must be used wiesly once the deletion of data in the log file can't be undone.
project_log.clear()
.. admonition:: References

* :ref:`useful-log-tips`
Usage example

.. seealso::

* :func:`aequilibrae.project.Log`
Class documentation

* :ref:`useful-log-tips`
Usage example

``project.matrices``
--------------------
Expand Down Expand Up @@ -171,14 +183,16 @@ records in the 'matrices' table. Each item in the 'matrices' table is a ``Matri
# get an AequilibraE matrix.
matrices.get_matrix("demand_aem")
.. admonition:: References

* :ref:`matrix_table`
Table documentation

.. seealso::

* :func:`aequilibrae.project.Matrices`
Class documentation

* :ref:`matrix_table`
Table documentation

``project.network.link_types``
------------------------------

Expand All @@ -200,29 +214,38 @@ Each item in the 'link_types' table is a ``LinkType`` object.
new_link_type.speed = 35
new_link_type.link_type = "Arterial"
# To save the modifications for ``new_link_type``
# To save the modifications for `new_link_type`
new_link_type.save()
# To create a new field in the 'link_types' table, you can call the function ``fields``
# To create a new field in the 'link_types' table, you can call the function `fields`
# to return a FieldEditor instance, which can be edited
link_types.fields()
# You can also remove a LinkType from a project using its ``link_type_id``
# You can also remove a LinkType from a project using its `link_type_id`
link_types.delete("A")
# And don't forget to save the modifications you did in the 'link_types' table
link_types.save()
# To check all ``LinkTypes`` in the project
# To check all `LinkTypes` in the project
link_types.all_types() # returns a dictionary with all LinkType objects in the model.
# The dictionary's keys are the ``link_type_id``'s
# The dictionary's keys are the `link_type_id`'s
# There are two ways to get a LinkType from the 'link_types' table
# using the ``link_type_id``
# using the `link_type_id`
link_types.get("p")
# or using the ``link_type``
# or using the `link_type`
link_types.get_by_name("primary")
.. admonition:: References

* :ref:`tables_link_types`
Table documentation

.. seealso::

* :func:`aequilibrae.project.LinkTypes`
Class documentation

``project.network.modes``
-------------------------
Expand Down Expand Up @@ -263,6 +286,16 @@ Each item in 'modes' table is a ``Mode`` object.
# or using the ``mode_name``
modes.get_by_name("car")
.. admonition:: References

* :ref:`tables_modes`
Table documentation

.. seealso::

* :func:`aequilibrae.project.Modes`
Class documentation

``project.network.periods``
---------------------------

Expand Down Expand Up @@ -304,3 +337,13 @@ Each item in the 'periods' table is a ``Period`` object.
# And we save this period modification
select_period.save()
.. admonition:: References

* :ref:`tables_period`
Table documentation

.. seealso::

* :func:`aequilibrae.project.Periods`
Class documentation

0 comments on commit 2271aba

Please sign in to comment.