Skip to content

Rule driven scheduling of cyclic activities for in-depth comparison of alternative operating strategies.

License

Notifications You must be signed in to change notification settings

TUDelft-CITG/OpenCLSim

Repository files navigation

Documentation License: MIT DOI

TUDelft-CITG Coverage

OpenCLSim

Open source Complex Logistics Simulation - Rule driven scheduling of cyclic activities for in-depth comparison of alternative operating strategies. For background please read our WODCON 2022 paper, also available at ResearchGate. And our Terra et Aqua 2023 paper, available at ResearchGate as well.

Documentation is found here.

Book

You can find the OpenCLSim book, based on the examples in the notebooks folder on the OpenCLSim-book website.

The book is only build from the master branch and the special "feature/book" branch. For testing your book you can use the feature/book branch.

Installation

To install OpenCLSim, run this command in your terminal. This is the preferred method to install OpenCLSim, as it will always install the most recent stable release. In general you want to install python software in a virtual environment, either using anaconda or through python's default virtual environment.

pip install openclsim

For local development use:

pip install -e .[testing]

If you do not have pip installed, this Python installation guide can guide you through the process. You can read the documentation for other installation methods.

Examples

The benefit of OpenCLSim is the generic set-up. This set-up allows the creation of complex logistical flows. A number of examples are presented in a seperate Jupyter Notebook repository. Information on how to use the notebooks is presented in that repository as well.

Running in Docker while developing

Best run in WSL to have parameterized mounts. Otherwise in cmd/PS.

For developers issue yourselves
pip install -e .

# if you changed the python requirements or Dockerfile: rebuild image, avoid using the old cache
docker build --no-cache . -t  openclsim # same name as in yml: image: 'openclsim'

# do only this if you did not update requirements
docker-compose -f docker-compose_dev.yml up -d     # 1st  time: (re)creates container 'openclsim' from image 'openclsim' as defined in yml
docker-compose -f docker-compose_dev.yml  start     # each time: this will run the existing container 'openclsim' as defined in yml
docker ps                # see running containers
docker exec -it gee bash # run a prompt in container instance 'openclsim' of image 'openclsim'

# this row get lot from history completion after rebuild
jupyter notebook --ip 0.0.0.0 --allow-root --no-browser --port=8888
jn                       # alias for above defined in Dockerfile

docker-compose stop      # each time: this will keep your container 'openclsim' incl. modifications and bash history
docker-compose down      # last time: destroys container 'openclsim' (not image 'openclsim')