This repository contains TanksOptimalControl DS - a Tango Device Class for calculating time-optimal control in a system consisting of 3 tanks in a cascade.
- Tango 9.2.x and PyTango 9.2.x
- JModelica 1.15+
Those can be found within a Docker image in this repository.
- Optimica model for the system of cascading tanks.
- Tango Controls Device Server for simulating and optimising said system.
- Test scripts to automate generating results.
Before launching the DS, one must set appropriate environment variables given below:
PYTHONPATH=:/opt/tango/Python/::$PYTHONPATH
JMODELICA_HOME=/opt/tango
IPOPT_HOME=/opt/tango
LD_LIBRARY_PATH=:/opt/tango/lib/:/opt/tango/ThirdParty/Sundials/lib:/opt/tango/ThirdParty/CasADi/lib:$LD_LIBRARY_PATH
SUNDIALS_HOME=/opt/tango/ThirdParty/Sundials
MODELICAPATH=/opt/tango/ThirdParty/MSL
CPPAD_HOME=/opt/tango/ThirdParty/CppAD/
SEPARATE_PROCESS_JVM=/usr/lib/jvm/java-1.8.0-openjdk/
Then, launch the DS with:
python tanks_optimal_control.py *DS_INSTANCE_NAME* [-v*LOG_LEVEL*]