Open source Terminal Investment Simulation

OpenTISim is a python package for the evaluation of investment decisions for terminals.

Welcome to OpenTISim documentation! Please check the contents below for information on installation, getting started and actual example code. If you want to dive straight into the code you can check out our GitHub page or the working examples presented in Jupyter Notebooks.

Installation

Stable release

To install OpenTISim, run this command in your terminal:

# Use pip to install OpenTISim
pip install opentisim

This is the preferred method to install OpenTISim, as it will always install the most recent stable release.

If you do not pip installed, this Python installation guide can guide you through the process.

From sources

The sources for OpenTISim can be downloaded from the Github repo.

You can either clone the public repository:

# Use git to clone OpenTISim
git clone git://github.com/TUDelft-CITG/OpenTISim

Or download the tarball:

# Use curl to obtain the tarball
curl  -OL https://github.com/TUDelft-CITG/OpenTISim/tarball/master

Once you have a copy of the source, you can install it with:

# Use python to install
python setup.py install

OpenTISim

This page lists all functions and classes available in the OpenTISim.model and OpenTISim.core modules. For examples on how to use these submodules please check out the Examples page, information on installing OpenTISim can be found on the Installation page.

Submodules

The main components are the Model module and the Core module. All of their components are listed below.

opentisim.agribulk_defaults module

opentisim.agribulk_mixins module

opentisim.agribulk_objects module

opentisim.agribulk_system module

opentisim.container_defaults module

opentisim.container_mixins module

opentisim.container_objects module

opentisim.container_system module

opentisim.hydrogen_defaults module

opentisim.hydrogen_mixins module

opentisim.hydrogen_objects module

opentisim.hydrogen_system module

Module contents

Top-level package for OpenTISim.

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at https://github.com/TUDelft-CITG/OpenTISim/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.

Write Documentation

OpenClim could always use more documentation, whether as part of the official OpenCLSim docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at https://github.com/TUDelft-CITG/OpenTISim/issues.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get Started!

Ready to contribute? Here’s how to set up OpenTISim for local development.

  1. Fork the OpenTISim repository on GitHub.

  2. Clone your fork locally:

    $ git clone git@github.com:your_name_here/OpenTISim.git
    
  3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

    $ mkvirtualenv opentisim
    $ cd opentisim/
    $ python setup.py develop
    
  4. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 opentisim tests
    $ python setup.py test or py.test
    $ tox
    

    To get flake8 and tox, just pip install them into your virtualenv.

  6. The style of OpenTISim is according to Black. Format your code using Black witht the following lines of code:

    $ black opentisim
    $ black tests
    

    You can install black using pip.

  7. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
    
  8. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
  3. The pull request should work for Python 3.4, 3.5 and 3.6, and for PyPy. Check CircleCI and make sure that the tests pass for all supported Python versions.

Tips

To run a subset of tests:

$ py.test tests.test_opentisim

To make the documentation pages $ make docs # for linux/osx

For windows $ del docsopentisim.rst $ del docsmodules.rst $ sphinx-apidoc -o docs/ opentisim $ cd docs $ make html $ start explorer _buildhtmlindex.html

Deploying

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:

$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags

Travis will then deploy to PyPI if tests pass.

Credits

Development Lead

Contributors

Various MSc projects

  • Wijnand Ijzermans, 2019. Terminal design optimization. Adaptive agribulk terminal planning in light of an uncertain future. MSc thesis. Delft University of Technology, Civil Engineering and Geosciences, Hydraulic Engineering - Ports and Waterways. Delft, the Netherlands.
  • Stephanie Lanphen, 2019. Hydrogen import terminal. Elaborating the supply chains of a hydrogen import terminal, and its corresponding investment decisions. MSc thesis. Delft University of Technology, Civil Engineering and Geosciences, Hydraulic Engineering - Ports and Waterways. Delft, the Netherlands.
  • Piebe Koster, 2019. Optimisation of concept level container terminal design. Accelerate the generation and visualisation of the terminal design to reduce the probability of a sub-optimal solution. MSc thesis. Delft University of Technology, Civil Engineering and Geosciences, Hydraulic Engineering - Ports and Waterways. Delft, the Netherlands.

Ongoing MSc work

  • Hugo Stam, 2019. Logistical optimisation of offshore onshore port systems from a economic perspective. MSc thesis. Delft University of Technology, Civil Engineering and Geosciences, Environmental Fluid Mechanics. Delft, the Netherlands.

History

v0.6.2 (2020-03-09)

  • Updated the container code (minor bugs fixed)

v0.6.1 (2020-03-09)

  • Updated the container code with vessel classes

v0.6.0 (2020-02-14)

  • Updated the container code and example

v0.5.0 (2020-01-24)

  • Updated the agribulk code and example

v0.4.0 (2019-07-18)

  • Renamed and first release to PyPi

v0.3.0 (2019-07-10)

  • Merged multiple terminal types to the master

v0.2.0 (2019-04-06)

  • Working version of redesigned code

v0.1.0 (2019-02-18)

  • Final version MSc project Wijnand IJzermans

Indices and tables