Skip to content

Commit

Permalink
Add imprint (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
1kastner authored Aug 28, 2022
1 parent 6407e9e commit bf063cb
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 183 deletions.
11 changes: 9 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

autoclass_content = 'both'

autodoc_typehints = 'signature'
autodoc_typehints = 'both'

autodoc_typehints_format = 'short'

Expand Down Expand Up @@ -150,6 +150,7 @@ def setup(app):
numfig = True

# -- Style nbsphinx notebook rendering ----------------------------------------

nbsphinx_prolog = """
.. raw:: html
Expand All @@ -172,9 +173,15 @@ def setup(app):
}
/* Some of the log statements are too long and a scrolling bar appears. This needs to be avoided */
div#Generate-the-data pre {
div pre {
white-space: pre-wrap !important;
}
/* Add listing symbol (without this, the template does not create a proper list but just paragraphs) */
ul.simple>li {
list-style: square;
margin: 20px;
}
</style>
"""
Expand Down
9 changes: 9 additions & 0 deletions docs/imprint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Imprint
-------

The development and maintenance of ConFlowGen is currently majorly organized by the
Institute of Maritime Logistics at the Hamburg University of Technology.
More details on the institute are available at https://www.tuhh.de/mls/en/.
The institute is legally represented by the university.
The corresponding imprint is located at
https://www.tuhh.de/tuhh/en/imprint.html.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ Its source code hosted
api
contributing
bibliography
imprint
38 changes: 21 additions & 17 deletions docs/notebooks/analyses.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@
"metadata": {},
"outputs": [],
"source": [
"from IPython.display import Markdown, display\n",
"import matplotlib.pyplot as plt\n",
"from IPython.display import Markdown, display\n",
"\n",
"import conflowgen\n",
"\n",
"database_chooser = conflowgen.DatabaseChooser(\n",
" sqlite_databases_directory=\"./data/prepared_dbs\" # subdirectory relative to Jupyter Notebook\n",
")\n",
"database_chooser.load_existing_sqlite_database(\n",
" \"demo_poc.sqlite\"\n",
")"
"database_chooser.load_existing_sqlite_database(\"demo_poc.sqlite\")"
]
},
{
Expand All @@ -78,11 +76,15 @@
"metadata": {},
"outputs": [],
"source": [
"inbound_and_outbound_vehicle_capacity_analysis = conflowgen.InboundAndOutboundVehicleCapacityAnalysis(\n",
" transportation_buffer=0.2\n",
"inbound_and_outbound_vehicle_capacity_analysis = (\n",
" conflowgen.InboundAndOutboundVehicleCapacityAnalysis(transportation_buffer=0.2)\n",
")\n",
"display(\n",
" inbound_and_outbound_vehicle_capacity_analysis.get_inbound_container_volumes_by_vehicle_type()\n",
")\n",
"outbound_capacities = (\n",
" inbound_and_outbound_vehicle_capacity_analysis.get_outbound_container_volume_by_vehicle_type()\n",
")\n",
"display(inbound_and_outbound_vehicle_capacity_analysis.get_inbound_container_volumes_by_vehicle_type())\n",
"outbound_capacities = inbound_and_outbound_vehicle_capacity_analysis.get_outbound_container_volume_by_vehicle_type()\n",
"display(outbound_capacities.used.teu)\n",
"display(outbound_capacities.maximum.teu)"
]
Expand Down Expand Up @@ -198,7 +200,7 @@
" as_graph=True,\n",
" display_text_func=lambda text: display(Markdown(text)),\n",
" display_in_markup_language=\"markdown\",\n",
" static_graphs=True\n",
" static_graphs=True,\n",
")"
]
},
Expand Down Expand Up @@ -230,7 +232,7 @@
"source": [
"yard_capacity_analysis_report = conflowgen.YardCapacityAnalysisReport()\n",
"\n",
"with plt.style.context('seaborn-colorblind'):\n",
"with plt.style.context(\"seaborn-colorblind\"):\n",
" yard_capacity_analysis_report.get_report_as_graph(\n",
" storage_requirement=conflowgen.StorageRequirement.reefer\n",
" )\n",
Expand All @@ -252,11 +254,11 @@
"metadata": {},
"outputs": [],
"source": [
"with plt.style.context('seaborn-colorblind'):\n",
"with plt.style.context(\"seaborn-colorblind\"):\n",
" yard_capacity_analysis_report.get_report_as_graph(\n",
" storage_requirement=[\n",
" conflowgen.StorageRequirement.standard,\n",
" conflowgen.StorageRequirement.dangerous_goods\n",
" conflowgen.StorageRequirement.dangerous_goods,\n",
" ]\n",
" )\n",
" plt.show()"
Expand All @@ -277,13 +279,15 @@
"metadata": {},
"outputs": [],
"source": [
"vehicle_capacity_utilization_report = conflowgen.InboundToOutboundVehicleCapacityUtilizationAnalysisReport()\n",
"vehicle_capacity_utilization_report = (\n",
" conflowgen.InboundToOutboundVehicleCapacityUtilizationAnalysisReport()\n",
")\n",
"\n",
"print(\n",
" vehicle_capacity_utilization_report.get_report_as_text(\n",
" vehicle_type={\n",
" conflowgen.ModeOfTransport.deep_sea_vessel,\n",
" conflowgen.ModeOfTransport.feeder\n",
" conflowgen.ModeOfTransport.feeder,\n",
" }\n",
" )\n",
")"
Expand All @@ -306,13 +310,13 @@
"source": [
"container_dwell_time_report = conflowgen.ContainerDwellTimeAnalysisReport()\n",
"\n",
"with plt.style.context('seaborn-colorblind'):\n",
"with plt.style.context(\"seaborn-colorblind\"):\n",
" container_dwell_time_report.get_report_as_graph(\n",
" container_delivered_by_vehicle_type={\n",
" conflowgen.ModeOfTransport.deep_sea_vessel,\n",
" conflowgen.ModeOfTransport.feeder,\n",
" },\n",
" storage_requirement=conflowgen.StorageRequirement.empty\n",
" storage_requirement=conflowgen.StorageRequirement.empty,\n",
" )\n",
" plt.show()"
]
Expand Down Expand Up @@ -369,7 +373,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.10.1"
}
},
"nbformat": 4,
Expand Down
26 changes: 16 additions & 10 deletions docs/notebooks/first_steps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"source": [
"In the next step, we add a feeder liner service to the database.\n",
"We do this by using\n",
":meth:`.PortCallManager.add_large_scheduled_vehicle`.\n",
":meth:`.PortCallManager.add_vehicle`.\n",
"The concrete vehicle instances are only generated when\n",
":meth:`.ContainerFlowGenerationManager.generate`\n",
"is invoked."
Expand Down Expand Up @@ -209,16 +209,22 @@
},
"source": [
"By using\n",
":meth:`.PortCallManager.add_large_scheduled_vehicle`,\n",
":meth:`.PortCallManager.add_vehicle`,\n",
"we can define the attributes for our feeder service.\n",
"\n",
"* ``vehicle_type`` defines, that we deal with a feeder as the mode of transport. Other valid modes of transport are deep_sea_vessel, barge, or train.\n",
"* ``service_name`` defines a fictional name for that service.\n",
"* ``vehicle_arrives_at`` specifies the date where the first port call of this particular line is usually happening. This parameter must be a datetime.date.\n",
"* ``vehicle_arrives_at_time`` sets the average / planned / scheduled timeslot of the port call. This parameter must be a datetime.time.\n",
"* ``average_vehicle_capacity`` defines the average capacity of the vessels utilized on this line. Parameter must be int or float.\n",
"* ``average_moved_capacity`` sets the capacity which is in average moved between the feeder and the terminal at each call. Parameter must be int or float.\n",
"* ``next_destinations`` can be set, consisting of name and frequency which can e.g. be used as implication for storage and stacking problems. A list of tuples [str, float] is expected here."
"- ``vehicle_type`` defines, that we deal with a feeder as the mode of transport.\n",
" Other valid modes of transport are deep_sea_vessel, barge, or train.\n",
"- ``service_name`` defines a fictional name for that service.\n",
"- ``vehicle_arrives_at`` specifies the date where the first port call of this particular line is usually happening.\n",
" This parameter must be a :py:obj:`datetime.date`.\n",
"- ``vehicle_arrives_at_time`` sets the scheduled timeslot of the port call.\n",
" This parameter must be a :py:obj:`datetime.time`.\n",
"- ``average_vehicle_capacity`` defines the average capacity of the vessels utilized on this line.\n",
" Parameter must be :py:obj:`int` or :py:obj:`float`.\n",
"- ``average_moved_capacity`` sets the capacity which is in average moved between the feeder and the terminal at each call.\n",
" Parameter must be :py:obj:`int` or :py:obj:`float`.\n",
"- ``next_destinations`` can be set, consisting of name and frequency which can, e.g., be used as implication for storage and stacking problems.\n",
" A list of name-frequency pairs is expected here."
]
},
{
Expand Down Expand Up @@ -457,7 +463,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.10.1"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit bf063cb

Please sign in to comment.