Skip to content

Latest commit

 

History

History
 
 

water_boiler

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Water Boiler Example

Simple simulation of a water boiler which can heat up water and where the heat dissipates slowly over time. Running the example will run the water boiler simulation for 10 seconds and use the PID controller to make the boiler reach a setpoint temperature. The results will also be plotted using Matplotlib.

Installation

Optionally, create a virtual environment for this example and activate it.

python -m venv water_boiler_venv  # assuming Python 3
. water_boiler_venv/bin/activate

Then install the example dependencies:

pip install -r requirements.txt

Usage

# activate the virtual environment if you use one:
. water_boiler_venv/bin/activate

# run the example:
python water_boiler.py

# once you're done deactivate the virtual environment if you use one:
deactivate

Troubleshooting

Ubuntu

Depending on your environment, you might have to install a some system dependencies for Matplotlib to display the graph.

Typically, the sign of that is usually one the following errors:

  • UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  • AttributeError: module 'cairo' has no attribute 'version_info' (if the system dependencies are already available but not the corresponding Python dependencies)